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