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