; j* g6 {' Q6 l/ b M2 E5 t LeoCN 来自 http:// : ( T5 e9 S! e8 P) `5 F( d & q$ H ~- C; G6 T
It's not a time for us to determine which language will more better! 0 N5 S1 H- [( y' S
* |' L6 o9 W# Z, x, X9 L) t% w# | M
in factly,In China,too many corporation just writting some codes for : I4 B# H: G. {! o4 @5 T/ Y
+ y1 p5 |- a3 B enterprise's MIS,OA,ERP or other application.It do not need so speed / `2 B. E- m% O- m* [
" h5 o2 m- I, E5 u/ Y8 d* x
and do not need so good original code. just want more data,more easy and m 7 h. W2 Q/ G6 _# N
ore quickly. 0 d, l' C7 I! K, L 8 O2 h2 B, b1 [# X so c++ is not a choice in such enviroment. and u know,many codes we write , V( X! |# v+ S0 l& i1 Q, Ctoday will be useless.and there r so many easy tools such as VB , _ d- S* |5 F- N/ z* j' y" t/ ]
' z6 A9 x1 i) t; b% Z( ~
for windows designer, Developer/2000 or PB for database,Domino Designer fo & e& x$ _6 w. t; k, z0 Fr OA application,why c++??? * S4 F" `; b9 m7 s9 _6 F 3 [4 ?2 {2 Z; z7 m$ [# } in DOS mode. i like Turbo c2.0, with it and MASM i can do everything. ) }' g. l8 S: @
9 y: S* K7 a1 r/ _" L- C but now i hate c++, it has waste my time! my corporation do not need ( J' a' V: R' q8 `. i # h; E6 C& n1 e c++,just need java,xml,php,pb,vb,delphi,developer/2000,domino designer etc ; q+ m8 N0 @3 {" f3 X, z$ J1 n. % v* E$ N8 d1 N/ t+ k $ V1 ^- X' W( e0 Q so, a tool is just a tool,if the advantages in some aspect of the tool 8 s, z" y. l( ?: Z% m+ c ) t" ]+ C. y" g+ G
u needed. it's will be a good tool for u. others it can bring u unfortunat ( D/ y0 X6 x$ Zly! + A2 Y' m3 b* w$ y
, k* x3 T/ o' t
恶魔吹着笛子来 来自 : 0 g$ x' \9 H* ?. \" N% K8 O 2 t" l& H# r' C3 a
果子,国内的Java应用不到10%基本上是ms的天下.这些可能是由于中国软件业规模太小 $ c$ w) O4 q* S7 S
的缘故.而在国外40%的商务系统的开发都是Java,c/c++不到10%.譬如BEA公司一个有3个 6 d7 S" F7 n+ p( j8 f4 _java程序员创立的公司开发了第一个基于J2EE的Application Server---weblogic.BEA公 7 T& \/ M8 o% h) L司依靠weblogic在短短4年里成为世界第四大软件公司仅次于CA公司.可见JAVA的功能是 4 W* K1 Z3 n! ]
如何的强大.微软的.NET的负责人说,你们想要知道.NET是什么样子,那就去看看JAVA.JA R# W* }0 B y- W' [+ YVA是什么样子.NET就是什么样子. : R' b: y2 e: V5 m2 S3 \ ^7 _- m0 m" L! }, ]3 |
+ q1 A5 _# O3 U& ?, i ( k$ z# [' ?7 E- B3 ~2 M6 t 恶魔吹着笛子来 来自 http:// : 5 r. [/ G! I& H# y+ N % _" t5 m: \1 g; k Y8 @
Wesley你好.关于Java开发工具的问题.从我的观点来看,目前的Java开发工具没有一个 1 ?! M' k1 H& z$ s" [8 z5 v) u; R令人满意的.最主要的是,在技术上考虑的太多,却不像MS的开发工具考虑到程序员的方便 6 K. `6 S" O# q# ?, s& O- Z4 c' O(vj++是另外一会事情我后面会讲). 5 B! f$ D8 b# Y S, H 7 l$ s1 s5 B2 e( l/ R+ |0 } 基本上流行的是sun的jdk,ibm的visual age for jave,samtic 的visual cafe,和bor 0 B+ M+ C0 \- T+ M {( U% C6 v! zland的jbuilder(vj++基本上没有什么人用). . f" L! B: z+ J2 m1 k * a$ l7 T- b' m7 c4 \8 h% }( _) s! V 在这几个工具来讲,jdk是老大哥,但是仅仅是一个command line compile.在某些方面 4 @ l2 Z; I; l1 b: l% Q用ultreditor+jdk会比较方便,譬如你的机器的配置比较的低(memory<64M).一般来说,几 - _( s% n0 |. v- p2 d, a- M, C乎所有的Java工具需要的机器配置都比较高. / V0 I3 W) G# _. u) x2 G- n9 Q
( r! ^% ` v( s; \% Y/ D visual cafe是第一个可以使用的Java IDE工具,我当初学习Java的时候就是用这个.它 3 I+ B+ S4 h& c& A0 i# Z& n$ b的配置要求比较低.一些比较低的版本譬如1.5 2.032M就可以使用了.但是现在最新的版 , w1 T9 c7 L0 ?2 ?7 p- k! d- \+ G
本5.0的要求就比较高了,可惜2.0以后的版本没有用过.cafe的IDE开发也不是很方便,懂 ! z4 o x# {8 x$ p. ~% B一个窗口西一个窗口比较的乱.而且bug还很多.有的时候trace到一定的地方 * ?8 a$ |6 v. Q, X; {; T7 m& J
+ G6 F6 V& X1 s" e( h4 x$ o 就会crash.samtic是一个系统安全公司不知道为什么cafe却那么不稳定.而且从技术上 / e* |/ U5 A) Y; C4 H: M1 C1 C
来说到目前为止还没有完全支持java2.更不要说j2ee了.从帮助来说cafe的帮助基本上还 $ y( F" B3 l3 S4 {1 H8 T8 a' ~是jdk的帮助没有什么特别的地方. $ J1 Q K2 r) U- G, P4 O R * [' s6 f, p% E$ e+ h$ _" u
IBM的东西往往是吹的比做的好.visual age很复杂功能也很多.支持100%pure Java和 7 }) u# U+ z) S0 q% ~J2EE.但是使用起来不方便,当初为了设一个class path找了半天的help都没有结果.后来 % Z& e- M5 v+ v/ V# [4 M
听别人说要在nt下面设置环境变量才能成功.而且与其说是visual age还不如说是comma - u$ X( e% y; _* f, i9 h
nd line套了一个windows壳子.做application还要自己写layout代码更本就不visual. 6 ?! [3 Q+ R a) o3 e % `* \6 O% |4 s# _' v
Jbuilder是我目前遇到最好的一个,它的界面基本上和delphi c++duilder差不多.他是 5 [ i* B4 f" U. N2 R
第一个真正的java的rad系统,第一个全面支持j2ee 13项Java技术的工具(bean,jsp,rmi : e/ t0 r8 u. |- q6 X1 c
都实现了).100%的pure Java.相当全面的help document. $ q; }' I3 o+ x7 i3 h
$ E. C# c+ P" u 什么样的的软件只能用c/c++开发? # h7 G( H) ?2 R9 [2 d+ G 8 |# g: D' S! C" w8 t
操作系统?apple的OS7,os8,os9都是PASCAL开发的. - K- y5 L- @% ], e 9 O. w3 r6 H* N' g0 G8 C; K4 H 数据库?oracle8i就是JAVA开发的 * i( b1 I/ }6 q% W
9 v. }& e# k% B% m) Y
游戏?你也许没有见过用DELPHI开发的<笑傲江湖><风云>,甚至有VB开发的<神龙教> - |, I( _+ L+ q9 j1 _ : y4 ~, ~, G0 P6 l- o: v 同时VB7.0全面支持direx8.0.可想而知游戏的开发难度会大大的降低吧. ( D; F- B. f* F% ]; X$ s( e0 V
0 n% z* Z: o6 i* W
我的意思不是说c/c++会消失而是应用的范围将会大大的降低并且将会进行脱胎换骨的 ; T: n! \3 @3 n, U5 Y9 j! ?
升级(用了20几年升升级总可以吧,java的升级不算太成功,但是是一个不错的先例我想c 0 d! e0 z, ^+ f# `$ F+ o
#的前景会更好). % m4 T2 W4 u* I
7 n0 D2 \# E# J) U0 h# O BTW: 2 r, e8 K" R3 V) m5 V. S
, T9 N3 f' O1 g4 @' X
MVC=Model, View, Controller Design Pattern : Z: {( O" Y: E, q" i1 d: _ , H5 s+ e, z6 o" P4 }/ U ' v4 @0 @' B1 E7 a8 M" I
1 L& C. }# r' a
xubin 来自 http:// : " ^+ k) a2 c$ v& t' E& G4 K
" N3 v2 x; t- K, F% } 在工业控制中,直接对I/O地址操作,就要用C++。 " P" L" K1 M# a7 F! R
+ L+ |& ^8 ?# X; P& T- g* d
恶魔吹着笛子来 来自 : ; W# W' `2 c1 @( ` 8 D0 b3 \& S" E& K. H8 T/ [0 }4 F
俺有一个同学毕业设计用VB做单片机。你这不是在讨论问题是在抬杠。 ) L: V8 i. V* y$ c0 W
) A& @4 Q; ~: `4 g wenyy 来自 <a href="http://www.vchelp.net" target="_blank" >http://www.vchelp.net</A> : 8 L% @3 O8 I0 Z% A. `, [6 [/ q) v
& a- [. @0 F ^& R' }5 f/ J0 K 我想一种语言并不会因为其他语言的出现而消失, 2 Q c6 m% x/ a! O, a
* u$ h. O8 M# o( p8 Q* f8 n- L 比如说c与C++,C++与C#的关系。 2 r# s$ ^3 o6 n, e) m' q8 v( `, z 7 H8 S4 y3 R: D# Y) e
所以我想讨论问题时首先是要排除敌视, % q: ^6 S; S( i5 ?4 L5 L+ |
$ [& c7 U T0 |4 U 然后才是透彻的分析。 ( |0 \/ V2 i8 l $ P2 Z3 V6 K0 P: r4 N, @
IT世界不光只有网络,还有其他很多。 ; c$ h% D4 }# S6 n5 ^
4 w& z. o- g; M3 u! i 所以某些工具在一定范围内适用是正常的, # Q, K1 s7 [. F, L+ k4 m% ]* ]9 m % Q* ?) w1 a' _4 C8 X6 _1 N 其实在国外, 1 f& ?( I' \5 A8 d' d ) Z3 X3 e1 j: N6 p7 J* d; Z f
SERVER端软件大都用JAVA,而CLIENT却没有多少用JAVA, - y# F. X$ p& O- s
& p9 l8 w& s/ D$ w% a
这和速度有关,当然也与MS对JAVA的态度有关。 1 Z* L0 u) ?9 I4 j* r ( Z, f$ w& B/ ^
- ~- u" j* Z1 D Y) s) |. v
不过我一直认为C/C++不会因为JAVA的出现而消失。 0 w) r6 [$ z7 A2 o5 C5 I ) g$ x! X* }/ s7 U& z+ d6 y 就象COBOL目前为止还在使用一样, 4 M, ]; Q# M# q# t6 e' T
" V+ R) A+ a! Q$ W2 i; E
8 G2 R5 Z$ T- p) ^
不过以后会有愈来愈多的解释性语言出现,因为解释语言比编译语言的兼容性好,这 - O3 q# z3 T7 t* k0 T) ?
是不得不承认的。 # e, A3 r7 D+ I: w
9 o) t2 s. }& W4 H; r& e6 l 恶魔吹着笛子来 来自 http:// : i1 L: g& E( u# V* Q1 I
% Q8 q& F9 C8 w8 n
是的wenny.也许我说c/c++的消失有点夸张化了,但是实事求是的说.java和c#的出现 - X; ?* R( G" g. J1 I4 ^. J * o S$ Y) `3 B3 c6 m c/c++的升级换代是在所难免的.对么. 0 P! [# M. X8 _2 E3 C9 b
4 x* x# v$ R( G8 f 恶魔吹着笛子来 来自 http:// : # T: u3 Y) `8 ?7 _( E $ q- |: I( ~5 s+ w1 [! R
而且我一直认为java和c#不是另外一种语言而是c++的升级.就象是c到c++的升级一样 " Q' x! A( k9 j! L# E; w* e% \$ e1 D
.对不对. " Q2 }7 K- |8 Q+ j4 m, p5 |+ Q O
; o+ K4 P$ ]* F& C: C8 g
xcc 来自 http:// : * q6 K7 z; V: L c; x 1 [% `* G* U& ^$ G6 Y 同意恶魔吹着笛子,你简直是我的偶像,顺便贴一篇关于C#和.NET专访 ! u! K5 s9 S. p& t) V8 z8 Y x 0 N8 n( l7 K+ G+ _/ f* N
NET and C# Questions with Jeffrey Richter / P* [6 C" V$ I. [ , u1 A& G, b: ?- n6 U# E
In the weeks after Microsoft made a huge splash in the development communi ' I% n5 w1 A& I" m8 f- }
ty with their .NET and C# announcments at the July 2000 PDC, Jeffrey Richter 7 h: N+ P n, g accepted our request to field 20 questions from our readers about these new - c" v" B6 U2 b' Z$ }/ K" {; @1 T' { technologies. As many of you already know, Jeffrey is a cofounder of Wintel " Z4 Q, F. s7 k0 }lect, a company that specializes in Windows & Microsoft.Net training and deb 1 h. q2 v/ O2 l- j! J
ugging. Jeff is also a consultant at Microsoft working on the Microsoft.NET 5 _& |+ R% w% Z. s0 P
Common Runtime Language (CLR) team in which C# and Visual Basic 7 applicatio " ]4 |5 Y) O/ r) }' ] j* k
ns operate. Below are the 20 most popular questions that were sent in and Je ( x. l2 k2 w% B' k; A S
ffrey's responses. . ^/ ~6 s# N! z, q9 Q
% D- E, j7 T9 c# f0 v9 r; Q For Visual C++ developers everywhere still trying to get a handle on all t $ m1 j! [ Q$ c g! B
his: Thanks Jeff!! * S6 X9 M/ U/ {+ v+ N7 c5 [" ^
* K x+ D4 E, W/ ~
, G" T* A1 }. P7 ^+ O' s& k! d
Question #1 Is .NET a runtime service or a development platform? ( i' ?! z$ |3 o( L5 m0 F 9 {& Z& }. a9 p4 z Answer It's both and actually a lot more. Microsoft .NET is a company-wide . q( Y4 D& C9 T) l initiative. It includes a new way of delivering software and services to bu / j: d8 y* X E( ysinesses and consumers. A part of Microsoft.NET is the .NET Frameworks. The - Q8 I' G! `- H% o1 \
frameworks is the first part of the MS.NET initiate to ship and it was given 5 u K6 w& M+ E, T, b2 ] x out to attendees at the PDC in July. The .NET frameworks consists of two pa 4 g( ^5 c3 V- |% a( o
rts: the .NET common language runtime and the .NET class library. These two ( o7 i8 I3 t1 M" T1 A* pcomponents are packaged together into the .NET Frameworks SDK which will be & ?7 I, a; u4 L5 E5 y: T) D; favailable for free download from Microsoft's MSDN web site later this month. % z8 m g* b g+ N In addition, the SDK also includes command-line compilers for C#, C++, JScr - }5 ^0 z2 ?5 I, [4 U' a1 a7 Bipt, and VB. You use these compilers to build applications and components. T # n, r3 ^7 G1 f1 N$ |
hese components require the runtime to execute so this is a development plat 5 i$ A, k9 B. y& j- J5 F, b' a
form. When Visual Studio.NET ships, it will include the .NET SDK and a GUI e 2 m3 ^% N- @, ~' b; X' ^
ditor, wizards, tools, and a slew of other things. However, Visual Studio.NE ; o5 V) ^4 b$ c! Q; A7 n3 g. q
T is NOT required to build .NET applications. 3 h9 g6 f" u4 f
2 u. z* V+ S# w 0 m0 X0 o' O5 j; E* P" N Question #2 How likely it is for C# to become a general-purpose (meaning: ) D% j: F) E; m
not MS-specific) language and if so, have any other vendors committed to pro 8 L6 Z4 v+ K3 |& Z% xviding compilers on any non-Windows platforms? ; m7 ]! x2 S- v. x& n# U3 n 5 S) k z3 E1 j K' B/ Q! t
Answer It's hard to answer this right now. I have been programming in C# a ! E8 ~' `$ W! `- r0 ]0 r0 F+ `lmost exclusively for about the past year and I love it. It only took me a f & L0 b' z5 y: A1 iew days to learn most of it since it is very similar to C++. It was designed 0 P3 z# G0 o5 f: L% P to compliment the common language runtime and I think that it's unlikely to * V T6 v. \) ~! j3 @- l1 m8 ~& ? gain much momentum if decoupled from the runtime. However, you never know. ; Q! z$ f" H, m z& b3 G% CMicrosoft is submitting C# to the ECMA standards body so any company will ea 1 P- S# g& p; A. c! \# Osily be able to produce their own C# compiler however, without a runtime, th . o* N/ e' ~# H% g2 J) {! }1 s* ze compiler itself is not that useful. I'm not aware of any companies current $ ^ b+ {7 m' W7 ?# o* rly working on their own C# compiler. Certainly, porting the runtime to anoth ' L5 J6 E; m6 W) Q; y" |% i
er OS is no small undertaking. ' A, P0 P* b4 H z 4 f) @( i& g4 ^4 u1 |2 c! b+ R, K6 J& @
7 Z! l+ U& o- G: V1 n. q Question #3 Can you tell us specific practical problems that C# can fix be 6 `6 \. G; ~! Y% {* @
tter than Java? 3 s( S9 A3 t% F+ w2 S
4 c+ ^2 \$ l3 k6 t
Answer I must be honest with you: I have never programmed in Java. I know . k1 x8 d& |+ ?: ?9 d+ |, T: f* o
what C# offers the C/C++ programmer: simpler syntax, components that seamles 9 P7 G5 I5 V4 R/ g+ Isly fit together, type safety, and so on. Other people should be able to add 2 F, k( F k4 Y: z. ]+ \1 M' e% d, lress the C# <-> Java comparison. * o8 ]! T$ f% s$ c& Q * j; l6 H, `& R& M _( i( i
# |6 r6 r. N: U Q5 m Question #4 Will ADO+ be the preferred and most efficient method to access ; l; O% w& j6 X' ` F6 O databases from C# or will it have it own (or .NET) class wrappers for the O , Y4 ~. w% i8 Y# t+ N7 o
LEDB API? 0 o9 D8 u# n$ H, K
! o2 E: U) P! ?. ] w! N Answer The .NET class library includes a System.Data namespace with many t $ s9 R% E8 }: c1 p! a$ R
ypes for database access. These wrappers will be the best (and most efficien % ]: L7 m% ^' x; ~+ \* ^5 z* dt) way for a C# programmer to access data. # g Y7 U# u) G+ u! G 7 G- N5 E8 S3 `
1 L, }8 Z' I: W; ^ Question #5 Can C# be used to develop Windows applications or is it soley 6 a/ R$ C$ {/ r: [0 W, ^. X
used for developing distributed applications? . S! ?6 h4 v+ `' K. a% W$ Z0 h- h O) r5 E7 i! I
Answer C# can absolutely be used to develop classic-style Windows applicat " I* l7 ?( L. a9 {( `$ ?ions. Actually, this is more a function of the runtime, not the language. So - K: [! p$ h4 b9 }; g3 P
, the runtime supports console apps, GUI applications, NT Service applicatio 4 K& K% f# A3 Y5 X, m' E# qns, simple components which can be used in applications, web pages and so on _! o, H" t3 |* ~4 m$ d. You can't write a device driver but that's about all I can think of that t ! }( A) g# U& z
he runtime doesn't support. & N: u i/ \# A/ ? ! L, b9 O3 z$ k3 D; f( @ . d+ B5 G* [# ?6 ~) I P V
Question #6 What is the C# relationship to WinForms? $ x' U7 [. J6 f3 [: K7 p
. m6 z- \& r) J+ C" X: Y& X3 V, s Answer Win Forms is a set of classes in the .NET class library that wrap W 9 h, ^8 h) b- {3 v; [, p/ k S; Cin32 windows, brushes, pens, etc. Any language targeting the runtime (includ 5 ~+ ]) e( Y" xing C#) can construct instances of these types and manipulate them. This is * P5 w. b) U0 t7 M2 q! ^6 _. s! v
how you would create an app like Notepad, Calc, or Wordpad. I know that Win ) }4 a( W& o9 a% T
Forms has similarity to J++'s WFC library but I also know that there have be & E" h* v7 T3 c/ g r% M0 Ten some major changes. 0 ^3 g4 i, [8 y7 |
- R2 q" f6 ^: d3 E 7 h( B% t/ o- i8 p Question #7 Rumor has it that the C# language has been submitted to the EC ; S O$ {* r3 @# |+ z5 S, r! O
MA for ratification. Is this true and what impact do you see that having on 9 d; X. L# m1 C1 r* p5 X' bother companies adopting it as a general language (such as C and C++)? ) p9 S0 S' q; f
) ^- c n% I6 q& m) i Answer Yes, it is true. I pretty much answered this in question 2. ' N7 [( k5 a3 t1 P( E6 S2 C
7 d4 H- Q8 ~$ Q9 C+ |. C ; p+ s9 o5 B% B- x0 ^/ ]0 ? Question #8 Which will be the role of ATL and COM in the new .NET technolo ( `4 V: N K3 _. a; ]( I# v, Y
gies? 6 G2 S n- a+ x: l c i9 x0 |, X, Z Answer The .NET frameworks offers a replacement for many existing librarie - f5 Y, Y7 z' T& ?* Fs, like ATL, MFC, C runtime library, standard template library and so on. .N ; m) Y5 N' _1 I. ~2 N
ET programming is significantly easier than using any of these older technol 5 t6 J- Y+ W. z1 d& |
ogies. For this reason, I suspect many developers will move away from using 6 {/ V3 T0 l3 M' v9 `+ J* k9 h
the older technologies. The older technologies can buy you performance howev ) o, j G9 L2 @3 H% F2 J. f
er; so, some people that are very concerned about this will stick with what' ( n% [! @. k9 k6 ]# m x/ h
s around. As for COM, developing components with .NET is orders of magnitude 0 h& W! C/ p/ h% `* n easier and the interoperation between components pretty much happens for fr " {2 \4 S6 ~6 a( }% Yee. Again performance may be an issue for some. And, for the time being COM+ / w, R9 |# e* W9 ^0 b% \
services, like transactions, are not being offered directly to .NET code. Y # J" f& Y. i5 r/ _) h& u R: x
ou can still access these COM+ services but .NET code must incur an interope 1 E% G8 |3 G$ j% ?- T% |rability transition, which translates to a performance hit. - `( g# u- K) s5 b9 X: W9 ~ 6 p% u; S1 w2 R& q . T: x9 Z5 y' Q I' t' P Question #9 Why was the templates feature not carried over from C++ to C#? 8 F6 V- Z- x& X* z 2 U: D( M0 C& E! K5 J
( U0 j4 j+ N$ r o/ } Answer Again, this is more of a runtime issue than a C# issue. First, temp . t3 P" g6 W- O9 E% c E9 {lates are difficult to implement and Microsoft choose not to do the work for - g) P! T9 F: B# q" a Version 1 of the product. They may do templates or something similar in fut 3 D: H( {+ ]# {: r' Z7 S, a3 G4 Z2 Nure versions. Second, since the runtime is a multi-language runtime, introdu + t8 A7 t. r7 r# }9 n, y3 d2 P! Lcing templates means that all languages targeting the runtime would be requi 5 A* ~- w5 W6 H$ ` g
red to support templates in some form. There are a lot of issues here that n 1 Z- ~* J: P" @2 d$ W/ Q
eed to be carefully considered. / C% W, M0 W7 `$ q" p& s
4 }! |- m7 v8 |9 W( {" a # z b' L! F! Y4 J Question #10 Will C# replace the pseudo keywords that clutter ATL COM code ' C1 X" B, g) s7 U! d1 L) Z
with real keywords? Examples: OLE_COLOR, BOOL, VARIANT_BOOL, and DISPID_XXX # K. n/ d7 x6 g+ @8 O4 J1 l" L# [XXX. % R5 _% H7 _! b A' x4 D/ z9 `
; i# I# g2 F8 R9 g
Answer Absolutely, all types have new names as provided by the .NET class # g% G6 p" c3 L, B0 Vlibrary. , h# ]. r- c! o* j1 o" m7 l 3 O( s+ w5 z: Y: U4 @( s4 k' ]
5 Z2 @( N% _4 [7 p! {! X. m
Question #11 We've seen managed extensions, but aside from that, what futu ( j2 c& O$ W) Q$ I( _re does C++ have at MS and in .NET? ' S" P4 M i% T0 l( s( V- @ * m! d0 ^7 c9 b
Answer C++ is unique in that it is the only Microsoft language that allows # o/ L& E8 |' H6 ?7 |8 N1 _
the developer to write managed and unmanaged code. So, I can easily see dev . z2 {4 X$ `# j& j& F4 G! \# X% selopers writing in unmanaged C++ for performance-critical algorithms and the + G; E s$ [1 ]1 s8 `
n using managed C++ for type-safety and component interoperability. I'm sure 6 m7 [7 W/ Z0 g. }6 ^1 M! } Microsoft will keep C++ going for years to come: device drivers need it, Wi 0 Z' O6 \8 J. K$ E& h' i6 p' p5 y
ndows is built with it, SQL Server< Exchange, and other BackOffice products ( h/ F! L1 t1 V2 y8 d- D' ?will probably use C++ for a long, long time. & n- \/ E0 S; g$ S& L5 L 6 B( I* q- u* d) [
6 ^, `8 y) _, s1 y+ d
Question #12 If .NET supports ActiveX/COM, how will security be assured if / G" s' N) `2 `& q3 m$ U0 O
a C# application runs from within a browser? ; a3 U& N. W$ s" u5 z! f3 [ / O+ L( z; t: ^, ~, d/ R$ a Answer The .NET runtime offers code access security, which allows an admin $ T, U8 y" Z. c, x9 w1 V) X q
istrator/user to configure security based on code identify. By default, any ( n7 ^, n8 r J! a. xcode downloaded via the Internet or intranet is untrusted and will not be ab * N1 ?) m; p$ M. Ale to access files and other resources. In fact, when I build a console appl * d/ C4 z2 e( G+ L/ Oication and run it from a network share, I get an exception when it tries to ) x- N4 ~4 P+ M `% ?! v" f access certain resources. If I copy the same file to a local disk directory 2 i0 f# e4 x! A% I" X% A and run it, it runs fine. Code access security is integrated with the runti & ^9 z9 U4 [" p% I6 [* P/ ~0 r
me and is too deep a subject to cover here. . ?. c- V2 l2 h9 W
6 i: Z1 @% M+ E6 m. U ! Q% A; }% N& s% ]5 i Question #13 With regards to the .NET runtime, do I need it on the machine 9 d% L( R" h: s that I deploy C# apps on? ( H+ U s* ^2 x, ~$ d
, Z+ i* v$ A, d; E( f9 L
Answer Yes. All managed apps need a manager; the runtime is the manager. M 4 b; u: O# p8 l4 |6 p5 I/ K
icrosoft will eventually package the runtime so that it is freely redistribu # n1 c& @/ ~ ]0 Y# ~% k' v! Jted. For now, end-users will have to install the full .NET SDK from MSDN web : y3 t2 M% x+ K& s1 O* n site (when available). This is similar to how VB developer must ship the VB 2 d P, L/ ~6 n. H7 Q3 W+ J4 Q
runtime today. ) Q4 D, c; o7 [0 @ Z# K* _7 p3 H+ H3 B, Q
# z/ a3 P+ m- a/ E
Question #14 There has been mention of being able to derive C# classes fro " [* i& [( @( o$ M8 Zm VB classes. Is this true and where can we see an example of how to do this 4 S6 ^- w& y, d4 T. F! `+ g2 k) _# z2 G0 e? 3 n2 c- V% Y T, ^5 D # m9 W' f7 j1 n/ @/ s
Answer This is true. In fact, any language that targets the runtime can de 0 L% p5 ^% z. u2 U$ F
rive from any type created in another language. Also, the Visual Studio debu 8 W& N' T8 V1 K$ n9 J2 Y: Qgger fully supports debugging across languages. Each entry in the call stack . y" R* h# ~' G4 r
window shows the function on the stack and the language that the function w B; E S1 V$ t* U) N, m
as written in. This is very cool and got a round of spontaneous applause whe 3 I' s2 s" ~# O# p. }& Z5 tn shown at the PDC. There are samples in the .NET SDK that demonstrate how t 8 ~0 j% g# N# h' ~+ \o do this. It's really quite simple. Actually it just happens, there is noth & T4 E# W4 ?( ^ J
ing for you to do. You can also throw exception across language boundaries a # m% f" p. R O' b: U9 h. xs well for error handling. $ [; c5 X4 Q; v6 I1 a ( K1 V6 ^8 ] {6 e( G# l4 D
; Y+ i, E* {7 O: R Question #15 Can I derive a C# class from a C++ class? If so, how? " k+ U1 U' e1 W& |/ x3 F, w
W/ R5 O g; Z# u/ v: `! g2 g
Answer Same as the answer above: Any managed language can inherit from a t , Z! x Q6 \3 }2 Y; K* {ype in another other managed language. If you use native C++, then you can't - m6 ?- v1 w9 B% U( f+ V% W
do this, however. P* ~; x" H1 x" ]& P0 P
0 |+ i* k+ V& P. ~/ q
: N3 H! |! H! ~& p3 b% v2 g$ Z
Question #16 Will the new version of MFC have the option of working in a m 7 i# B- g1 B D z
anaged environment? - y# T3 {' F) l& v; j2 b7 h! w
/ d. \8 \2 f2 q7 d/ T# z Answer I haven't been tracking the new version of MFC but I'm pretty sure 6 P! o0 p# n' _$ E" Lthe answer is no. MFC is all unmanaged just like it has always been. For man - Q! \, d% N, x5 W
aged applications, Win Forms is the window manager that people should use. 2 W9 s7 U+ S& _/ N1 b! d: s
8 {% D# N: n4 r y + J7 ^6 E/ Q4 Y8 l Question #17 If the new version of MFC will operate in a managed environme % x7 q% b& D: S0 Q/ U) U% int, will it have the option of building desktop Win32 apps and not needing . 2 [! N" Q, r( ^9 t
NET runtime support? 1 E& g! c& _2 r' ?3 D# I . V( O; G* y- c9 G6 K) O' P6 {9 [ Answer I'm pretty sure MFC is unmanaged and will never require the runtime 4 [$ u3 Z7 i) f2 u: ], P. : L8 A) l6 X3 E; t. s
7 V# X* C) g; {4 ], V) I 0 M$ U; T! ], v% d
Question #18 Stroustrup has been quoted as saying "I have not expressed a - N3 V" V0 {7 K7 E& Ztechnical opinion on C#, and I don't plan to do so. C# is yet another propri / t5 \, \! C" N3 \' F+ ?etary language specialized for Microsoft's Windows system." Do you agree or 3 f* p+ Y6 k' Udo you think C# is more of a generic language open to other platforms? 9 L: p$ b/ o4 G8 Y) u / O. s3 O# b; H+ E/ |/ I
Answer C# is a language designed for the common language runtime; not Wind y/ T) }6 s& m( c
ows. The CLR can be ported to other operating system like Linux and Solaris + V4 H9 L( j$ r. R
and if the CLR is there, then C# will probably be there as well. In the gran 8 F: v; l8 R( I# X
d scheme of things, C# is not that important or interesting. It is a syntax , N! b, H9 Q9 H
checker that spits out intermediate language consumable by the runtime. You # C% o8 T0 A; p" |- o" i7 {7 P
can love C# or hate C# - your choice. I happen to love it and think is the b ' {- K9 m; G1 r! H/ T. ^0 f4 R% Y2 |8 Vest programming language for the types of applications I write. ; }" P0 L# q+ W5 P$ q" ~: A # c5 ^7 J- L. A' s2 Z$ w" a# p
/ r5 q& z9 Z; m. ?1 d, v
Question #19 I heard a rumor that VB7 will allow static linking of the run 5 U7 \. s7 @0 U$ Z
time, like MFC. Is there any truth in this? If so, will C# also be able to c + S6 ^1 }0 c w1 W
reate standalone apps? . V- V& ?6 ^' h9 i
& S3 M' ^4 L# f* V* d Answer This is absolutely not true. No language will able to statically li . H5 X' | o/ E2 B; d7 N) h- |! c
nk to the runtime. ) j2 @. S" s6 [/ y$ [' U4 w + s8 {: j9 h, z, o* Z
" E9 R+ V( U2 i7 E. J2 i
Question #20 Does C# still use resource files? If not, what mechanism is p N4 S/ s% P% w- b& K( _- C
rovided to allow for localization? ; a# a& Y, Q4 u: ` 0 Z* i/ R4 @' u6 Z( a2 O7 d
Answer The .NET frameworks designers have created a new resource model. Re 3 M( R* E/ I$ }6 }% U P8 esources can be embedded in EXE or DLL files the way Win32 resources are or r 3 r) b- ^. o) u0 R8 J
esources files can now be stand-alone files like a single jpg or bmp file. T 6 @) n6 @( U' G3 Nhere is also the concept of fall-back cultures. If the Swiss German resource 6 K- q9 ] ~# F A. x! ~" a& s2 h can't be found, the runtime looks for the German resource. If the German re " ?' ^0 P* W' `, o1 r( Nsource can't be fond, it looks for the "default" resource. Each language wil 3 ^3 L! p U/ ?8 _8 G
l typically be built and shipped as a separate assembly rather than packagin ) [# P% ~" z+ Q$ {5 gg everything up into a single file. Like code access security, a full discus ' F+ B' V% q( b/ _* a" gsion of the new resource model is too much to put here. 6 G% L' }( z+ m" b* @6 ~2 Y/ L4 r7 S / B7 M [: S& J/ D" X8 R, z6 `
% |7 B3 \# r* }$ ^ [# n$ Z $ m2 k5 p5 W) F1 r! t- A# c% L
; f0 U8 f9 |; y( N F. z
wenyy 来自 <a href="http://www.vchelp.net" target="_blank" >http://www.vchelp.net</A> : 7 R. |- V- S- q" P u! ?+ u & f/ f, Q) m" w5 I2 C# @# ~9 N; e 我想应该这样说,一种新语言的出现会在一定的功能领域上替代其他的开发语言,以 1 _7 q: E2 S( w8 U) ]+ F
前的开发语言的使用范围会缩小,但不会消失。(就算是出于保护现有资源的目的) . w& Y/ w& S; r8 p: {
6 b* @, t# H, x( g6 L ?8 W2 Y" O- p 但没有一中语言是十全十美的, ' L% Q9 M9 B, V h
1 `; o% B6 ~# n3 ~% | t* \" V
JAVA,C#都不是。 0 p1 e! o- T% b& T; V# F5 q1 n6 a * {& X% W$ M s+ j* n( ]
3 t: G9 C! m+ \: b2 k9 e; t 6 o0 E- K e% I
wenyy 来自 <a href="http://www.vchelp.net" target="_blank" >http://www.vchelp.net</A> : # W! n- o8 C% E/ G/ d2 W
# G8 A0 m; ^. b' S4 r 》》恶魔吹着笛子来 ( z9 O# E* q' ]! n
]. m6 y5 m' m- v
你好, : y; ^8 {$ D( J* u 0 c* X! e) T# B1 N9 ] k& L: D' x
很高兴能够与你进行讨论, * o5 b' v! G. b" @
7 ?4 \0 |. M, r! d
虽然本站名字叫做vchelp.net : W2 c% H+ _) T# A+ b , _/ E/ l3 O) i6 Z
但我不排斥其他的开发语言,只是自己的能力有限不能将本站内容扩展到其他的语言 7 n/ M* i( X; f" x/ |+ k# K, 7 a( E' o" r6 R4 l3 E0 v. b
9 q# i! m+ W& r& z; ~$ i
但我很希望大家在本站对开发中可能遇到的问题和矛盾进行讨论,不论是关于语言还 9 V1 \/ R& ]( E3 p4 y6 [
是开发方法的。 $ p- c; n( y' p3 L8 [# G2 S0 M$ m6 y) Q
3 u" X+ _$ a5 {
我想邀请你成为本站个人专栏的作者, ' u' ]; `* Q- d+ i ! p/ S( D5 u2 g7 c- ?; }2 \6 z
你可以发表一些你关于开发的想法,就算是与VC无关也没关系。当然在时间上也没有 & A2 W6 t, S4 w8 n, u要求,你有时间就写写。 9 C" O+ j) I% f
5 T6 L* S$ R3 ?* [( c
盼复:<a href="mailtwyy_cq@21cn.com" target="_blank" >wyy_cq@21cn.com</A> ) B* y2 y5 z: ^ s
5 `$ M& z+ q3 A* w, B! O8 b& A9 @ cuixue 来自 http:// : . Z+ F3 p0 d+ p( D
5 b2 W8 _" j% z; L. j" w
看了各位大侠的话,觉得好像在讨论java,其实历来有两派,smth几乎天天在吵, 2 ~9 H' Z0 G( l N+ y) _
0 [! a q4 ?: f T
喜欢java的同志到各个地方布道,连perl也不放过。呵呵。我个人觉得java先天有一 6 }& f. ^) l, t7 O& s
些劣势使得他无法取代c/c++的,他的垃圾收集只不过通过一个线程来完成,这对实时系 1 @: ^& a9 o/ q" C" Q N3 Q
统是来不及的,EJB的推出也说明java原来是不适合企业级开发的,没有语言是天生完美 , D+ e- O7 y8 X3 X% S& z, w的。java最大的困难我觉得来自microsoft的刁难,c#的推出无疑会夺走windows平台上 ; P1 G4 P/ r( A: {" K }的java份额。java的速度也就不说了。jbuidler的速度不能够忍受阿,可是这样一个产 ; w- W# X; M# e- |, l品就是java写的。由于个人见识不够,实在不能理解海量吞吐的 6 P8 r2 i- D3 g& z- _. B3 Z
6 n. I9 Y/ G6 V8 }) E3 w. V' A server用java.oracle用java是实现了ejb的集成把,他的数据库engine是不是java 的 , g% y2 D0 ~) w$ q2 S+ `那?请大侠指点。而且当时号称8i不要操作系统,结果市场反应平平,还好 5 Y3 W; h" c' p0 x+ [% D( s9 o 5 Z$ a; F0 w: e7 E5 A8 Z 搭上了e-commerce这班车,:) 1 R* I. Z# z$ i 4 I6 |9 {8 J1 Y Z0 Q( Y 在说说我对vc和bcb的看法,这两样我都算粗粗用过,紫云影说得挺好的,比较公正。 0 F6 g6 }& O- E0 `1 [
MFC的确稳定,ATL未免有点复杂,要不WTL就不会出来了。vcl的源码有一部分是pascal ' _' A% d7 ^1 R+ m5 F+ o- x
写的,这点有点差,不过他的扩展性很好,用用就知道了,决不是好多人认为的vb式的 ~0 z2 m" o" M o: h1 ~% J- Q/ _( |
傻瓜工具。道理很简单,应为他是符合ansi标准的c/c++语言。其实vc是不够ansi的,C 3 T! z; `" Z, iString就是不符合的,所以bcb用了 AnsiString.可惜bcb不够稳定。 * t9 E) ~- M- g& b! V 0 _ l- s) \& I ^9 _! H& ~+ ^ 提示太慢。帮助的问题我是这样看得,msdn不是专门给vc的,他是windows开发的指南 * `' u. ~0 n% Y% A1 I
,用bcb一样也很有用,是个宝贝。 5 Z& |, b: z D- O, n0 \
* K- W: C/ g/ e
好了,不说了,反正按需所取把。 ) B ]/ P q$ ]9 O
3 O2 L7 R* s: N
cuixue 来自 http:// : 4 b4 n% |$ A. t7 S- K, A7 y3 z