' ]7 M4 z7 r) }6 Z. Y0 V$ M. ^ 果子 来自 http:// : ( l% t B* u% A! F 4 z" _% u4 p) @( U/ P/ w# ` "恶魔吹着笛子来"是比较“前卫”的一类程序员。我就听业界的人多次说过JAVA也是 5 B7 j6 R; |7 V! c6 o
/ }9 V2 S, k' W9 f
& }" {7 }7 {8 Q2 { 个吹得很响的东西,但实际如何,大家都看得见。至于认为C/C++开发工具(VC, * ~1 Q* ^/ F; i, o$ V+ w$ E
M% ?! m1 }% v5 o; h( @; l. m
BCB等)会在一两年内退出市场,就是无稽之谈了。 , ~6 ^2 r0 H- z3 o3 u. @
6 F# L2 @ h) [
Wesley 来自 http:// : ! v+ m! {) V% S3 c' I3 N
' h; B4 v ?& s5 z2 [
恶魔吹着笛子来,你的观点很有启发性。能不能写一篇或推荐一篇剖析、比较Java开 * C# s+ g) b. i. j0 I9 w5 ^
发工具的文章?比如Visual J++, JBuilder,以及Symantec和IBM的对应工具。(可能和 # E4 Q) ], q( y% B4 Q$ U% b) w6 k本站的初衷有些不合^o^) - q( \0 W& _: W# I) }) B
- e5 W- Z) \. ` LeoCN 来自 http:// : 5 I6 e+ [/ ^! ^5 }7 R" o9 ~# {+ F ; o x/ [% P& O. `1 O* o It's not a time for us to determine which language will more better! s% C6 V0 w' c) E0 `1 l 0 M; l: z' q2 M i0 x: \ in factly,In China,too many corporation just writting some codes for % e; z5 U* Q5 ?* f+ s / k0 g8 \' a3 R5 k+ j
enterprise's MIS,OA,ERP or other application.It do not need so speed + p' T8 F( \/ r, Y 0 j, e6 `9 C4 o% R7 H) {+ o' u
and do not need so good original code. just want more data,more easy and m - }# A0 C) r- f7 m0 a k3 J6 A; W' qore quickly. - H# u/ D5 ~3 r* i* c; k/ [
- A7 w' ^+ y8 h
so c++ is not a choice in such enviroment. and u know,many codes we write 0 _8 c! A2 n. J) L$ {today will be useless.and there r so many easy tools such as VB $ J1 X& a2 g& t* K- }' o+ j
9 t( i g# _1 Y, }. Z& o
for windows designer, Developer/2000 or PB for database,Domino Designer fo # F; {& M- X/ t& [ Tr OA application,why c++??? 0 T" z3 k' h8 s t6 U7 q% N ' ^& `, ?# h: ]9 j, ? in DOS mode. i like Turbo c2.0, with it and MASM i can do everything. 2 B, E' B& T- _- F
! ^* M6 K5 p8 f$ I2 B4 Y) t
but now i hate c++, it has waste my time! my corporation do not need 6 _# Q& e) l- ]/ a2 M! I1 T( _ 7 d& W+ N$ [0 p. p
c++,just need java,xml,php,pb,vb,delphi,developer/2000,domino designer etc 0 A- u5 c9 Z5 }* k. V8 l; e. 3 G7 v6 o5 F. a! s - f+ M4 S* |' L7 { so, a tool is just a tool,if the advantages in some aspect of the tool 5 w0 u( O9 L+ f. j
$ h+ T7 s1 q/ D u needed. it's will be a good tool for u. others it can bring u unfortunat 7 `) ^1 X. h) @/ x& N
ly! 9 Q8 n( _+ M! ?; E( l+ ]6 q& N $ V1 r( x% P3 [& e
恶魔吹着笛子来 来自 : ' X6 N; v' k$ c. t# \) K$ G ' a! n0 p! d: I/ y# m0 h+ J 果子,国内的Java应用不到10%基本上是ms的天下.这些可能是由于中国软件业规模太小 8 h& |4 S* F! \8 d% O) J的缘故.而在国外40%的商务系统的开发都是Java,c/c++不到10%.譬如BEA公司一个有3个 % j, ~5 N9 G# Y1 q$ e
java程序员创立的公司开发了第一个基于J2EE的Application Server---weblogic.BEA公 . P: j+ F7 t. d( p: U3 k2 ?
司依靠weblogic在短短4年里成为世界第四大软件公司仅次于CA公司.可见JAVA的功能是 ( k, h7 x {! j. q# y
如何的强大.微软的.NET的负责人说,你们想要知道.NET是什么样子,那就去看看JAVA.JA . ]5 A% B8 N& l9 |' G
VA是什么样子.NET就是什么样子. 5 _ Y& z' K$ x* x5 q! P Z ) z" e% V" H8 l4 u2 g7 D) ?
5 }9 I; r% z, w+ u7 O; U3 ?- l 7 y$ Z. m x6 Y% |; i! C. U
恶魔吹着笛子来 来自 http:// : + I4 w/ l6 g" K. L3 o $ s/ I; ~/ T* I- V/ p+ g, ?5 ^ Wesley你好.关于Java开发工具的问题.从我的观点来看,目前的Java开发工具没有一个 " m, C6 r! x6 j3 E$ ]" I# {
令人满意的.最主要的是,在技术上考虑的太多,却不像MS的开发工具考虑到程序员的方便 ) u+ ^: Y. I f- i) Y(vj++是另外一会事情我后面会讲). # T6 a7 Z1 |: Y# f 6 `% r! U/ _( Z' r 基本上流行的是sun的jdk,ibm的visual age for jave,samtic 的visual cafe,和bor ! J$ ~1 c! o4 ?. \" Cland的jbuilder(vj++基本上没有什么人用). 5 ~3 @/ I M" m- e) O0 N& e4 S% R
* H; x5 W0 L1 ^/ s- o* R
在这几个工具来讲,jdk是老大哥,但是仅仅是一个command line compile.在某些方面 8 f; O8 D. c2 v( T& w: ]
用ultreditor+jdk会比较方便,譬如你的机器的配置比较的低(memory<64M).一般来说,几 $ H, M w6 {/ G/ r( |& G! J7 v乎所有的Java工具需要的机器配置都比较高. ( h; j3 a# E+ c5 F X' C9 c7 T
* h; Y9 h- f/ K' S
visual cafe是第一个可以使用的Java IDE工具,我当初学习Java的时候就是用这个.它 - @. e* j1 I9 z, ?, v
的配置要求比较低.一些比较低的版本譬如1.5 2.032M就可以使用了.但是现在最新的版 7 G8 |" k' h7 O: x4 l- P: `1 f' u( w本5.0的要求就比较高了,可惜2.0以后的版本没有用过.cafe的IDE开发也不是很方便,懂 % h( O& P) X5 w- o) k2 e
一个窗口西一个窗口比较的乱.而且bug还很多.有的时候trace到一定的地方 3 w1 D0 y- Y: w2 o9 Y1 \* x
/ T% U' F8 L0 A ~" [
就会crash.samtic是一个系统安全公司不知道为什么cafe却那么不稳定.而且从技术上 9 c: G V! `1 A7 i+ d来说到目前为止还没有完全支持java2.更不要说j2ee了.从帮助来说cafe的帮助基本上还 2 J$ w( X- ^: L6 ?
是jdk的帮助没有什么特别的地方. 9 @3 F [( L# t+ u$ |+ \: B $ M9 c, P! L( D/ n) Y
IBM的东西往往是吹的比做的好.visual age很复杂功能也很多.支持100%pure Java和 4 F! n2 L$ w' i( d' YJ2EE.但是使用起来不方便,当初为了设一个class path找了半天的help都没有结果.后来 7 ^* C6 n' t3 x7 ]0 r2 \9 o
听别人说要在nt下面设置环境变量才能成功.而且与其说是visual age还不如说是comma 2 C; y1 i! C/ f6 C) B
nd line套了一个windows壳子.做application还要自己写layout代码更本就不visual. 4 l+ A c( q0 a- T
. f% ]6 P# x* t) h' V3 P Jbuilder是我目前遇到最好的一个,它的界面基本上和delphi c++duilder差不多.他是 5 A8 G, T3 N) N1 M; t% s$ V: m+ H \" }# o第一个真正的java的rad系统,第一个全面支持j2ee 13项Java技术的工具(bean,jsp,rmi 5 o: U/ D. Z6 \7 I7 e& N
都实现了).100%的pure Java.相当全面的help document. ' A0 ]& }" i9 W5 a* ~! H
" |3 |/ t9 ^# i+ b' P
但是他最大的缺点是系统要求实在高,没有128M别想用.64M下面慢的像乌龟,help更本 , y# E8 g. U/ R$ h" f
不能开(它的help都是java写的64m下面打开help慢的能够看到一格一格awt画窗口的过程 - E7 O1 z) [6 w: C8 Y- k2 Z6 N).但是不管怎么说他是一个比较理想的系统. : ]: D; J- x9 ~: p: G; d 0 y1 f. j8 u7 s ~% m7 a& [2 x 至于visual j++.MS更本不是想用他来打开java市场,而是想用他来分裂java.从很大程 " \7 M, Q' Y9 o3 @. m度上来说vj是一个windows 程序的java开发工具他不是100%的pure java.在windows平台 ) V- D, A( }- R9 a0 E# G上他是最visual的.用他开发application,你不必用复杂的layout,只要像vb一样填写坐 2 L$ x6 [7 |) z标,而且开发的windows程序速度很快完全100%的本地代码.你可以把它看成java版的vb. ; _* f0 I+ @. c D% V+ i
他的wfc库仅仅在windows上能够用,而且使java和com捆在一起.他自己开发jvm,java库. & h) N/ h7 {) l但是ms污染java的策略相当的成功,不仅把java逼的走投无路还在法庭上赢了sun的java $ e& R- }% u7 d! s! k/ c( d' O7 v! p, t官司.因此ms的目的一达倒就把vj便卖给另一个公司而且随着c#得开发和得不到sun的j2 ! h2 ?' O, L: p+ Cee的许可我想ms不会再开发任何关于java的工具.如果你开发java的同时还想使用ms下的 : ^. q* T2 f& h8 |, `# E% p% i0 T2 `com,ado那么vj可以适合你的需要. + @- Q! {+ S* e3 Z6 H
( ]. q) }- p/ y4 q- ^0 d ) d l( U. B; H4 N& z z" ^5 t
; Z; Q \) A/ l# p7 M" v" f8 m
8 U0 J9 F$ P6 u6 c2 K( f 4 u9 `8 Y J' A1 T & m S$ A8 E. f( I( s% f0 u * M; j, ?' b5 S& w f, t$ n3 \ 3 R0 l8 `6 i7 H/ p chenxiqi 来自 <a href="http://chenxiqi@yeah.net" target="_blank" >http://chenxiqi@yeah.net</A> : 6 j2 g( }& b) l, O4 p. C* ? + w$ ^$ n& s2 W" O, W# h
VC++开发数据库软件确实比较慢,可有许多软件只能用C/C++来开发,如果VC++退出历 - t# z/ [* O+ m/ x0 W史舞台,那岂不是说只有数据库软件才叫软件,我想世界不会如此单一。 $ }! e8 g3 Q" x* {( ] ) E4 e) s2 C8 X) B: V- z9 s' A: Y7 n - m& Q$ j; \7 J0 j zhangxiuyong 能告诉我什么是MVC的开发技术吗 4 ^3 r/ z/ O, A* k% k. C
9 U3 K% I" n9 j: o! ?
恶魔吹着笛子来 来自 : - ?: m* n0 e. T/ {( K. O( n 3 b: t D" I8 ?7 d6 p6 l- O 什么样的的软件只能用c/c++开发? ' x$ X* {% j" z+ L) G
" Q1 q( O% |/ |0 K$ g- A8 ^
操作系统?apple的OS7,os8,os9都是PASCAL开发的. 7 K9 {7 [' K' F0 K , ^4 w" ~! G! Y8 a. \! \1 C 数据库?oracle8i就是JAVA开发的 : m5 }% Y" n% r& _( ^0 ~/ o8 Y# ?
. b S. h5 i2 z
游戏?你也许没有见过用DELPHI开发的<笑傲江湖><风云>,甚至有VB开发的<神龙教> 2 p4 k& p7 w, i0 K2 X: O8 Q e5 J4 C) p- e: Q. j8 \
同时VB7.0全面支持direx8.0.可想而知游戏的难度会大大的降低吧. ! z6 @$ S; b \& S9 y9 R5 G 7 P- }7 R4 w! g, b5 n' D
MVC=Model, View, Controller Design Pattern ' `7 _! {/ V- ^" j' e! _7 t; \ 8 w' J# b! | _+ ~9 |
+ R* I- w7 E+ K i7 ~1 ? 6 _ v9 q, x1 A0 I 恶魔吹着笛子来 来自 : / q8 U) I2 Y" F- W9 \- e9 \: a
3 x5 \- M/ Z- l: g 什么样的的软件只能用c/c++开发? " R# y+ S1 _! ~! y X% R2 l
% C( d1 j* S. e- @5 ` 操作系统?apple的OS7,os8,os9都是PASCAL开发的. ) Z: }/ e* v3 Q. L. e
2 V8 P8 Z7 Z# U
数据库?oracle8i就是JAVA开发的 3 B b' ]9 e2 p7 Z+ b: }
% s' I5 }& U8 O# \
游戏?你也许没有见过用DELPHI开发的<笑傲江湖><风云>,甚至有VB开发的<神龙教> . q$ z0 `& q. Z 5 y, E0 r7 T( U& O3 Y U
同时VB7.0全面支持direx8.0.可想而知游戏的开发难度会大大的降低吧. ! Z% n* K* ^; J0 l
: N% h0 w# d6 B' m7 I
我的意思不是说c/c++会消失而是应用的范围将会大大的降低并且将会进行脱胎换骨的 : F. ^0 l0 ]5 Z/ \升级(用了20几年升升级总可以吧,java的升级不算太成功,但是是一个不错的先例我想c 2 g, a. X% b" @+ O- V4 Q+ \#的前景会更好). 8 ^& t8 c3 o$ d* W+ x, } . h7 B1 f$ ~; z* I' T
BTW: 3 y2 g! @, O9 M: {
. j) `- F! E4 E& [& i* A# c MVC=Model, View, Controller Design Pattern ' I& R) c+ K3 @/ a5 J. _' C+ D! G
) v, f* {0 ]" o# W8 S
5 h! t# I. o, L4 [ Q5 O4 N. ?
7 s- t8 j. ~3 ~* ^. b% I7 U5 ` xubin 来自 http:// : 3 b5 D: @, c, Q8 n! \ 1 A( B/ U6 ^8 M& z& p 在工业控制中,直接对I/O地址操作,就要用C++。 9 c6 p0 L1 j. m9 d3 x* H/ r
, o+ j8 P( B7 d+ t$ O. L4 j1 p
恶魔吹着笛子来 来自 : 3 W; I* p& N# |0 _8 F6 n
" {+ d- A1 P4 d+ B 俺有一个同学毕业设计用VB做单片机。你这不是在讨论问题是在抬杠。 ! O5 d- \2 k) E# K8 D; f
: u2 X8 V+ H ^9 J3 g, y5 e wenyy 来自 <a href="http://www.vchelp.net" target="_blank" >http://www.vchelp.net</A> : * z0 V/ `/ a+ P4 i: `6 d- ?4 u
8 B" U; L- r, s 我想一种语言并不会因为其他语言的出现而消失, W: E: d* o( D8 H7 j% G
- r0 ~% a5 z2 S; Q$ l 其实在国外, ; k- U0 o7 ?$ @& {7 B9 x
* [) e4 ~, n* p: ] SERVER端软件大都用JAVA,而CLIENT却没有多少用JAVA, 8 V' I: C! w, |5 |6 S/ A. \
! v Z# D7 i5 a& j% }
这和速度有关,当然也与MS对JAVA的态度有关。 $ b8 Y9 d7 X0 ?8 s Y9 E
/ y H: j% s: O4 d6 ^/ \
8 F. I) A- j! _1 @9 L! ^
不过我一直认为C/C++不会因为JAVA的出现而消失。 + g( Q8 E2 W. X% I3 l
' I" S; f0 I& p7 K5 m
就象COBOL目前为止还在使用一样, # `: I+ M' J& x2 v& C0 x g6 S
3 w! e, ~, F( m8 B6 [' _; S- c5 L : T h/ r* F. B7 t6 q
不过以后会有愈来愈多的解释性语言出现,因为解释语言比编译语言的兼容性好,这 7 x' ?8 r$ ]( h4 Z" a! F$ h' m
是不得不承认的。 7 |. J' @- Y7 Y. K/ L+ g
8 v! Q" Q% y# I! ?- z# G
恶魔吹着笛子来 来自 http:// : # w' I6 Y2 @; Z6 d. ?
5 J; `! w3 g. T, `+ @) V 是的wenny.也许我说c/c++的消失有点夸张化了,但是实事求是的说.java和c#的出现 ( a% F- ~0 P5 [1 H( f 8 G2 l3 R3 ~; J2 G3 I; |: q
c/c++的升级换代是在所难免的.对么. & Z3 q) U3 ^1 G2 }1 O( [ & V" v" @! q! w# ^ 恶魔吹着笛子来 来自 http:// : " g) W" U8 z2 o" W- D8 z 8 _$ t8 [* e8 ?
而且我一直认为java和c#不是另外一种语言而是c++的升级.就象是c到c++的升级一样 9 `9 |* E; a, F- O/ K.对不对. % Y3 k( u4 Z$ ~9 ?% l
% Z) L! Y" P& }3 q9 _
xcc 来自 http:// : 3 y6 [6 s- z( Q2 l 9 `3 i2 {1 V# X1 J; m; ^$ L, s( L 同意恶魔吹着笛子,你简直是我的偶像,顺便贴一篇关于C#和.NET专访 8 V$ V4 W# z9 ^2 o: x+ w 8 Y' n2 K4 P* U5 J. A, g8 M9 V0 A
NET and C# Questions with Jeffrey Richter + H$ d8 Q z4 ^. w5 U ) S, y8 U7 ?+ k, S, w0 w In the weeks after Microsoft made a huge splash in the development communi " {7 r+ a# u7 { x' _7 e
ty with their .NET and C# announcments at the July 2000 PDC, Jeffrey Richter & ?( ]8 h& R7 A0 D2 m6 O accepted our request to field 20 questions from our readers about these new * Q# j F& i- x" y& j% V technologies. As many of you already know, Jeffrey is a cofounder of Wintel % z' e' V7 a+ }. {( Wlect, a company that specializes in Windows & Microsoft.Net training and deb , c; {" I' [( P! w1 j
ugging. Jeff is also a consultant at Microsoft working on the Microsoft.NET : g4 T7 A- c( c; E
Common Runtime Language (CLR) team in which C# and Visual Basic 7 applicatio ! U2 F4 N, R. B/ P$ ens operate. Below are the 20 most popular questions that were sent in and Je ! a l' [( y3 c- \2 M5 f& Cffrey's responses. # X' q7 V ~1 Q9 o. @ 2 y1 v: c( l& s* F For Visual C++ developers everywhere still trying to get a handle on all t 8 D; L; z9 L3 `* @his: Thanks Jeff!! ! V+ `4 O$ A$ ?& Q5 c2 _ 3 T) l% w% B$ y" d8 M7 @
, T& {# V9 G$ ~5 q' B0 T2 n5 v2 a Question #1 Is .NET a runtime service or a development platform? / Y% e$ W" o1 \9 h6 \2 B4 J; [1 I7 `- ^ $ i8 C; T% v! G
Answer It's both and actually a lot more. Microsoft .NET is a company-wide 6 u" A" m6 I! j; Z- |6 E) j initiative. It includes a new way of delivering software and services to bu ) s3 f7 z* w# G5 _- ^# e# h$ I
sinesses and consumers. A part of Microsoft.NET is the .NET Frameworks. The + r+ s+ \( x. ^& [; ]9 |
frameworks is the first part of the MS.NET initiate to ship and it was given % o7 t0 K" W8 w
out to attendees at the PDC in July. The .NET frameworks consists of two pa * M7 K6 r. a8 Q1 ~9 Q% G: Z6 x- ]4 M" e' Hrts: the .NET common language runtime and the .NET class library. These two 7 B# E& k* Q$ I# |5 Ocomponents are packaged together into the .NET Frameworks SDK which will be $ ? W8 Y6 m* ]0 N3 y5 F# j2 u
available for free download from Microsoft's MSDN web site later this month. $ ]8 }: g: q6 X$ a
In addition, the SDK also includes command-line compilers for C#, C++, JScr - c L* @$ [' b! W5 l2 @- ?
ipt, and VB. You use these compilers to build applications and components. T 6 c/ z8 a M2 Z. ~5 j
hese components require the runtime to execute so this is a development plat / i: d1 K4 F T3 k0 X9 }form. When Visual Studio.NET ships, it will include the .NET SDK and a GUI e ) U, E h" h7 Z* q1 @5 m
ditor, wizards, tools, and a slew of other things. However, Visual Studio.NE 4 o! G8 a/ r- l, J2 u
T is NOT required to build .NET applications. % ]$ b8 u1 N9 U* s2 B
) S# X& ?: \/ s& H8 W; a% k! n
+ k% c( A, j3 y0 K) T" k9 P) x7 O
Question #2 How likely it is for C# to become a general-purpose (meaning: % S& F3 i* v! I) E I4 j# q
not MS-specific) language and if so, have any other vendors committed to pro 8 j B2 |5 A- `. ^
viding compilers on any non-Windows platforms? ( c$ z/ j3 @9 P& f: b8 V, b1 f
5 l- z6 M2 k+ q' l4 o
Answer It's hard to answer this right now. I have been programming in C# a 8 Y( h6 q& b! @* L+ r
lmost exclusively for about the past year and I love it. It only took me a f ; Q" w0 [ f2 ^1 o6 [1 @
ew days to learn most of it since it is very similar to C++. It was designed 8 M6 w$ a' B. H$ z( x( j6 X. T to compliment the common language runtime and I think that it's unlikely to 9 O' d: r; K2 l$ v4 U
gain much momentum if decoupled from the runtime. However, you never know. 7 R+ S6 g/ b; g9 J; tMicrosoft is submitting C# to the ECMA standards body so any company will ea " _! R( ]8 q7 F/ K: {sily be able to produce their own C# compiler however, without a runtime, th % B% w. Y2 V+ u) }6 s$ S& k
e compiler itself is not that useful. I'm not aware of any companies current % ^- M; w" @- W; b% K! z4 ]& n
ly working on their own C# compiler. Certainly, porting the runtime to anoth / a! ^0 l; n) y5 _1 ~er OS is no small undertaking. , q0 A* O- P. m8 t0 U
3 `9 E: k# y" Z& `6 F( { $ \# c# Z, w8 w1 V8 D/ ?$ r8 O Question #3 Can you tell us specific practical problems that C# can fix be ( p# M+ ^+ l. p* N, a: @3 l+ `/ vtter than Java? , h) z8 k& U, C2 A$ B% z! _- `/ P
9 \+ ^$ }2 V g# l Answer I must be honest with you: I have never programmed in Java. I know 8 P0 O" q8 W7 Y. ?; m5 R+ T: t# cwhat C# offers the C/C++ programmer: simpler syntax, components that seamles 8 w5 t, A0 B' Z& a4 c) H7 k5 Asly fit together, type safety, and so on. Other people should be able to add ; ~9 u4 J2 a' @! ]! ]1 Z- E8 K5 H% j8 @9 k! Kress the C# <-> Java comparison. - O$ I7 V0 U. j. o: o- w( `
, p( P; s$ b) N! O" \: j 0 o( H3 \1 W; B5 {8 }0 B: j8 Y% c Question #4 Will ADO+ be the preferred and most efficient method to access 7 g: E" q1 w! {* Z( v5 z! c- [ databases from C# or will it have it own (or .NET) class wrappers for the O 8 T6 t ?" t" A2 S A: p/ bLEDB API? % C5 K: p5 G4 b9 | ' ?4 |6 z8 A6 _9 D3 E T/ V3 t6 v
Answer The .NET class library includes a System.Data namespace with many t * J( {: R) n" e! c% O1 t
ypes for database access. These wrappers will be the best (and most efficien + S4 @/ V/ C M% i# n: Bt) way for a C# programmer to access data. $ {+ X0 i9 R! U" K. I
" }7 G: T; \/ o6 o: f! P8 X ( I) P: e* |' C P& h5 [+ ^
Question #5 Can C# be used to develop Windows applications or is it soley 7 Z; D/ Q# o% W9 d" R A5 E" fused for developing distributed applications? 7 V4 X/ y H7 _; _4 P, E! f 6 L I6 Z6 V4 }$ ?# f Answer C# can absolutely be used to develop classic-style Windows applicat - Q* u1 H% W7 e( B; p f3 w( e
ions. Actually, this is more a function of the runtime, not the language. So " d$ T7 w4 E/ e1 E$ u! @, the runtime supports console apps, GUI applications, NT Service applicatio $ z4 U" H+ |/ y/ M* w, F$ B- X: gns, simple components which can be used in applications, web pages and so on ' i1 }$ @& m. N. [. You can't write a device driver but that's about all I can think of that t + u( j& o* e1 M% @5 L' c+ khe runtime doesn't support. 3 m; k# N, y# n0 p+ e8 I; A, p 4 j y% R; d5 q+ S
& K; S% B0 j" s/ F2 y% F
Question #6 What is the C# relationship to WinForms? ! {/ u1 D1 Y8 b" w) V% | 5 m* N5 P1 ^ [) x# P/ c Answer Win Forms is a set of classes in the .NET class library that wrap W 8 X0 ^. H' N5 k2 O! @/ Nin32 windows, brushes, pens, etc. Any language targeting the runtime (includ 1 M5 a& ]+ I! \* f' }
ing C#) can construct instances of these types and manipulate them. This is 1 D# a) o: N3 Phow you would create an app like Notepad, Calc, or Wordpad. I know that Win - @; J$ E/ J; X/ F! B. z; M
Forms has similarity to J++'s WFC library but I also know that there have be 0 W% _# o! `1 g& |
en some major changes. 7 E A; c- a W8 |
, R! g- A8 g" E0 G1 ]0 }7 z! \ 2 e- t. C- h8 G ~% w
Question #7 Rumor has it that the C# language has been submitted to the EC ) k8 k: V+ I* J. i1 T1 r3 J% JMA for ratification. Is this true and what impact do you see that having on 2 i1 N f4 n. b4 }, Q& o* b
other companies adopting it as a general language (such as C and C++)? . v" D- p' {- N ! l+ r+ Q7 Q/ J5 T Answer Yes, it is true. I pretty much answered this in question 2. ) y8 a1 `7 q3 Q; W& P# h+ l
: z) s: j/ n5 n4 }" Z4 _
0 x1 R+ P k* x( ? Question #8 Which will be the role of ATL and COM in the new .NET technolo 4 P0 f7 V6 z2 L
gies? 0 u' o R8 V% J& t
' W$ v, R, k! U7 S! t Answer The .NET frameworks offers a replacement for many existing librarie ' _' T/ s5 D6 T! ]
s, like ATL, MFC, C runtime library, standard template library and so on. .N % W3 B9 I8 G: e6 m. C
ET programming is significantly easier than using any of these older technol 8 Z1 ]% ~& d+ b1 p0 }0 Uogies. For this reason, I suspect many developers will move away from using 9 @3 A) f2 M& ]: w: {4 K, \the older technologies. The older technologies can buy you performance howev 4 s, L) R+ Y) c2 |. Yer; so, some people that are very concerned about this will stick with what' 1 V4 e7 B! F" ~# b# o
s around. As for COM, developing components with .NET is orders of magnitude % {0 X) l# a5 p, G7 |3 _+ ^ easier and the interoperation between components pretty much happens for fr $ a; H$ r; T" m* S$ X+ dee. Again performance may be an issue for some. And, for the time being COM+ # R: ]' L1 H% ]2 l1 Z, e, C' O services, like transactions, are not being offered directly to .NET code. Y 4 |: n0 h, S _, H2 c, }ou can still access these COM+ services but .NET code must incur an interope $ l2 d; m0 ?( Z9 L: N3 erability transition, which translates to a performance hit. 5 G, { n% q3 w1 m. \/ ~
8 h1 C! m1 D) i' } f/ x 1 L6 L, x" b( B; M" ^ \% I
Question #9 Why was the templates feature not carried over from C++ to C#? , C& A" K. r Q& W+ T7 K2 \9 G 5 E9 t9 p. m+ x2 j1 Y, X* | ; y+ `" H+ }6 i: Y5 f# B1 t Answer Again, this is more of a runtime issue than a C# issue. First, temp 1 D6 E7 _4 k3 r9 n& F0 Olates are difficult to implement and Microsoft choose not to do the work for , T; z% a1 X- m8 R, F# c
Version 1 of the product. They may do templates or something similar in fut % r/ ]0 _- K$ R* Qure versions. Second, since the runtime is a multi-language runtime, introdu $ m6 a3 k" O5 M2 s% |
cing templates means that all languages targeting the runtime would be requi / |5 H8 s, F6 o; [
red to support templates in some form. There are a lot of issues here that n 4 N0 a- x5 M! x8 oeed to be carefully considered. - H E. D3 [) O8 Y2 ]
" `$ v3 g" j& L! D- s / G1 X- e& x) v0 d( {
Question #10 Will C# replace the pseudo keywords that clutter ATL COM code " }/ G9 o& M. D" T! Q! X5 U: Q j c3 S with real keywords? Examples: OLE_COLOR, BOOL, VARIANT_BOOL, and DISPID_XXX 4 \! Z) ^& \/ t" ?# n5 _9 A$ X4 @$ K
XXX. * `# t+ m& l3 p$ H8 Z) l! A. i
: z7 Z- {" X1 b* j& C7 ^6 j% C Answer Absolutely, all types have new names as provided by the .NET class 9 ?/ i8 W) ~/ m. {) ^7 i* ulibrary. h g1 q7 l1 f @4 S
! o* w7 j$ x- U5 h 4 ~; u2 [8 T5 a2 l Question #11 We've seen managed extensions, but aside from that, what futu " O5 x4 k6 B) E7 Y4 A0 A
re does C++ have at MS and in .NET? 4 ?' o6 _' S+ e3 b
1 W O/ |$ q1 b. s# W# ] Answer C++ is unique in that it is the only Microsoft language that allows 6 u5 |8 C. I4 z3 m
the developer to write managed and unmanaged code. So, I can easily see dev 2 P: G) h% [8 o# M# q+ G5 q+ y, K6 Telopers writing in unmanaged C++ for performance-critical algorithms and the : X. K# D0 W2 b8 o. k
n using managed C++ for type-safety and component interoperability. I'm sure 1 O% N# a# z$ b4 g" m/ l
Microsoft will keep C++ going for years to come: device drivers need it, Wi 6 `& w0 e( i8 y. _; I, Vndows is built with it, SQL Server< Exchange, and other BackOffice products 5 b( |0 B. T' D, n" ^- m( C9 ~will probably use C++ for a long, long time. 1 [; w3 s. f" B* q7 D+ }/ }, v
+ e* b u4 t" I+ D
6 a2 p' K+ n- g4 L
Question #12 If .NET supports ActiveX/COM, how will security be assured if # j* r/ j. C( c; r' d; h1 [
a C# application runs from within a browser? ! ?0 _- I5 [. f: d- i+ f. n
! q w! k3 z: I* Y. E# [9 \ Answer The .NET runtime offers code access security, which allows an admin ' J- @+ W3 p4 S$ V6 o
istrator/user to configure security based on code identify. By default, any 3 E( V% r# z+ M0 D1 H) E9 O
code downloaded via the Internet or intranet is untrusted and will not be ab 2 d! t- u0 u5 |9 Y* ole to access files and other resources. In fact, when I build a console appl : b9 p' c- g, _5 P! W1 [, rication and run it from a network share, I get an exception when it tries to 6 f6 e* O: w- |* \* P w access certain resources. If I copy the same file to a local disk directory : W3 j1 k& |% ]) U& `" I and run it, it runs fine. Code access security is integrated with the runti * m! s) q! k4 e9 \me and is too deep a subject to cover here. ( V- s+ E7 }7 D+ F ' ^( P- G! M2 p7 H- [, H 0 V/ U1 a) I+ F+ E Question #13 With regards to the .NET runtime, do I need it on the machine 4 x, U3 s2 _% \. H
that I deploy C# apps on? ! g& q) G' R. d7 ~9 Q. d+ _ 2 X& k3 ~! L! @/ W# w! G& e/ Z' Y# u9 U
Answer Yes. All managed apps need a manager; the runtime is the manager. M & u& J* ~6 w* k+ B: ]0 d1 @6 T) Sicrosoft will eventually package the runtime so that it is freely redistribu 9 Y0 W9 k: E/ G) j- t. X4 l
ted. For now, end-users will have to install the full .NET SDK from MSDN web ) j4 G) A( `) S! [ site (when available). This is similar to how VB developer must ship the VB 5 E! y: Y) ~6 O3 f: g/ F
runtime today. , u- O: F- ^3 O6 t& ?
& @# f# U. j* ?& Q* F5 U. x ) a2 `; o: n7 [! l3 c: H. X Question #14 There has been mention of being able to derive C# classes fro ! F Y: U4 [8 W9 `* Q' P
m VB classes. Is this true and where can we see an example of how to do this 5 I) N& X! N! B& {) M- k? 2 y( V Q9 i7 E m : w3 S: o8 Z- s/ Z Answer This is true. In fact, any language that targets the runtime can de . n" q3 W! U$ i; P1 A! M
rive from any type created in another language. Also, the Visual Studio debu ' H3 q% ?# E) n7 N" Ngger fully supports debugging across languages. Each entry in the call stack ' V2 q/ q4 @5 u$ Y8 {4 a7 Y* `( f window shows the function on the stack and the language that the function w - H6 p+ E; V* o9 n8 p* ?; das written in. This is very cool and got a round of spontaneous applause whe 2 Y; U: y, f$ i" s
n shown at the PDC. There are samples in the .NET SDK that demonstrate how t % @9 t1 B8 ?' a) r9 ~o do this. It's really quite simple. Actually it just happens, there is noth 3 F+ c/ b+ f- @& S& N( y
ing for you to do. You can also throw exception across language boundaries a # C$ J: _1 G3 z6 X8 y5 n
s well for error handling. # B: d/ B# I+ Q: e 4 N/ Z/ B% g" L5 }" Q/ w7 C! p$ z( J
5 x1 G4 c2 ~9 \) O
Question #15 Can I derive a C# class from a C++ class? If so, how? 6 @6 D9 D% j* p" ]% }
) |/ y/ J4 U' M- ]/ z6 m Answer Same as the answer above: Any managed language can inherit from a t , y+ M K7 v) ~ype in another other managed language. If you use native C++, then you can't $ @% Y2 \& C0 y# n" ~3 h; f; S! z7 Z
do this, however. 1 X9 j0 c# N7 @
- h2 a& x, H/ J+ @( L$ B * T' h* i. a- P; g3 v% Q; v
Question #16 Will the new version of MFC have the option of working in a m 9 }* t5 |' Z" n. d
anaged environment? W5 s$ v; Q" y4 ^8 c s; [& |/ j; o& B Answer I haven't been tracking the new version of MFC but I'm pretty sure 8 m, }; M9 V5 V) g; i7 r# dthe answer is no. MFC is all unmanaged just like it has always been. For man - O. }# O$ u5 {: n; _; Aaged applications, Win Forms is the window manager that people should use. ) M$ m) \& B9 t, I% n6 d! s A$ i" X 1 o( w; E2 Z+ d2 L+ K
, d" P% a* x- a/ b/ e: j
Question #17 If the new version of MFC will operate in a managed environme ! P4 ], s, B; O- A( y( V
nt, will it have the option of building desktop Win32 apps and not needing . 8 L8 p& K! C$ G1 |8 o8 ^
NET runtime support? ; e& {+ ~( e. [: f& s
+ S" x5 N& V2 z' f% F# N% y/ Z" C Answer I'm pretty sure MFC is unmanaged and will never require the runtime 3 t4 S, q' X; @ \4 ?0 Q g" F) b' }. 5 l( }+ F) a# h9 U$ n3 W ' o1 K6 [: [+ H- o 4 W- q8 J8 X5 j2 V! u Question #18 Stroustrup has been quoted as saying "I have not expressed a % I3 ?, t o2 w; D9 f% btechnical opinion on C#, and I don't plan to do so. C# is yet another propri ! Q; X. G; e* D" h. e" `1 |+ betary language specialized for Microsoft's Windows system." Do you agree or ; N0 n# k( o- Q/ `+ x$ H
do you think C# is more of a generic language open to other platforms? 7 U% b; R; N1 C4 h6 f1 w
" _& g3 W: y. i; s0 o! q1 m
Answer C# is a language designed for the common language runtime; not Wind + {1 r$ O% e4 V( J; w
ows. The CLR can be ported to other operating system like Linux and Solaris 8 B/ i! G+ ^2 K" wand if the CLR is there, then C# will probably be there as well. In the gran - l, c8 j) X& ^
d scheme of things, C# is not that important or interesting. It is a syntax + ?0 G$ `; J2 ~- o$ nchecker that spits out intermediate language consumable by the runtime. You ; e, i0 K5 a! o
can love C# or hate C# - your choice. I happen to love it and think is the b * g, e: t, Z% H8 ~ Vest programming language for the types of applications I write. 6 H9 {, S3 H, l& K0 P3 x
% S l- v7 O# a9 M$ t/ F
+ d: \! f5 M! H5 Y( t& ]" l
Question #19 I heard a rumor that VB7 will allow static linking of the run 9 p: V6 H) L; G7 t6 G: Ltime, like MFC. Is there any truth in this? If so, will C# also be able to c ( C% M5 _% e' q& a- x" c- E
reate standalone apps? 7 P, G- B/ @$ }1 m
: C; _; D8 W1 O S3 Y Answer This is absolutely not true. No language will able to statically li , @0 H( j& h- X. `5 S+ z2 V
nk to the runtime. . ~3 t; J5 C2 b% e4 |; E0 Z" Y 4 ~% f- o: m) v9 }7 r4 r
" W- b7 t# {% e% e, {4 ^) ^& J Question #20 Does C# still use resource files? If not, what mechanism is p 7 ?4 j! Q' r) V% H# A7 x( n
rovided to allow for localization? - g# e- a) c9 r7 N
& D8 K% }* `6 n& r/ f. C" y Answer The .NET frameworks designers have created a new resource model. Re 3 P% G% u, A ?7 H% s, a/ L
sources can be embedded in EXE or DLL files the way Win32 resources are or r ; t) N* r* l( H& |3 Z( D/ nesources files can now be stand-alone files like a single jpg or bmp file. T 5 b4 O. S9 T) l1 Ahere is also the concept of fall-back cultures. If the Swiss German resource . s K% x4 N }; r1 ^
can't be found, the runtime looks for the German resource. If the German re 2 X- a. D* x4 m! R$ I! Msource can't be fond, it looks for the "default" resource. Each language wil 5 M A/ E9 c |" B2 k# y5 m9 ^
l typically be built and shipped as a separate assembly rather than packagin ) K) O0 j- X0 M) R% X* V4 Q
g everything up into a single file. Like code access security, a full discus 5 }3 X9 A3 [4 h, U8 I* P+ [
sion of the new resource model is too much to put here. 1 W) G+ @' M9 @) S) Q, }: G4 N ) W- V7 r$ q/ E% R) c5 V3 u" [
* @' d+ n j) a. o# X0 p
- a1 }/ U p) ~: @. Y . X1 d3 N9 M: U6 G5 @
wenyy 来自 <a href="http://www.vchelp.net" target="_blank" >http://www.vchelp.net</A> : # F6 v% n" [5 b8 v2 @; i+ ? ' [( B$ u, u( D: n+ F4 K$ K 我想应该这样说,一种新语言的出现会在一定的功能领域上替代其他的开发语言,以 3 [' E6 g0 P. K3 y; N, u
前的开发语言的使用范围会缩小,但不会消失。(就算是出于保护现有资源的目的) + h+ i. v" T8 _: ]4 J6 E ' Q6 K, j- d% Z5 c9 k8 K1 F
但没有一中语言是十全十美的, 3 P9 T+ B7 ^0 o. r. x4 K. t9 ~