5 Z3 v: e) I3 [- _5 h, D0 [ 8 ]# d( z+ y2 h9 `/ X. ? C++Builder的VCL比Visual C++的MFC先进的另一个特性是异常处理。但令人啼笑 + }8 e0 O5 O. ^+ [皆非的是,它的异常处理代码有bug,有时会无端抛出异常。不知道在最新的版本中有没 + y% v, @) B/ f
有改正了。而VC的框架MFC也不是一无是处。经历了那么多年的发展和完善,MFC功能非 9 M. K" ]4 d( @4 W% y3 k
常全面,而且十分稳定,bug很少。其中你可能遇到的bug更少。而且有第三方的专门工 4 G% l! _ u. p- X具帮助你避开这些bug。如此规模的一个类库,能做到这一点不容易。不要小看了这一点 4 t g# r; W; k. [- u,很多专业程序员就是为这个选择VC的。而C++Builder的VCL的bug就相对较多了,而且 / |9 S w- V" R& h; |; N
有些它自己带的示例程序都有错误。看来Inprise还有很长的路要走。 " @9 M: U* J- O' T/ s% e' g. K: @
1 K7 `9 u7 E+ z" G: I
) e, C0 }( W; O: u3 g 再从它们的易用性比较。VC有ClassWizard、SourceBrowser等一系列工具,还附 * e& y4 J, G+ j- P) E带Visual SourceSafe、Visual Modeler等强大的工具,易用性非常好。(VC自带建模工 ; E+ p( ^2 {: y g
具Visual Modeler,也许说明了它才是工程级的开发平台,与C++Builder的定位不同。 ( e; \( i. Q2 [4 q9 j)它所带的MSDN这部“开发者的百科全书”更是让你“没有找不到的,只有想不到的”。 3 M; X1 t; e( O* B, g* D
而且它的AutoComplete之类小功能也比C++Builder要体贴。C++Builder的新版本虽然也 / l* `( J. E$ [7 [5 ]' e, l0 h
提供了这一功能,但它的提示要等好几秒才出来,有时你不经意间把鼠标停在某一处, 9 M# S5 k- F3 p! g9 Q- L! m a
也要等硬盘响好几秒,这可是在566Mhz的赛扬II上呀。不要笑我琐碎,有时一个开发工 ) O) a4 q; Y ?+ k
具的成熟和易用,就是从这些小地方体现出来的。C++Builder作为RAD工具,理应强调易 3 N# S. d( p3 j2 U g7 f1 D. s
用性。但与VC相比还显出不成熟。这是不应该的。 0 x8 m+ T4 b: P! V6 W. q( G2 f+ ?
% J& p: v X4 k* m
3 I- Q4 z' A/ R 我们以前开发应用程序都是依赖于平台的功能调用,mfc,bcb都是这样.而现在日益火热 9 I' x. T: L* E+ a# `的internet编程却最不想关心的就是某一个平台的调用,譬如说要实现b2b的电子商务那 3 x6 c& R$ |- Z, d' A- o么就需要做不同平台的集成,如果我是程序员我最care的就是如何实现商务逻辑 : t Z# j( Z) t 7 o( W. z" Z ~4 U: t
而不是各种平台之间的通信和管理.那么我们最迫切需要的就是一种与各种平台调用无 3 ~+ Z1 B( g* k) A2 `8 E1 n关的语言,这中语言只注重程序逻辑的设计而不涉及平台的调用.而我们熟悉的c/c++却恰 ( k$ B9 q2 L3 R4 T" ]" N
恰不是为这个而设计的(赫赫这也不能怪c/c++在70年代谁能知道现在internet的情况呢 ' c+ |1 m% l! p8 `( |2 D3 S- S3 W
).c/c++的最初设计目的是为了设计unix产生一种介于汇编和高级语言之间的一种开发高 ' p8 a# |/ h6 D P4 L8 Q
效而性能不低的语言.他要比其他任何高级语言都要关心系统的物理结构,譬如一直是毁 0 R+ p& o! }( Y3 n4 m/ l( N* s
誉搀半的指针.指针之所以强大就是应为涉及了系统物理内存的管理.他可以使得程序员 , n0 U2 ?' r( a4 B9 ~8 n) ]
和系统之间成为一种半透明状态.但是就是这种半透明的状态让指针带来了更多的不稳定 2 r) ^6 g+ r+ ~ c3 w1 K4 X9 V
性. + I* c/ E8 L" N1 ] z7 ^
8 Y. j/ m4 L/ V' a" N& f0 R
c/c++在面向Internet的编程中却无任何优势可言.跨平台的电子商务软件最害怕顾及 ' H8 F& f. {0 c8 D6 j' Q( z& r
各种平台之间的天差地别的系统调用,最害怕时不时的由于内存泄漏而crash.c/c++的优 ; V! ~, K% y' x势在这里却成为了劣势.即使在windows平台上开发基于windows dna的solution / T" R0 B/ v* j6 I+ \, W
! J _$ a: R/ U 用的最多的还是vb做的dcom而不是vc的atl做的dcom,因为c/c++虽然高效但是太容易 0 \" v* y: C# I4 S/ h y9 e) Y" e: _ , m2 T1 ~1 C8 V9 C( _$ b
出错,如果不是很小心的释放内存nt很快就会资源不足. ( V5 m9 M0 ]2 q # L3 o# {# q# U4 {$ X$ |' H- k
java就是最先看到这种情况,他用jvm实现了平台无关用内存回收实现了稳定健壮.但是 * }! h( O( E: A! N- H相当多的c/c++程序员抱怨java太慢了.的确即使到java2速度仍然是一个大问题.我曾经 9 M! Y( m# f% X- |5 z是一个c/c++坚决拥护者在许多论坛里和java程序员打笔仗.但是我逐渐意识到面对与in 4 m. g3 d! i5 I0 w% C
ternet平台而不是特定的操作系统的时候java的速度问题往往是一个小小的瑕疵.我们可 8 B9 K# y7 P- O2 K: a
以想象那一个电子商务网站会用我们手头的pc做服务器,他们不是sun的e1000就是ibm的 - C+ Y: H! e# L! \8 \: u& i T, rrisc6000.在这种平台上java这点速度问题只是a peice of cake.程序员只需要专注与商 * G" w. h4 R: I9 D" I务逻辑的编程,而不必要关心数组是否越界,对象内存是否释放更不需要关心是不是unix * N/ p9 b6 l1 ]0 E+ j+ d8 ?5 g6 u
和windows的系统调用不一样. % {6 G8 F9 m3 F6 A: }, ?$ m! R 7 x1 {* j- x7 ~) H) y$ D: [! W 微软的c#可以说是一种java与c/c++的杂合体,他可以回收内存,可以平台无关.但是 : q5 a9 a: O, R3 `) u
+ u/ {# t P; h. E
他又可以实现一些java没有的功能譬如在标记的程序段内用指针自己管理内存,可以实 1 A9 m" S+ e2 q' T) `现操作符的重载等等.为什么要这样做我想也许c#还肩负了一定的面向操作系统开发的任 8 t7 G, k" f* N& d: J4 c: a1 q务例如winform.他基本上的思想和java类似,但是实现的方法又不一样他不通过jvm解释 ; I- G3 [% G+ q( t% J% h: Q+ U中间代码,而是吧源代码编译成p代码然后通过CLS库和JIT在平台上及时编译为100%的本 $ C: b+ C' U' A. t" D$ ^1 I" W地代码来执行.他的pe代码是独立于平台的,但是cls和jit却根据不同的平台而设计.因此 4 h" y/ E, R+ V+ u- q) Q1 `3 W
c#的平台独立有点类似于c/c++在不同平台上的移植使得c#比java来的更快.而且微软还 0 T8 ^5 v6 A7 C* j许诺cls和jit不仅针对c#还可以针对任何语言譬如pascal,smaltalk,basic因此将来有可 ) f8 ], N/ Z" y5 i
能所有的编程语言都是可以平台无关的(ms真是毒,所有的语言都平台无关java还有什么 7 |6 v/ w3 f* ?4 g
优势呢,据说ms正在开发基于pascal smaltalk的asp+). # e+ [- A' ?: y) M3 s8 d- o 7 g V1 v7 y- @0 a1 B- |" l
xml很多人可能认为与html相类似的语言和c/c++,java,c#完全不在一个档次上的语言 : V0 l: F+ x% R+ f8 |
.其实不然.我们知道不管是c#还是java都是通过统一地层计算来实现平台无关.那就必须 8 z; q% n8 F4 G8 R, r
在性能上付出一点代价.而xml却能够实现不同的语言之间的调用.譬如说一个网占用jav ! b2 z% J8 Z6 ka用bean实现一个出货功能,另一个网站用dcom实现一个入库功能 .如果这个网站需要实 1 T7 ]6 k# m8 d4 i! ^8 b( C
现b2b,用一般的方式就是在他们之间写转换程序.而xml通过标记语言来描述各自的借口 ! Q3 U% @2 I" T$ R% t1 c
特性.两端通过解析xml文本来实现互相的调用,无需任何中间转换程序 , K1 O. k V) ]# g; U9 p! o$ w
5 W, l. F" w X6 A+ x: D& p- I' R
只要一张xml文本就能实现bean和dcom之间的通讯(要说清楚其中的机理,需要很多xml 8 \3 |- a* C1 N3 w1 l0 y
概念如果有兴趣可以到msdn.microsoft.com/xml或者<a href="http://www.s3c.org" target="_blank" >www.s3c.org</A>去看看).目前ms的.ne 7 f- H0 M. Q$ I- Et中最核心的技术soap就是完全基于xml的远过程调用. ' M. b% w/ J, c. O e9 h: t
* ^* h9 l. z; D1 |' ~* G( j1 s
介绍了那么多可能有点跑题,其实我最想说的就是21世纪的程序员应该从面向操作系统 ! W5 I, o- ^' v$ z$ M' L; y+ Q2 W的传统方法中走出来,学习一点如何面向Internet平台编程的技术和概念.不要在无畏的 ; w3 E- q$ S! Z9 o: t2 t- V
那种c/c++工具好之类的地方争论.我想不出一两年不管是bcb还是mfc都要淘汰, ) z" D& N& L/ V7 x " u& I% g1 d& J: U" F$ P 到那个时候要争论的不是bcb好还是mfc好而是c#好还是java好.至于xml那是不管sun和 # s6 a! D: o2 b$ q% d$ v+ sms以至于世界任何大的IT公司包括Intel,hp都在奋力研究的技术,不学习可能就要被淘汰 / x, g3 l8 d% I.至于c/c++可能就会沦落到现在汇编的地位在某些系统效能敏感的地方还能见得到. 0 x3 K" S+ l* m6 d' l - R. U' w* m: N8 O" ? 如果是编程语言的初学者那么我建议学习java同时关注c#,他们首先比c/c++简单没有 + U6 [% j9 E6 K1 S复杂的宏,指针,摸版等等让人摸不招头脑的概念.而且是完全面向对象,比c/c++的半调子 * G4 ?! \0 T1 p- \- s3 q* X
面向对象清楚的多好学的多.(我推荐目前学习java,毕竟c#还没有发布而且刚发布的bet 2 N1 e5 P( \+ c: C- Z- E% Pa版的编译器要求高的吓人需要win2000 adv server没有128M内存的别想跑.话说回来c# " u0 e8 I; h5 U% Y+ d
和java一摸一样没有什么太大的区别学好了java将来的c#将会信手拈来) ! E, h: r g# g6 L% J. A
7 p1 G& L: N, J$ V* m" p 对于目前的windows下的编程者来说学习mfc的价值还是有一点的但是不是太大.至少可 + D5 B4 f9 J- O4 `以熟悉windows内在机理.但是我还是推荐关注一下c#将来的windows.net都是基于c#而不 4 U! R, \4 r; [1 [
是mfc.而且c#要比mfc简单的多实现一个同样的windows桌面应用c#的开发速度是mfc的两 q# ]. }0 W: T r
到三倍而且几乎看不见性能的损失. visual studio 7.0中 vc将是一个次要的开发工具 1 k$ I) l* O* H, T最主要的开发工具就是c#和vb7.0.至于borland我想是不可能不跟着ms走至少windows平 ( p7 T- K; ^2 `% u. s$ z台上是这样说不定明年就有一个c# builder出来作为borland的主打产品而不是c++buil # Q+ ?4 p; g! E6 X( G2 L9 P
der了.说一句玩笑话wenny说不定很快会把这里变成<a href="http://www.c#help.net" target="_blank" >www.c#help.net</A>了 : X* F% w) x& e+ j; p- l! H5 p0 P 0 e1 ~0 l, g3 l% i ) d/ ~ }' s3 v
2 ?* ^/ Z+ i( w* ^7 ? T
2 Z- G0 y2 k9 @% t( w/ ` # U. y6 C. Y+ L
zhangxiuyong 来自 <a href="http://www.ucancode.com" target="_blank" >http://www.ucancode.com</A> : + h' e' J; F U$ s. R5 t7 I* k0 P( f8 v
; [$ \7 R( b! S* c% e& r
其实我认为,对于Visual C++本身的理解不是向你上面谈到的那么简单,Microsoft 6 ]+ S6 s2 M8 R$ @在开发Visual C++的时候是希望为其开发人员提供一个可靠的开发平台,便于用户可以 9 x# {( u2 x: f3 j8 p# |6 v6 w
为Windows上面编写各个方面应用程序,包括:数据库应用程序,硬件驱动程序,网络程 2 F; x" G& O" h7 H: |( e. m
序,多媒体程序,游戏程序等等方方面面,试想如果一个开发平台要同时完成这么多个 / ?% H5 U& F l4 @
方面的开发任务,是需要考虑多少的问题,因此Visual C++在设计的时候就考虑了提供 7 W; u, R1 T' a9 N4 g一套类库而不是直接提供黑匣子式的开发组件来完成开发任务,提供的类库MFC具有很灵 : a+ E! @/ Y& G \. x' k3 x, i
活的设计结构,以及良好的继承性,同时配合DVS文挡视图结构来组织程序开发,虽然我 ' J' F+ g$ m& \' {0 o$ m
们承认利用VC开发程序(数据库方面的程序)没有其他的RAD开发工具来的快,但是如果 " p* v f, Y$ c. l- p2 }% ~4 q
你真正利用VC来开发的话,你会觉得你不会去选用其他的开发工具的,对了各位听说个 # _7 ]; |: g- [$ G& B
多少开发人员是从VC熟练的开发师转向VB,Dephi的开发工具的吗,当然DVS结构本身也有 ' t/ X9 V7 j/ F1 g# m
其很大的弱点,如很难重用。同时在CView中再嵌套CView的变得不可能。不过对于开发 , n. U# s; |" `. C% _中小型的程序(代码在50万行以内的程序却是可以的了)。对于特大型的程序我想最好 & A7 E, _4 y6 m: p) F可以借鉴一种新的技术叫做MVC的开发技术来组织你的程序吧。好了各位此些文字,仅代 w- x' N$ x! h+ ~" K; H8 Q表个人之言,如果各位感兴趣可以到:http://www.ucancode.com上面看看。 5 A2 S- H- E) i6 W* b* {
3 z, t2 |( b+ L3 p" _* f0 Z0 L zhangxiuyong 来自 <a href="http://www.ucancode.com" target="_blank" >http://www.ucancode.com</A> : * [1 D9 B @$ h4 K" r1 F% T
4 x; `0 I$ ~$ b- n1 [$ ? 其实我认为,对于Visual C++本身的理解不是向你上面谈到的那么简单,Microsoft 2 P; Z4 D& J* E6 F- j
在开发Visual C++的时候是希望为其开发人员提供一个可靠的开发平台,便于用户可以 & f! z/ p3 I! Q# y
为Windows上面编写各个方面应用程序,包括:数据库应用程序,硬件驱动程序,网络程 ) v) E, l* B0 ~# b( y
序,多媒体程序,游戏程序等等方方面面,试想如果一个开发平台要同时完成这么多个 . m' }2 \: l4 |* l$ j# I7 z! y- F
方面的开发任务,是需要考虑多少的问题,因此Visual C++在设计的时候就考虑了提供 : x1 b/ _# K) x7 y; P2 o% f一套类库而不是直接提供黑匣子式的开发组件来完成开发任务,提供的类库MFC具有很灵 5 Q `, D& k9 a: C# e6 M
活的设计结构,以及良好的继承性,同时配合DVS文挡视图结构来组织程序开发,虽然我 : O$ d4 s7 ]/ V5 |9 a
们承认利用VC开发程序(数据库方面的程序)没有其他的RAD开发工具来的快,但是如果 4 B8 _8 E) ?4 c- x3 M
你真正利用VC来开发的话,你会觉得你不会去选用其他的开发工具的,对了各位听说个 9 E. z# N6 e# U! E9 w2 A' k多少开发人员是从VC熟练的开发师转向VB,Dephi的开发工具的吗,当然DVS结构本身也有 3 `! `& z% E) h, Y其很大的弱点,如很难重用。同时在CView中再嵌套CView的变得不可能。不过对于开发 3 ^& l# g# E3 X% [% y" |- V1 J
中小型的程序(代码在50万行以内的程序却是可以的了)。对于特大型的程序我想最好 ' Y3 T7 F4 _+ U6 M6 G可以借鉴一种新的技术叫做MVC的开发技术来组织你的程序吧。好了各位此些文字,仅代 5 e3 ~' @! b% p* t: m2 q表个人之言,如果各位感兴趣可以到:http://www.ucancode.com上面看看。 : Q: ^0 p2 t/ j; N) e& Q* }
) B" N8 [. c1 ? r
zhangxiuyong 来自 <a href="http://www.ucancode.com" target="_blank" >http://www.ucancode.com</A> : " g p; [- l1 i+ b( z6 O" a. z5 |
/ I7 M* Q3 u8 A( m K) l
其实我认为,对于Visual C++本身的理解不是向你上面谈到的那么简单,Microsoft . } G0 H: T* V在开发Visual C++的时候是希望为其开发人员提供一个可靠的开发平台,便于用户可以 ; ~4 l1 E2 t+ E' R* c0 I
为Windows上面编写各个方面应用程序,包括:数据库应用程序,硬件驱动程序,网络程 . v/ F. [8 q5 t$ I* K w8 W
序,多媒体程序,游戏程序等等方方面面,试想如果一个开发平台要同时完成这么多个 ' p7 Y. c* y. M4 p方面的开发任务,是需要考虑多少的问题,因此Visual C++在设计的时候就考虑了提供 7 E# L+ K3 g; {一套类库而不是直接提供黑匣子式的开发组件来完成开发任务,提供的类库MFC具有很灵 . |' f# [, N2 {5 {; b( M9 E$ W
活的设计结构,以及良好的继承性,同时配合DVS文挡视图结构来组织程序开发,虽然我 9 f1 h( l! J1 W们承认利用VC开发程序(数据库方面的程序)没有其他的RAD开发工具来的快,但是如果 ( X- q; x0 }" T' r9 w4 s
你真正利用VC来开发的话,你会觉得你不会去选用其他的开发工具的,对了各位听说个 ( {$ b+ |: u2 J9 r: W. I7 L多少开发人员是从VC熟练的开发师转向VB,Dephi的开发工具的吗,当然DVS结构本身也有 c/ B2 Q7 S4 Y) F/ L
其很大的弱点,如很难重用。同时在CView中再嵌套CView的变得不可能。不过对于开发 0 y+ v# p- I f# L2 M% @中小型的程序(代码在50万行以内的程序却是可以的了)。对于特大型的程序我想最好 : A. r% Y% i" `$ G& Z
可以借鉴一种新的技术叫做MVC的开发技术来组织你的程序吧。好了各位此些文字,仅代 / F& p f" A/ u5 K. d" R表个人之言,如果各位感兴趣可以到:http://www.ucancode.com上面看看。 H! Q4 M/ A* k2 L ' ~' h& w6 h i+ r
wenyy 来自 <a href="http://www.vchelp.net" target="_blank" >http://www.vchelp.net</A> : * W4 a. G; t, Z ` 5 M0 s) [- R) V5 m+ H) a
我一定程度上同意 恶魔吹着笛子来 的说法, ' D9 s; @9 [* ^0 p 5 J0 P' u! U# Y
毕竟VC开发速度是比较慢的, 6 p1 } m* w* Q' n ' N* f( A9 M- ^! c 而且硬件速度的大规模提升也为使用JAVA开辟了道路, 4 Y* u2 |2 c* Q e" A- f4 M6 w4 A
* s. P) v/ R5 D 不过microsoft.net的目的是一定程度上改变MS的经营性质,和开发关系不是很大,但 ! T. x0 C* W5 v. L
是MS的一贯方针都是在平台上为开发人员提供方便, 4 i, L% Z' V8 C8 U% Q) H # ~) L. y% q1 m4 ]
所以C#是为了.net服务的。 6 f# o% [% ^8 A: m; _9 o. M! W
5 O3 g2 ]- C7 {! _
9 B* ?, [8 C, J 此外我想我没有精力再搞个c#help.net了。:-P 0 F& c: K( A- t* A- s
+ r! r& ]7 V9 W1 G
果子 来自 http:// : ! J, Z: m- N+ M$ Y5 [. O! [2 S: |, V
1 P4 M& A7 o# E9 n4 r
"恶魔吹着笛子来"是比较“前卫”的一类程序员。我就听业界的人多次说过JAVA也是 / I$ L, Y/ ~6 K 8 N" f) l4 Y8 t2 e8 _3 Y ( g6 o( h" Z; R. ?# }* E, o. P. a
个吹得很响的东西,但实际如何,大家都看得见。至于认为C/C++开发工具(VC, 6 _4 c' a% D! ~2 n) z# i
. i, g, N: f7 a
BCB等)会在一两年内退出市场,就是无稽之谈了。 # y, @6 V$ Q* H. e Y( h
8 e! g2 Y. v% {- g0 g7 B+ J
Wesley 来自 http:// : . {7 r) X. b# ] Y! @
3 b* }+ R" ]$ A( a( M 恶魔吹着笛子来,你的观点很有启发性。能不能写一篇或推荐一篇剖析、比较Java开 & l3 M8 w: ]) `* A. q6 R
发工具的文章?比如Visual J++, JBuilder,以及Symantec和IBM的对应工具。(可能和 % Z& L: ^) A( r l" `本站的初衷有些不合^o^) : W/ z# c0 s$ F5 ~- {7 V
3 M0 y, X/ C; s2 T LeoCN 来自 http:// : % ^' k. F, S: h" g
+ } t1 S, J$ d* b/ C: l( i+ s3 r
It's not a time for us to determine which language will more better! / K3 ]& f4 n3 _: T. z
3 J! X. f; u$ W# Z; V
in factly,In China,too many corporation just writting some codes for 8 F! _% M( y! U: c( {
$ J1 x: ?$ Z7 s enterprise's MIS,OA,ERP or other application.It do not need so speed - p4 d2 A7 Y! x" D : n/ x' c8 \/ L+ _
and do not need so good original code. just want more data,more easy and m $ ?! I7 I6 t- w/ v3 C7 eore quickly. : `' j1 p4 u T4 `$ A + L/ P; [: r8 ^6 K; y so c++ is not a choice in such enviroment. and u know,many codes we write % _4 r/ n+ C @$ `/ |+ ^/ ftoday will be useless.and there r so many easy tools such as VB % W, `' t [$ y4 c4 \: w/ C5 Z" s i4 E" }$ L$ \' O/ ]' w1 B. O for windows designer, Developer/2000 or PB for database,Domino Designer fo / x* Q! `" l0 p" X) a. Ar OA application,why c++??? 9 s) y# ~+ b" U' l7 f# x5 {
# g, m; v6 K/ }! \) B; F3 H in DOS mode. i like Turbo c2.0, with it and MASM i can do everything. * \4 {- v+ @. ~5 t3 j- l
) ~! B! z1 H! r
but now i hate c++, it has waste my time! my corporation do not need 4 l$ \- \) _' E/ Q- S; z + `) q$ F# `2 r7 Z c++,just need java,xml,php,pb,vb,delphi,developer/2000,domino designer etc 4 }2 }/ T' M0 P8 v! `0 q. 2 Y1 m8 a: i/ w \ e/ g % K/ k" \8 z# z8 F. Z so, a tool is just a tool,if the advantages in some aspect of the tool 1 J. w) p! y3 N: P6 o4 P 1 L7 v' }+ @" M, ~" p2 `
u needed. it's will be a good tool for u. others it can bring u unfortunat 7 @! M- {7 D( @( u* B) qly! - b+ n2 m% |2 K
$ j' _! S' E" Z6 j+ p' i' H/ z, d 恶魔吹着笛子来 来自 : # N8 w/ t: x# l1 z: ^, v; k+ G5 ^2 P4 l 9 @6 t3 W# S1 M O 果子,国内的Java应用不到10%基本上是ms的天下.这些可能是由于中国软件业规模太小 , Q% @) L V [. m- p. p
的缘故.而在国外40%的商务系统的开发都是Java,c/c++不到10%.譬如BEA公司一个有3个 ) \7 L3 P( @9 G |' Ijava程序员创立的公司开发了第一个基于J2EE的Application Server---weblogic.BEA公 7 r* ]5 M& i$ g; P6 y* T4 c
司依靠weblogic在短短4年里成为世界第四大软件公司仅次于CA公司.可见JAVA的功能是 4 v7 S8 k4 q" ^; P+ p7 \+ W
如何的强大.微软的.NET的负责人说,你们想要知道.NET是什么样子,那就去看看JAVA.JA + p9 S: X( f8 i l/ ^0 [: n9 f; O
VA是什么样子.NET就是什么样子. 7 V& t/ u. V) Q4 b 8 s; B' C9 |* j- L" [ 5 m, S( H* H2 `2 o0 `) Z- P : z7 u- m- ^7 x7 D2 Q7 k
恶魔吹着笛子来 来自 http:// : 7 v' [& j- h6 ?6 @# Q% N5 I
8 B: i. C6 k! i+ z- L# i Wesley你好.关于Java开发工具的问题.从我的观点来看,目前的Java开发工具没有一个 / e6 t9 w9 [- }! i4 Y令人满意的.最主要的是,在技术上考虑的太多,却不像MS的开发工具考虑到程序员的方便 . V, y/ d( M& p7 @2 d/ p! k- ^8 A( L& m(vj++是另外一会事情我后面会讲). , C4 |8 c7 U% F: [1 B; z6 X* o, c
9 a0 T8 d# z: \
基本上流行的是sun的jdk,ibm的visual age for jave,samtic 的visual cafe,和bor @0 C0 t3 _0 @- ^: P* D- Eland的jbuilder(vj++基本上没有什么人用). 0 J7 h0 [3 P6 t0 q. \( Q2 f " n F! ^5 w5 } J
在这几个工具来讲,jdk是老大哥,但是仅仅是一个command line compile.在某些方面 : |% d. H7 e$ E6 [# C) e
用ultreditor+jdk会比较方便,譬如你的机器的配置比较的低(memory<64M).一般来说,几 2 P$ _5 S4 |- f# j& b乎所有的Java工具需要的机器配置都比较高. . d O" Q' o0 s4 c; N$ T2 D
e4 U! r* o8 V( w C9 z4 W5 B MVC=Model, View, Controller Design Pattern J/ a/ o5 p* [& E5 e8 X + v5 k/ u( i6 z# Z7 a* o
" [6 R3 ? U" ^6 S
9 X1 a; j; m9 e& n U6 p# ]. K+ c# W
xubin 来自 http:// : & \2 T/ k8 P8 H 2 x6 S% g* m8 t" A+ C 在工业控制中,直接对I/O地址操作,就要用C++。 . b% K+ Y& X' g) i2 A
4 t# Y$ H/ V+ @( {: q 恶魔吹着笛子来 来自 : 0 B K* E; L+ n5 z4 W; ]1 c 9 W5 y& @7 J/ s2 ^/ l2 X& p( G7 V
俺有一个同学毕业设计用VB做单片机。你这不是在讨论问题是在抬杠。 $ r0 H" u, a0 {9 G A' d5 M0 g( U : S4 _8 ~9 L: @' I wenyy 来自 <a href="http://www.vchelp.net" target="_blank" >http://www.vchelp.net</A> : 0 Y7 B, ~# F. ^+ I( |
B) l+ |9 N9 d3 D 我想一种语言并不会因为其他语言的出现而消失, ( Z/ w1 t7 n$ k5 q! B
; f5 c+ N. h# x" T, X% R
比如说c与C++,C++与C#的关系。 & C B- S( Q* \7 [6 V- L0 [! y 0 _5 J* \' ] S! n) P. ^/ K5 H. `
所以我想讨论问题时首先是要排除敌视, 5 G- y+ ~8 ^7 @/ l
7 v6 c# F8 u: W% P 然后才是透彻的分析。 + p" o! S7 c8 y4 m3 {$ m
" E6 _/ m0 r d+ L; ^
IT世界不光只有网络,还有其他很多。 7 R+ q3 o' z, u9 t5 B . c0 P0 g0 x& y1 D 所以某些工具在一定范围内适用是正常的, 3 g' L7 n1 U% H, |" v # n+ u/ W! X$ k$ C9 L8 I( B 其实在国外, & N2 S. X2 k) C
9 f8 i. o0 W# D0 {5 k' R
SERVER端软件大都用JAVA,而CLIENT却没有多少用JAVA, 4 x, T/ m. G( s* A" I6 n B+ F ; z) e2 D) s% G
这和速度有关,当然也与MS对JAVA的态度有关。 6 p6 W: h0 O) P . E7 O/ f m$ d9 o; n( x5 K2 d
! Y- k5 u4 H$ B* K5 }* H3 f0 J 不过我一直认为C/C++不会因为JAVA的出现而消失。 % p9 ?1 H! R: G" ]1 e5 s2 w8 W
1 x, e- c: v9 q# w% x. u& O
就象COBOL目前为止还在使用一样, & f0 `1 ]' n) y- D a) a* S z6 W
# ~# a' Z1 G. i' ?& J' z& @ , d/ w, U5 k# a8 y; @& l6 a 不过以后会有愈来愈多的解释性语言出现,因为解释语言比编译语言的兼容性好,这 & {4 k& @0 F) g0 H: E, Q) W2 M2 x
是不得不承认的。 # _2 z& |2 \1 X# f+ X( D' V; ^ ( S3 ~2 L/ d$ y0 I5 w, f 恶魔吹着笛子来 来自 http:// : ! C5 e0 e* y/ p6 L% r3 M % I$ H0 Q. Q: F+ ` 是的wenny.也许我说c/c++的消失有点夸张化了,但是实事求是的说.java和c#的出现 : B C4 n( n' u* a# ]
+ l- x) |- B8 l" t. p/ e: q
c/c++的升级换代是在所难免的.对么. * _; y0 d$ m9 ~8 C: s / c( N4 a7 q/ o! \. a7 J
恶魔吹着笛子来 来自 http:// : 5 X) N9 @: \, N$ u8 c; i. c* J& G
9 t4 J+ N/ `% k# |" F 而且我一直认为java和c#不是另外一种语言而是c++的升级.就象是c到c++的升级一样 - K8 p& w2 m. B0 F- t3 @* \1 f; T
.对不对. * w3 E/ A& N5 b2 E* M! t! E% g3 l
4 T" q( d3 G9 A; c xcc 来自 http:// : " B7 l( E2 v" M8 A0 C( z
) }" Y, J* O+ Q# @7 } 同意恶魔吹着笛子,你简直是我的偶像,顺便贴一篇关于C#和.NET专访 + {/ G$ }6 X/ s ! ^7 k4 |; Q( [7 V1 w NET and C# Questions with Jeffrey Richter 6 K8 y- y8 V7 N! c$ [0 K8 Q- |
- o& T' @3 J$ Z- W& q/ b h
In the weeks after Microsoft made a huge splash in the development communi 9 T9 l9 i5 i8 h7 k! t/ Q6 Mty with their .NET and C# announcments at the July 2000 PDC, Jeffrey Richter 6 `, C* ?, S3 q/ U
accepted our request to field 20 questions from our readers about these new 4 a0 m3 V5 |2 j/ T& y& u
technologies. As many of you already know, Jeffrey is a cofounder of Wintel 5 t% n- L) w/ z3 \' u
lect, a company that specializes in Windows & Microsoft.Net training and deb ( m# G8 b* r6 e- h
ugging. Jeff is also a consultant at Microsoft working on the Microsoft.NET 5 }$ L: D! v; f7 s- F' W/ i; |Common Runtime Language (CLR) team in which C# and Visual Basic 7 applicatio / o+ i0 f8 g5 Z+ u4 m2 bns operate. Below are the 20 most popular questions that were sent in and Je 6 W! z: `* E* @% [0 u8 ^
ffrey's responses. & o0 @2 w$ C6 W' U& q
/ O4 c2 L- l* ~4 }" [( s& w) [0 [
For Visual C++ developers everywhere still trying to get a handle on all t 8 o+ h( M, V8 F& f
his: Thanks Jeff!! & ^; ? _. l# L4 a1 }
5 Q, \4 j0 R/ v 9 a3 P& o+ u& m5 b- K' Z' Q- ?# w0 l Question #1 Is .NET a runtime service or a development platform? . g3 r. E* x) d- z6 \2 P% @7 Q- R 6 {) J+ u' u$ Y9 Q& {$ ^: C+ O3 i
Answer It's both and actually a lot more. Microsoft .NET is a company-wide $ f4 y' v8 A5 w: O
initiative. It includes a new way of delivering software and services to bu 4 z( `' n+ q2 R# c4 e/ @2 bsinesses and consumers. A part of Microsoft.NET is the .NET Frameworks. The 2 {5 {8 o8 \% b, L( {frameworks is the first part of the MS.NET initiate to ship and it was given + k9 ~# B' s% c3 d
out to attendees at the PDC in July. The .NET frameworks consists of two pa " l+ t0 K Q8 S6 u
rts: the .NET common language runtime and the .NET class library. These two : V+ Y1 f5 @3 rcomponents are packaged together into the .NET Frameworks SDK which will be ' H3 w. x/ B6 }! \0 e5 P+ i/ [
available for free download from Microsoft's MSDN web site later this month. # h4 P; Q7 z( ]# ^& d. v In addition, the SDK also includes command-line compilers for C#, C++, JScr M- o' V& O5 m
ipt, and VB. You use these compilers to build applications and components. T . D( ~4 X4 L+ E" @hese components require the runtime to execute so this is a development plat , i1 A# N7 m f1 D$ z% P' q$ }form. When Visual Studio.NET ships, it will include the .NET SDK and a GUI e 4 d" x, F( P2 V _
ditor, wizards, tools, and a slew of other things. However, Visual Studio.NE 4 S- l6 W3 W+ f: L: [* F5 OT is NOT required to build .NET applications. % y+ ]& G6 n# d3 g. ]0 x
1 F. T7 G# f/ H/ ] : ~: B& @! t$ e( u) n: { Question #2 How likely it is for C# to become a general-purpose (meaning: 7 f4 w% D% I# Y. s7 X8 jnot MS-specific) language and if so, have any other vendors committed to pro 4 K1 h4 x; M8 l( b5 J6 z# `
viding compilers on any non-Windows platforms? 7 a# w9 O+ Y* G* v. k& v 0 g& V9 M3 y M/ j& o0 g7 h Answer It's hard to answer this right now. I have been programming in C# a # G- q) E/ z& |' q/ k) t: Q- k: H! F
lmost exclusively for about the past year and I love it. It only took me a f 8 V: x; ~+ X. }. u% L0 oew days to learn most of it since it is very similar to C++. It was designed 4 b+ l9 U& Q0 }" b to compliment the common language runtime and I think that it's unlikely to 0 P. p; ~; Z: p9 C6 ]- q7 q1 L gain much momentum if decoupled from the runtime. However, you never know. ! \5 A; a( r7 dMicrosoft is submitting C# to the ECMA standards body so any company will ea ! r$ B4 x5 }, {: F3 q. r$ w* a# Osily be able to produce their own C# compiler however, without a runtime, th 6 c9 L% n) J7 V, n% o) `e compiler itself is not that useful. I'm not aware of any companies current " H9 ]% M- v' m' _ly working on their own C# compiler. Certainly, porting the runtime to anoth I! \) m `7 P% _! Ler OS is no small undertaking. 8 c( Z+ ]" [: e/ K 9 X5 ~/ o* p1 V9 K9 Q ' t+ @, k' T( k0 E* l% R; t
Question #3 Can you tell us specific practical problems that C# can fix be 2 l; g: Z& {) X) ]( ^# n9 ^tter than Java? & E6 i! i( o: y+ r" g- M $ ~& @ i- E G/ M6 J1 a) q Answer I must be honest with you: I have never programmed in Java. I know ' {2 I- H: a5 d5 K( mwhat C# offers the C/C++ programmer: simpler syntax, components that seamles m3 t/ Z y# G! j" I: y; _
sly fit together, type safety, and so on. Other people should be able to add & T7 x$ ^5 |% u: H9 f. l
ress the C# <-> Java comparison. # k5 M T1 ^! e M, f% i0 D& G2 j
) F5 c8 d' y: i& I" A9 ] 4 S2 b0 ^9 O# q% Q* q5 Q Question #4 Will ADO+ be the preferred and most efficient method to access - j& C. E* _$ I7 M# V& o9 O databases from C# or will it have it own (or .NET) class wrappers for the O J {6 t- l6 k6 cLEDB API? " m$ w9 w/ B8 d: `6 U \! c
. Z- _( i0 R# Y B9 o
Answer The .NET class library includes a System.Data namespace with many t 8 Y; v6 h3 w% W% `6 M) s, _
ypes for database access. These wrappers will be the best (and most efficien % K7 ]$ Y" `" _t) way for a C# programmer to access data. % o6 w, r3 Z b: E$ w# I) A* p " [3 p5 f. k+ e- P8 I+ R ; l! y) n6 U" A; L9 F& @ Question #5 Can C# be used to develop Windows applications or is it soley 9 N2 _0 j+ u1 H: u' Iused for developing distributed applications? 0 ?1 e" P" f G/ |0 `
' u' f0 g" z. M) \
Answer C# can absolutely be used to develop classic-style Windows applicat ( \2 W: q% Z; s y2 M) n
ions. Actually, this is more a function of the runtime, not the language. So ; A, l- z* ]/ u3 `7 A- ]/ c, the runtime supports console apps, GUI applications, NT Service applicatio 7 y3 N/ \$ i/ K! i9 Ins, simple components which can be used in applications, web pages and so on " w3 Z3 _" V% s
. You can't write a device driver but that's about all I can think of that t ; s( u2 L2 _/ e0 j# k7 y, M* uhe runtime doesn't support. & x# v" D# z3 Y0 y4 |4 Z3 Y & J1 D( ~& ~" T
$ c6 r; Z' U- N+ L4 t
Question #6 What is the C# relationship to WinForms? $ W! C L8 G& P' l2 n; ^ / m* g' G# o. X9 [! p, v
Answer Win Forms is a set of classes in the .NET class library that wrap W " K1 B0 U* S' @/ |9 p0 E* Z0 o4 pin32 windows, brushes, pens, etc. Any language targeting the runtime (includ 9 o1 w; `/ l# B' o9 Cing C#) can construct instances of these types and manipulate them. This is 2 s t/ A5 w5 }2 z% Y4 U
how you would create an app like Notepad, Calc, or Wordpad. I know that Win 4 c& J7 Q$ O2 A, ?8 M( A- k! r
Forms has similarity to J++'s WFC library but I also know that there have be " I+ k% y' I6 E- I2 uen some major changes. , k4 s+ q& U1 x: L. n $ z6 A3 L! c, X: k: d1 S5 _ . h' O2 i6 x7 a. f2 N) f. n3 r
Question #7 Rumor has it that the C# language has been submitted to the EC ( R2 A& A/ n4 xMA for ratification. Is this true and what impact do you see that having on 0 ]* }2 _ D, `* S/ P/ i9 O
other companies adopting it as a general language (such as C and C++)? ( F2 B7 z: F# X% J % a' B. e) q* O8 A1 m8 g9 z9 z
Answer Yes, it is true. I pretty much answered this in question 2. 5 C: d! s1 t1 @1 H' {( c
T! r0 X) Z6 q3 P4 ]
: d0 ]' I5 Q8 d' @5 N* M6 C Question #8 Which will be the role of ATL and COM in the new .NET technolo & k4 \% R7 M2 N' f6 Xgies? 6 u8 o) N O) H0 ^5 ` b+ w4 M% F# E6 U2 {9 z6 q
Answer The .NET frameworks offers a replacement for many existing librarie 8 f1 J$ N8 |, G; B
s, like ATL, MFC, C runtime library, standard template library and so on. .N 1 ]( C( k3 C1 `5 n" }
ET programming is significantly easier than using any of these older technol 1 O: o8 R0 L4 B9 x* Aogies. For this reason, I suspect many developers will move away from using 9 [ \) [) U- |) p1 n8 D% u% k
the older technologies. The older technologies can buy you performance howev # `8 o$ B: `& i: M; R7 _7 @$ ter; so, some people that are very concerned about this will stick with what' $ r8 }; ~9 O8 d; j) I: _. C- }
s around. As for COM, developing components with .NET is orders of magnitude 1 X/ y# E7 h! P9 j- x
easier and the interoperation between components pretty much happens for fr * a: x: c. _3 m( y: W
ee. Again performance may be an issue for some. And, for the time being COM+ 5 F% J7 q+ Q, w1 t X+ a6 x7 v
services, like transactions, are not being offered directly to .NET code. Y ' Z9 V5 m% j: B8 F+ W# m
ou can still access these COM+ services but .NET code must incur an interope q5 a6 u# e1 D3 p( J* H$ ~rability transition, which translates to a performance hit. y+ \' V. v$ z" z- t2 ?1 X( j
7 i( A5 P5 c/ `6 H2 g% j ' w0 V+ z2 m- @1 G/ z: T Question #9 Why was the templates feature not carried over from C++ to C#? : r( o: n# ]( h( i$ _7 ~. w9 A$ E' m 7 }9 N" Y8 i7 T. d1 O 2 W' T5 _& U7 ]- W6 O; u+ ~: R
Answer Again, this is more of a runtime issue than a C# issue. First, temp ; R: ]1 b5 M2 Z5 F, i& u6 Q0 t
lates are difficult to implement and Microsoft choose not to do the work for . l3 s( G+ y' x" Y* s
Version 1 of the product. They may do templates or something similar in fut 0 T% p O( V, E1 v7 z4 b& v, G
ure versions. Second, since the runtime is a multi-language runtime, introdu 8 N2 i3 y, p$ Y _! Z& ^9 m
cing templates means that all languages targeting the runtime would be requi 8 c) t; a( ?' `red to support templates in some form. There are a lot of issues here that n 1 o. V3 \( f% _5 m" K& Y* ]3 a8 J
eed to be carefully considered. ) L. B2 U+ |7 o3 J$ }/ Z$ g8 V
% R( B2 B4 M+ C# H! o9 y# k1 |
! U5 B9 Z% I* e3 M
Question #10 Will C# replace the pseudo keywords that clutter ATL COM code " ?- n$ M2 t) k0 |5 i: B% c! s with real keywords? Examples: OLE_COLOR, BOOL, VARIANT_BOOL, and DISPID_XXX + [7 ~. Y* N- v. bXXX. # B' }, m1 O1 P3 y
8 f* E/ a! k2 q) w# H
Answer Absolutely, all types have new names as provided by the .NET class ! Q- ` o$ i3 C* O& G( S* m
library. ; |8 b! h% B& x5 ~- c
0 }" [6 a9 D7 i* Y & g, m; S$ j$ b! b; v& H* B Question #11 We've seen managed extensions, but aside from that, what futu " O" C1 U4 n9 Q3 f( s8 Ore does C++ have at MS and in .NET? $ T5 ^: R" u& s8 x# n( Z3 }3 j & u+ l: f7 w: h+ i
Answer C++ is unique in that it is the only Microsoft language that allows 2 q4 \; o3 A: @& B
the developer to write managed and unmanaged code. So, I can easily see dev 1 O/ ]2 O5 M+ P! M) kelopers writing in unmanaged C++ for performance-critical algorithms and the 7 A% J+ a: O# Y1 d En using managed C++ for type-safety and component interoperability. I'm sure 8 q' L9 U& c* U* Z& r* q! f- U Microsoft will keep C++ going for years to come: device drivers need it, Wi " L) z7 i4 e# H+ H4 `( Dndows is built with it, SQL Server< Exchange, and other BackOffice products / p$ i7 C4 }3 U" Swill probably use C++ for a long, long time. ! ^5 g" O8 U' `) P- P" y9 C0 N8 T 6 J# ^2 ?1 X4 [ 9 n" q) T, \8 s9 @ Question #12 If .NET supports ActiveX/COM, how will security be assured if ' [/ U. R) S1 ` X/ H+ T4 c
a C# application runs from within a browser? / ]! b( x, v$ ]! k* F8 k
% f* c! k3 A% F Answer The .NET runtime offers code access security, which allows an admin 2 u# ?1 a% a5 |" |1 eistrator/user to configure security based on code identify. By default, any & L% S% O7 v* g% N7 o7 f5 ~3 v8 {) Xcode downloaded via the Internet or intranet is untrusted and will not be ab 1 u$ V/ g) {: |' f3 e! f
le to access files and other resources. In fact, when I build a console appl # ~- n( p' y, ^, p" }& g, f% [9 wication and run it from a network share, I get an exception when it tries to , q/ I& F5 |) E$ [: n( C; ? access certain resources. If I copy the same file to a local disk directory $ \7 V6 |9 }) L1 y$ a and run it, it runs fine. Code access security is integrated with the runti 3 l3 `" L% c" K1 v* H
me and is too deep a subject to cover here. 2 W- X# A3 C1 U, Y S+ z 3 [2 }6 ~# J- R6 B* [; E5 R " _; a) p! v7 i5 o4 x5 x2 L
Question #13 With regards to the .NET runtime, do I need it on the machine 6 a' O N3 `. C" c6 \
that I deploy C# apps on? 5 O( z+ U% [3 b+ U; j/ H0 B3 P % x/ D- |# {) k1 D q* k S3 g E
Answer Yes. All managed apps need a manager; the runtime is the manager. M ' B* @$ T1 o ?! J: }) m- dicrosoft will eventually package the runtime so that it is freely redistribu # i7 ~- o+ O7 ?9 h! nted. For now, end-users will have to install the full .NET SDK from MSDN web + s" T$ l0 r* J' Q% R site (when available). This is similar to how VB developer must ship the VB % T' s2 t" h% p+ ]2 f: N% I
runtime today. 8 z- A# }( {; o' Y/ V
6 W. O" m7 C; s) M$ U0 R 0 [: m8 v5 [; \$ j( D% r! I
Question #14 There has been mention of being able to derive C# classes fro 4 Y# |" X0 I% d: v4 o
m VB classes. Is this true and where can we see an example of how to do this 5 x; N& A: u& A+ \6 v2 w* Q? , M4 ^, m% U( I
2 D$ T5 a9 H u) t! Y; M
Answer This is true. In fact, any language that targets the runtime can de 2 L9 k) V7 G C6 l0 B* ]
rive from any type created in another language. Also, the Visual Studio debu , F$ O7 q8 x0 \/ B8 m/ a6 b: }
gger fully supports debugging across languages. Each entry in the call stack " R& |- d# E4 v* N
window shows the function on the stack and the language that the function w ! G" O$ c" t7 U! Z- T9 M' Was written in. This is very cool and got a round of spontaneous applause whe & Y, _; L7 v6 C9 `
n shown at the PDC. There are samples in the .NET SDK that demonstrate how t % z" B* L2 {9 e' Y0 P' Do do this. It's really quite simple. Actually it just happens, there is noth $ s2 n; g5 r0 S5 `) A1 x0 r" }) ]ing for you to do. You can also throw exception across language boundaries a . K: ]0 v" ]% S; [+ L
s well for error handling. 0 Z7 W1 \: U: \. c! X ?& m $ Y# k8 `; S5 h3 D: A4 M
6 I3 h$ t+ \0 E* A% T Question #15 Can I derive a C# class from a C++ class? If so, how? - U& v- }3 L4 f- b # |2 y% f% c: X9 { }( C; e Answer Same as the answer above: Any managed language can inherit from a t . m( i- `. b; f; V6 J
ype in another other managed language. If you use native C++, then you can't + f) o2 W5 Z+ l F8 R do this, however. / }* m) G5 J/ l: J, u
+ X: E( Z$ ^) N: d5 q3 C
6 v. Z$ { H8 F- q& X
Question #16 Will the new version of MFC have the option of working in a m 6 L5 [1 @7 ]$ g# l( ?4 x) ^
anaged environment? - o1 M8 I4 k5 m1 w( x' w ( l1 J1 z$ ~" c9 M9 p9 C6 C* j0 Z
Answer I haven't been tracking the new version of MFC but I'm pretty sure ( B3 E7 b7 J6 [$ H- V
the answer is no. MFC is all unmanaged just like it has always been. For man Q# r3 A. g7 ]: ]aged applications, Win Forms is the window manager that people should use. - p5 _, h8 b! b " ?/ V$ {: a% G/ i8 h2 O
8 Y0 J; B/ ?# Y2 T& K5 W$ Q
Question #17 If the new version of MFC will operate in a managed environme & L' V: h2 A: l6 ont, will it have the option of building desktop Win32 apps and not needing . & \8 j, k7 v5 V
NET runtime support? ! e9 `2 p$ S% m6 b4 C% l7 d
- M i5 I2 `+ H Y Answer I'm pretty sure MFC is unmanaged and will never require the runtime : f. {: i2 m, L
. ; B. b" J& \; B& Q4 l* x% P . {( b+ |' f7 o% D, L0 e# ~: h
: k' G1 |! k9 M9 `. U
Question #18 Stroustrup has been quoted as saying "I have not expressed a 0 e8 A% N/ L$ F
technical opinion on C#, and I don't plan to do so. C# is yet another propri / ^* A% w! Y3 O! ?8 R: F- betary language specialized for Microsoft's Windows system." Do you agree or 1 W( k$ n9 w% z% e% d: t. mdo you think C# is more of a generic language open to other platforms? , |5 f2 C9 a% [4 u+ u " v: h5 k+ \( t* G, o: h; Q; Z
Answer C# is a language designed for the common language runtime; not Wind / P2 | c! Y" Y4 @/ C3 @: k2 _$ P# Uows. The CLR can be ported to other operating system like Linux and Solaris & m/ B7 [1 u9 B# x; J) [and if the CLR is there, then C# will probably be there as well. In the gran D1 q; u9 h. {1 y. G% |
d scheme of things, C# is not that important or interesting. It is a syntax - v/ D7 R4 z+ s
checker that spits out intermediate language consumable by the runtime. You # E( g, Q! Z3 F6 {can love C# or hate C# - your choice. I happen to love it and think is the b 7 [, o' g I) n, P, T. _9 Jest programming language for the types of applications I write. 1 J9 o6 `- h0 g0 k
$ z' i3 n$ N& Y/ N3 v5 \6 ~ : o9 G% r9 z5 _4 K
Question #19 I heard a rumor that VB7 will allow static linking of the run 9 e p; R: @( s$ c9 T0 v& U
time, like MFC. Is there any truth in this? If so, will C# also be able to c " l9 z9 x8 S2 w! G4 u6 d3 Wreate standalone apps? / [2 k1 K/ b t0 s2 M: j# z
$ C* i9 P8 v- X% C4 ^, }9 l* W+ U Answer This is absolutely not true. No language will able to statically li ! J/ I( Q, c7 I2 i
nk to the runtime. D5 a: _! u: a6 S5 T8 A ' W3 [1 M+ b! l4 v 4 N: z' _1 O6 F1 j! f; K Question #20 Does C# still use resource files? If not, what mechanism is p " I |9 \2 r" p( L; h3 Krovided to allow for localization? / J+ x3 t# z( `, x% u8 A
5 f* `" j: \( N' \
Answer The .NET frameworks designers have created a new resource model. Re 5 M. m% C1 s4 T5 `, q
sources can be embedded in EXE or DLL files the way Win32 resources are or r ( o" w6 I* s2 k/ E2 X
esources files can now be stand-alone files like a single jpg or bmp file. T ; l1 m4 ~% `9 t4 Y
here is also the concept of fall-back cultures. If the Swiss German resource , M5 G1 _& {8 J% p can't be found, the runtime looks for the German resource. If the German re Y% O+ \, C; ~, b( rsource can't be fond, it looks for the "default" resource. Each language wil 6 Y$ u. ]' I' d9 q, Bl typically be built and shipped as a separate assembly rather than packagin % h9 q- o0 h+ _* l6 k& Q* y) {
g everything up into a single file. Like code access security, a full discus 1 s! _0 x0 l6 H, F8 U! csion of the new resource model is too much to put here. + E# [( K+ Q! Q$ @7 B - W& S6 r5 e, h" u
, j9 _8 E* q0 O! d2 A9 U$ G" F2 m
6 p0 A# n% h) E. C* i4 _ + O+ _1 H) A' G6 B k+ H
wenyy 来自 <a href="http://www.vchelp.net" target="_blank" >http://www.vchelp.net</A> : 6 c9 M# O/ L, l& q0 w7 } 4 S1 B0 s$ r; x" d8 u9 N* [0 n
我想应该这样说,一种新语言的出现会在一定的功能领域上替代其他的开发语言,以 6 m' y) ?7 z$ A, @1 E. Y: ~
前的开发语言的使用范围会缩小,但不会消失。(就算是出于保护现有资源的目的) 9 |2 d! R' }- K' O
. D0 }* B3 @- P- ]
但没有一中语言是十全十美的, 7 M3 S+ A9 {) o; Z8 s$ ]* Y
& @& e+ S( Q8 b4 h JAVA,C#都不是。 ' T3 ~- n9 C: \1 B) Q
( u" Y' T) H; N, C( P2 R1 z
6 t' c5 D$ b3 m- ^1 h8 l 0 ^! g0 r& J3 Z7 l* u2 b, E wenyy 来自 <a href="http://www.vchelp.net" target="_blank" >http://www.vchelp.net</A> : 1 G1 Z% [ H) R' m1 z1 ]) v* a : I7 d- g& y4 Z. P; h! s, E, B 》》恶魔吹着笛子来 2 f. m: g& x7 h- t' h# i2 w9 h , R! K% i! u& I
你好, 8 J* @2 D9 B8 a1 M8 t! K
/ U! e5 T8 O! N8 \0 Q- L7 o
很高兴能够与你进行讨论, * [- @' h8 |; V: V6 X 9 N& F: e6 d3 \7 `! e' f 虽然本站名字叫做vchelp.net 6 x* H; d' R- Z& ]7 R & J' a" U! O9 E0 }9 Z6 H* h; a: n 但我不排斥其他的开发语言,只是自己的能力有限不能将本站内容扩展到其他的语言 7 f& M" Q. b+ B, " Q- P; x2 @3 g4 [2 D ' i. w* [" N; {5 }* D2 ~
但我很希望大家在本站对开发中可能遇到的问题和矛盾进行讨论,不论是关于语言还 # C9 \: @! [ ^7 n `) u( @
是开发方法的。 6 n2 _+ G7 l5 H 2 I; a8 b9 R/ {$ m! U; _4 Q 我想邀请你成为本站个人专栏的作者, " d! H7 p6 l" X2 n5 g& x0 B 4 p" p5 x; |4 q) H 你可以发表一些你关于开发的想法,就算是与VC无关也没关系。当然在时间上也没有 9 d( n d% ]2 L! _! s+ h要求,你有时间就写写。 9 I$ `& F. ~ X: W0 ^ ~7 Q* [% W; q: L
盼复:<a href="mailtwyy_cq@21cn.com" target="_blank" >wyy_cq@21cn.com</A> & e7 L; W# O2 h( s% u0 T
# h; K1 _+ p) x% \, d9 @6 j' ~ cuixue 来自 http:// : 6 r' x8 q- n0 S5 c 7 t3 s8 w" h( ^( w; ]8 j
看了各位大侠的话,觉得好像在讨论java,其实历来有两派,smth几乎天天在吵, / g4 y- Z. F: O% }( f9 B
5 M( {/ T0 Y, k( o( I/ G1 g" w
喜欢java的同志到各个地方布道,连perl也不放过。呵呵。我个人觉得java先天有一 3 ]1 @ z o3 L6 u4 ?* b9 I
些劣势使得他无法取代c/c++的,他的垃圾收集只不过通过一个线程来完成,这对实时系 , B# ]4 }" z$ @1 @* ?, I3 G% h1 F统是来不及的,EJB的推出也说明java原来是不适合企业级开发的,没有语言是天生完美 ' g0 l: K2 j5 i F的。java最大的困难我觉得来自microsoft的刁难,c#的推出无疑会夺走windows平台上 8 G! n& {2 F9 A
的java份额。java的速度也就不说了。jbuidler的速度不能够忍受阿,可是这样一个产 " ~* E. ^4 w5 ?% U; X- f F
品就是java写的。由于个人见识不够,实在不能理解海量吞吐的 % f# d2 U% |; U& z v2 u6 v9 J0 `" G9 w5 S8 ]! ?
server用java.oracle用java是实现了ejb的集成把,他的数据库engine是不是java 的 % @6 d6 @0 p7 P: S, `, _那?请大侠指点。而且当时号称8i不要操作系统,结果市场反应平平,还好 6 S! W7 W5 B Q * e' y/ L, ^) [% j9 \$ u: i 搭上了e-commerce这班车,:) 3 |% o! M7 u. G' D
7 m2 Z4 P! D) K4 J& ~
在说说我对vc和bcb的看法,这两样我都算粗粗用过,紫云影说得挺好的,比较公正。 " Y) @3 w2 a7 Z" K
MFC的确稳定,ATL未免有点复杂,要不WTL就不会出来了。vcl的源码有一部分是pascal 4 m/ f9 T# d# a) H$ w写的,这点有点差,不过他的扩展性很好,用用就知道了,决不是好多人认为的vb式的 % S; _: z$ M% I) ?( Q
傻瓜工具。道理很简单,应为他是符合ansi标准的c/c++语言。其实vc是不够ansi的,C 2 E* L5 p W* O
String就是不符合的,所以bcb用了 AnsiString.可惜bcb不够稳定。 ' z9 P+ N' ?6 Z r& h% q) {5 T
$ x4 {! @, U" ^
提示太慢。帮助的问题我是这样看得,msdn不是专门给vc的,他是windows开发的指南 - ]" ]5 V, r" V( N9 e,用bcb一样也很有用,是个宝贝。 ( j8 p# C& V4 p4 B$ y: } 6 I6 B' b& s* T" s 好了,不说了,反正按需所取把。 ' ^& M- U' P8 j6 c# S( \
* V& F, v& x# F( b6 n0 h" }; Z cuixue 来自 http:// : & g2 i6 [/ d9 W$ L2 r0 Y
, g! z; }( u# Z5 }
xml远程调用无疑是平台无关调用的一大进步,可是这也不能说corba就要消失了, 8 U+ F( u0 m( c( E! ?& Z, q % ?# h& J! l+ y' A' P. U
xml这种标记语言虽然提供了强大的标志检索的能力,可是它本身的缺点是与以前系统 3 s: a, t3 i0 Y7 ]的兼容性,所以最近推出了xhtml以兼容以前的应用。电子商务的应用有不同的类型, , b4 e; U L1 H: @# z' v
2 Q" ~% T o8 ?+ ~
对于一般的b2c的应用,sun e1000上跑跑java或许可以,如果是银行的主机,起码 + q$ }' w1 Y* Y, Y5 b5 y
6 P: ]7 V! \9 Z* o: a- ^$ {% o3 D
1000笔每秒,java是不是可以 那?硬件的提高不是没有限度的,而且现在数据中心和 : R7 O! f0 k+ M8 E. l- J. u
OLAP的流行,对实时的要求更高了,实际上对于单位应用硬件资源并没有什么起色。而 , {7 ?' ~* a/ q) w且数据发掘的应用要求对原有资源的兼容,对于中间件而言java开发是有优势的,corb * G% j9 V! Q r; J0 B9 u' Va提供了对异构网络的良好支持,ejb也在向它靠,毕竟在这个年代,不可能只存在一个 : h+ w0 u( ^, o( D3 e* R7 ]; W
系统,一种语言,对自身的改造和对异构网络的支持以及原有应用的支持是每种语言都 * L/ v" E/ U U! @: \
要面对的难题。 * M6 D% p1 N I7 z t, }. u
1 [# u& X7 W+ v, N1 }; ` e8 w6 c* ?" `
+ v* U: x5 u- t; P" k* D% } 杨宁 来自 http:// : ' A! i- h* ?0 @! A
6 U) V: m& I# ?
世界是多样性的世界。 ; L B) C" @5 x6 h+ k+ D6 D
1 ?$ @/ R3 O2 d2 u 不面向应用,一切都是废物。 4 e6 a: ~/ B/ ^; @/ [* w
: Y/ N1 M4 X3 B5 p8 K! ^
学好编译原理和操作系统,以不变应万变。 9 J3 r5 A/ Y7 Z( E. s9 s4 v/ \1 B
6 t+ i- ^6 h: h) F k9 o 人的精力有限,面面俱到等于面面难到! 3 W, [* d2 d# v( p4 s " x* f; Y+ e: D2 o$ L6 d; e
妖刀 来自 http:// : 6 x* x# t6 C2 w$ c . ^. ?* U9 F/ r5 q 我不会编一辈子程序,我需要简单,快速.我只要他好掌握,能实现功能. " s+ T( e& w8 x" Y2 o
1 U- s% I. Z0 O- J g) H( z 至于是专家型的C++还是傻瓜型的VB(Delphi也差不多)我不在乎. . P6 \1 _! t( X5 W3 \- @5 v2 H 4 W8 U" i; Y9 G a x& J 老板也不在乎 * l& v# I9 G* Y! S$ J: r5 ^8 ^
, U* k# l8 A Q! a$ W* ? TOM 来自 http:// : * c; I( |: a3 p+ a& r
- N. v p% n, }5 R& x 用VC++和Delphi都各有千秋,Delphi写界面方便,大部分是写数据库程序。但写出来 ' i8 \, I; d8 @7 H. b% N2 C
的程序太大,如果做一个组件(为HTML写的)还是用VC好,有句话很好,专业的程序员 3 n: ~. W X: s% m3 l
用VC,聪明的程序员用Delphi, " L8 y# K0 t8 ~/ W 6 Q+ h3 J4 P7 b4 J! N2 x; j" |
TOM 来自 http:// : 4 u7 O0 C* S2 d# }9 A 6 S) f9 O) @$ I 用VC++和Delphi都各有千秋,Delphi写界面方便,大部分是写数据库程序。但写出来 5 s6 g; x$ A$ C+ ]0 s) k! Q1 Q3 T3 y* q
的程序太大,如果做一个组件(为HTML写的)还是用VC好,有句话很好,专业的程序员 : _8 \* I& y' c% q% X6 Q
用VC,聪明的程序员用Delphi, / Q& W, {/ F8 G* d2 s" N) V
% o+ W. o2 V4 f7 L, U
宇服 来自 http:// : # v5 T+ v3 T' { 9 V+ `8 c& S6 A" u8 s2 g; f* ?
作为一个真正的程序员,不懂c/c++ 只能与非专业人士一样,改改属性来作程序罢了 # C( Q! z7 I* R- ?; _
。 8 C G- k: y3 Y9 B* Q1 p3 ^ 7 {8 F; B8 E. n1 p* d% r 宇服 来自 http:// : 9 {9 |; L% ~5 V7 z
1 ?! c& }: y" N 恶魔吹着笛子来的话太可怕了,世界可能只有java存在了????? $ V: {: `: \0 H( a" C! t K
9 D: P3 M$ M& [' e( e# [" K- G; Y1 l % s% ~5 k4 I) Z2 k U% l" f, h: k
) k' s" G* U9 \/ r1 v6 _/ R+ }# t( ~ wenyy 来自 <a href="http://www.vchelp.net" target="_blank" >http://www.vchelp.net</A> : + F% E* ~$ C, i* ?. f ; X) w4 o: U- a3 m
我很同意杨宁的观点 5 s9 Y& A. I: N; b & {& G! v- O1 f5 b% [6 I5 E 》》》世界是多样性的世界。 不面向应用,一切都是废物。 ! G/ ?) s- y. l
, _) a5 k) `# A# W$ E9 z
" N. J [4 ~+ G- [2 r
9 \8 |# d2 r% b2 o0 J4 E) F N 苏 来自 http:// : 6 s0 H6 R2 _1 D9 g2 a7 M: @
9 N$ w) |$ W- P% Y$ [: C1 I1 B8 e
对于DELPHI跟VC的争议已经不是一天两天的了,要理论它们的长短处确实比较困难. " i W- A& x) g- A; C6 h ) U+ L# W6 N& |& T7 B 作为比较出色的RAD开发工具我认为是DELPHI,VC是称不上RAD的!对于编程者而言,如果 0 M" p0 L+ U6 Z7 Y+ n, J, ^; }
是低层的东西用VC开发具有明朗的线条--一句一句来,而用DELPHI就必须借用API了(当然 ' F) S" \$ d' u4 A- p- [/ A9 k用起来就不是很方便了);而对于从事数据库开发DELPHI不失为一个好工具!我觉得两者各 ! c- i4 g( A( T有长处吧! , O9 z7 p4 J% ^" u 0 p# j3 Q0 C( j
雅各宾派 来自 http:// : 9 j: G$ w6 ?1 L) a- G6 C - x, `0 e, n; q) |; g$ A
呵呵,明朗的线条,此言得之。 " B# J- @$ G1 v C5 n ! [) m, j) `( E" z6 Q Hintell 来自 http:// : . \' k4 d) W; w* Q2 h; p2 w% | 2 P1 L- f6 A1 b9 R5 h9 \. ^$ o) ] 我爱JAVA,如果不是为了谋生,我立马放弃现在的UNIX/C PROGRAMMING,不过幸好搞的算 . w# b: B5 U3 c2 l是交易中间件 % m, g/ p2 T( ?' ^ ^) Q& x2 m9 b+ e/ a8 _5 K
JAVA是个好东东! 0 B5 N( ?* |9 x+ D8 Y" y5 ] ( \ V+ k5 t. A- P- c 恶魔吹着笛子来 来自 : 7 k2 W J0 [) M4 @. _ - Z! q. _5 k& o" b* m- M- i
我从来就没有说果,只有JAVA会存在.我只是说,将来的很多我们熟悉的桌面应用都要以 ' ]. |) P( r! o
WEB服务形式出现(包括我们的现在常用的office,windows,visualstudio等等),而客户端 3 v5 O! O1 I3 m4 c$ z8 m4 A; v4 Q仅仅是一个外壳.你没有听说5年以后ms将不再买osftware,而是靠买网上的服务(office 4 G. [- q5 z5 L9 ?, ]! c.net,windows.net).这个时候我想传统的c/c++的应用范围就会小的多,而c/c++的升级版 " b* Y2 a9 e }& {, S" c6 y- ~本类似于java,c#就是主流因为他们是为internet设计的而c/c++不是.还有我认为,java % ~/ Q8 E4 V% d,c#和c/c++不是对立,要我把java,c#和c/c++对立起来,我宁愿 4 t H0 m3 g+ X5 ?$ v 3 I+ L- _. e4 s8 q- X# l x5 x 把java,c#看作是c/c++的一种internet延伸和升级,使得c/c++更加符合internet的需 M5 Y/ B' I0 g* _1 q要.我们用java,c#的时候我们很大程度上使用了c/c++大约60%的legcy功能,我们能不感 , X' x; G# u- ^) a' ~- v# b0 C; p
谢c/c++么.我一直强调的是java和c#是C/C++的衍生,我们在用JAVA时我并不感到是在另 + ]3 f1 ?' K1 N# Z% G外一个世界里写程序我感到的是我仍然在C语言的世界.我想我们不该 4 M* x7 m' D# g5 ] / Q6 A+ N: n2 p( j* i5 U% W 有JAVA,C#和c/c++语言的门户之间.有可能的话我希望称他们为c语言族(c/c++/java| 2 K' `$ ^& H& n+ F# jc#). * ~) @+ U9 F! b" t3 d6 e
% i0 u+ j& R, u- j* n/ n% Z9 h
hfgh 来自 http://无 : , o4 K- X$ Z# k: y; I# Q7 K 8 b6 _! `2 O9 {( C) m
不要再去争论什么DELPHI、VC了,语言只是工具。软件的关键是创新和设计, " v# M# ]1 k% [, p+ U
& @4 @$ }6 _6 n
有了这个前提,用什么工具去做就看你熟悉什么工具了,看你的工具能不能 & Z0 F' V& n/ t1 @/ @ 2 J7 K; }% S$ R' f. B
满足你的设计目标,有限制就选择别的工具。就这么简单,有必要去争论用 V3 H0 ^* u( z0 ] : E; s3 T$ _7 H. k$ W9 P0 h) r8 |7 ` 什么工具吗?应该是争论一个软件的创意和设计有没有前途,而不是先去争 . d9 u+ b6 i" n" n, u9 ^9 y% \7 J4 E
: ~" K& q# q: q/ m1 O) r; S 论用什么工具。每个工具都有它的优缺点,主要是看你是否熟悉它,它能不 ) C) W) o0 T# X- F. }
+ g% R6 U% E( l3 A7 P
能顺利实现你的目标。如果不能,没办法,选另外一个工具。做界面还是 # a4 o+ }; n0 L( w5 K 6 \; h# n9 w8 K- s i9 z
DELPHI合适,做高效率的通信,还是VC,要做大量涉及SDK或底层的东西,还 2 |* Y7 p7 R; O3 ~5 ^5 n2 K , x5 C8 ~% K# s& \2 @4 ~! P3 M9 t 是VC,就看你项目的目标是什么,而且是每个目标,不是其中某一个目标。 % b8 O+ G4 g1 w, e& h8 }) f
7 u4 {6 L1 k3 O
中国的程序员都受中国教育的限制,老是在一些细节和工具的层次上思考, 1 x% I: B: i& X; L0 ]8 @$ R. i# {
7 G0 Q; n# O# O& R7 }1 d 没有在全面的系统层次上思考,在整个计算机技术、通信技术、软件技术的 2 Y# D- `* i: e0 j; y% w ! S5 [: n- y: u7 X( s1 { 整体面上思考问题,才是中国软件技术进步的道路和方向,而不是去争论用 , k; o, W5 T: J U. q9 k1 D) D# ` 什么工具。另外,本人认为VCHELP网站在中国还是办得不错,但欠缺的是整体 ; M9 {: I/ G y* C9 t 4 P$ q2 V0 M* q 技术层面上的东西,而这一点在中国是尤其重要和迫切需要。