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