- u/ _% h' _! } ) _9 ~+ m: a, L% M+ _. p" ` zhangxiuyong 来自 <a href="http://www.ucancode.com" target="_blank" >http://www.ucancode.com</A> : 2 ^' l( p2 y; p
+ \' ?. c, \0 Y$ R& \
其实我认为,对于Visual C++本身的理解不是向你上面谈到的那么简单,Microsoft 8 }- ?2 b0 k/ O6 p$ y
在开发Visual C++的时候是希望为其开发人员提供一个可靠的开发平台,便于用户可以 * k" o$ K7 w- A% c0 M) z7 o( B* F( q3 f为Windows上面编写各个方面应用程序,包括:数据库应用程序,硬件驱动程序,网络程 / R# u0 S- t0 z N% s
序,多媒体程序,游戏程序等等方方面面,试想如果一个开发平台要同时完成这么多个 # D6 O" M8 M' ]& q7 \# k方面的开发任务,是需要考虑多少的问题,因此Visual C++在设计的时候就考虑了提供 8 ]9 a8 D2 G; e) o一套类库而不是直接提供黑匣子式的开发组件来完成开发任务,提供的类库MFC具有很灵 # ?- j; U6 c; f }( m' G
活的设计结构,以及良好的继承性,同时配合DVS文挡视图结构来组织程序开发,虽然我 # c6 Z7 ?% s- l9 o( M5 {/ ^ M们承认利用VC开发程序(数据库方面的程序)没有其他的RAD开发工具来的快,但是如果 : o. F/ L5 r5 ~* H5 y* M7 v; @
你真正利用VC来开发的话,你会觉得你不会去选用其他的开发工具的,对了各位听说个 3 h9 y: n* f* J& Z多少开发人员是从VC熟练的开发师转向VB,Dephi的开发工具的吗,当然DVS结构本身也有 6 o: X: K5 y. a其很大的弱点,如很难重用。同时在CView中再嵌套CView的变得不可能。不过对于开发 " F4 y2 L0 g) L) H. h
中小型的程序(代码在50万行以内的程序却是可以的了)。对于特大型的程序我想最好 * `( m" l P; ?8 J% M可以借鉴一种新的技术叫做MVC的开发技术来组织你的程序吧。好了各位此些文字,仅代 . k/ v8 \$ t" q, N1 W. d3 g" s
表个人之言,如果各位感兴趣可以到:http://www.ucancode.com上面看看。 + ^5 p8 U; G0 G* B 6 T: f0 X% U+ h6 x4 m zhangxiuyong 来自 <a href="http://www.ucancode.com" target="_blank" >http://www.ucancode.com</A> : 6 G( \# [( g6 K! Y8 \4 \% C 9 }1 D+ F( H4 F& _' p
其实我认为,对于Visual C++本身的理解不是向你上面谈到的那么简单,Microsoft ) ~4 r% u- {3 j; i+ R
在开发Visual C++的时候是希望为其开发人员提供一个可靠的开发平台,便于用户可以 6 v; r2 r( F6 a为Windows上面编写各个方面应用程序,包括:数据库应用程序,硬件驱动程序,网络程 8 M; L( u9 v( @$ x! n& G. e. c
序,多媒体程序,游戏程序等等方方面面,试想如果一个开发平台要同时完成这么多个 # S: Q- l1 S) u" w* w' E) P D; @方面的开发任务,是需要考虑多少的问题,因此Visual C++在设计的时候就考虑了提供 3 n! s2 b) L2 N# [- z2 p
一套类库而不是直接提供黑匣子式的开发组件来完成开发任务,提供的类库MFC具有很灵 4 D. j4 o$ R* d. k( F活的设计结构,以及良好的继承性,同时配合DVS文挡视图结构来组织程序开发,虽然我 / t5 |$ d# k+ z' \们承认利用VC开发程序(数据库方面的程序)没有其他的RAD开发工具来的快,但是如果 4 ~# Z1 B. K& Z' A$ `
你真正利用VC来开发的话,你会觉得你不会去选用其他的开发工具的,对了各位听说个 7 {/ C$ u; z$ A( ] Y( E4 t
多少开发人员是从VC熟练的开发师转向VB,Dephi的开发工具的吗,当然DVS结构本身也有 7 Z* |+ B. j( h* M: j1 U其很大的弱点,如很难重用。同时在CView中再嵌套CView的变得不可能。不过对于开发 1 X+ a) ?. Q8 X5 J; Q中小型的程序(代码在50万行以内的程序却是可以的了)。对于特大型的程序我想最好 6 y. [! i9 y# N& M* S可以借鉴一种新的技术叫做MVC的开发技术来组织你的程序吧。好了各位此些文字,仅代 7 v9 H6 [5 U+ W6 B3 H5 q0 \( k表个人之言,如果各位感兴趣可以到:http://www.ucancode.com上面看看。 ( h% @3 S( Q- f* @
! [) x9 `( R+ s Y: H$ J; l zhangxiuyong 来自 <a href="http://www.ucancode.com" target="_blank" >http://www.ucancode.com</A> : 6 O; @& X: q" a6 e+ J5 C) O- d3 D
" N+ g8 r. |' ^6 S* ]+ ^: e
其实我认为,对于Visual C++本身的理解不是向你上面谈到的那么简单,Microsoft $ w/ Y) w" }8 G; a0 n7 j
在开发Visual C++的时候是希望为其开发人员提供一个可靠的开发平台,便于用户可以 5 s$ H p# {; T- W4 R1 H" o2 e为Windows上面编写各个方面应用程序,包括:数据库应用程序,硬件驱动程序,网络程 . Q6 h- v! [# L/ e. Y' S+ G
序,多媒体程序,游戏程序等等方方面面,试想如果一个开发平台要同时完成这么多个 ) Q4 z7 N5 g `$ O+ s方面的开发任务,是需要考虑多少的问题,因此Visual C++在设计的时候就考虑了提供 7 U' \! _$ T# d6 p% A# V% d一套类库而不是直接提供黑匣子式的开发组件来完成开发任务,提供的类库MFC具有很灵 8 \2 ?3 f2 N8 ^活的设计结构,以及良好的继承性,同时配合DVS文挡视图结构来组织程序开发,虽然我 & w5 \' f3 y; e0 K. k8 p
们承认利用VC开发程序(数据库方面的程序)没有其他的RAD开发工具来的快,但是如果 0 d0 \+ N" G" z) V7 J
你真正利用VC来开发的话,你会觉得你不会去选用其他的开发工具的,对了各位听说个 , a. P* z) R& T* m多少开发人员是从VC熟练的开发师转向VB,Dephi的开发工具的吗,当然DVS结构本身也有 & \# ?+ i' o( x% g3 \其很大的弱点,如很难重用。同时在CView中再嵌套CView的变得不可能。不过对于开发 0 p0 O6 z; A" ~* k& j, R+ G$ U& r
中小型的程序(代码在50万行以内的程序却是可以的了)。对于特大型的程序我想最好 8 M# Q2 Q' F+ D1 L
可以借鉴一种新的技术叫做MVC的开发技术来组织你的程序吧。好了各位此些文字,仅代 2 b' s1 T3 P# U- E" l) r
表个人之言,如果各位感兴趣可以到:http://www.ucancode.com上面看看。 / O$ q9 k1 u: U9 W) _1 [8 o
( z3 [" y& w2 s
wenyy 来自 <a href="http://www.vchelp.net" target="_blank" >http://www.vchelp.net</A> : % @2 u0 U u% P v& R
+ P. H1 ]4 m- A; H9 ` 我一定程度上同意 恶魔吹着笛子来 的说法, , u5 X s9 F! Y- |) h8 I& I# L 1 d+ @. h$ I, R. {3 b3 Q 毕竟VC开发速度是比较慢的, ) I, A* z. Z/ k4 ]. @ . z3 D. B w& L9 c3 u7 N. D 而且硬件速度的大规模提升也为使用JAVA开辟了道路, % {# n3 h: ~# E2 N9 t 5 |4 A* @# Z" A- \+ x 不过microsoft.net的目的是一定程度上改变MS的经营性质,和开发关系不是很大,但 3 i, X2 c! V# T4 X* V$ E
是MS的一贯方针都是在平台上为开发人员提供方便, 2 O, D( C8 L0 K8 Y7 W4 G " m& a+ v# J; \7 j' k* `- e( E
所以C#是为了.net服务的。 : V6 C% s9 A% i7 N- G" j
& [3 t5 o7 N# R: C' s" v 6 ~1 W! a- l) M5 r" r5 y
此外我想我没有精力再搞个c#help.net了。:-P : N9 t, p: D% @" X5 l0 {
) A$ Z) i/ z/ A/ }1 T
果子 来自 http:// : 3 L( P4 |! q/ v. E1 s $ l4 F& w- H9 u5 I' W2 G3 y
"恶魔吹着笛子来"是比较“前卫”的一类程序员。我就听业界的人多次说过JAVA也是 Q/ _! L1 Y9 ]) M* V, y 3 W# ?- {; [- y3 Y% `2 J . o! v1 {5 N! Q9 J" G0 [1 g( Z
个吹得很响的东西,但实际如何,大家都看得见。至于认为C/C++开发工具(VC, ! n% L* q. Y8 P
7 Q2 x$ N) N2 z6 K6 P3 X BCB等)会在一两年内退出市场,就是无稽之谈了。 4 H# |8 Z/ n$ {/ n
4 {/ y+ z5 B4 t- z% g! v
Wesley 来自 http:// : ) I a1 r" p- S/ s3 ? . X/ `+ o* d- m& Z4 C0 I
恶魔吹着笛子来,你的观点很有启发性。能不能写一篇或推荐一篇剖析、比较Java开 4 Y7 _- h" N# p; Y, C发工具的文章?比如Visual J++, JBuilder,以及Symantec和IBM的对应工具。(可能和 ) W' ]. t5 @% F; v
本站的初衷有些不合^o^) & N# C: H* U0 T8 Z) D# z
* T/ _" v( h! ` LeoCN 来自 http:// : . Z9 d8 N k# k! m7 B3 W , c5 o/ A% f E0 v: @ V2 u/ b
It's not a time for us to determine which language will more better! ! H, Q# A" M- g
6 O0 [2 \% g0 Y5 i: h in factly,In China,too many corporation just writting some codes for 2 ]" m5 c' s( q& j; N9 C s
9 i% U; r, ^0 c0 Z: i" }; @5 e enterprise's MIS,OA,ERP or other application.It do not need so speed 1 n) h* R; z, }1 r
( S- _% {3 R& Q+ s
and do not need so good original code. just want more data,more easy and m : ^4 S+ g+ C* G* ?0 w/ m. r( ^8 u
ore quickly. + L+ A* i( s4 G& z- Y ' x, Y0 v2 E& D. l
so c++ is not a choice in such enviroment. and u know,many codes we write 0 {* t6 u( d3 ztoday will be useless.and there r so many easy tools such as VB 4 I* M- k% L: ]" }3 r* [ ( U* C3 x) d+ n, o9 c
for windows designer, Developer/2000 or PB for database,Domino Designer fo z. A5 a, X5 A" s5 Dr OA application,why c++??? $ r/ ]1 Y8 F' V4 N4 L 6 c0 P& [ f9 O/ P in DOS mode. i like Turbo c2.0, with it and MASM i can do everything. ) t& P$ ]* g) K8 \
0 {1 Y7 m! H/ r9 l0 c
but now i hate c++, it has waste my time! my corporation do not need + P$ w+ c% i3 u # g7 G2 |2 U9 z& b/ g
c++,just need java,xml,php,pb,vb,delphi,developer/2000,domino designer etc ; O$ Y9 i" n6 T& H. i3 t
. ' G% w' ~2 L& A i0 j; Y \ ) {) @! a1 g% L, x7 O0 x% ?5 j" `
so, a tool is just a tool,if the advantages in some aspect of the tool + U n! ^- ` ?3 p3 |
/ ~8 f: T9 o) b7 K
u needed. it's will be a good tool for u. others it can bring u unfortunat 0 w% r7 s# X7 S0 i S" W% Mly! ) V0 I% g6 N) \7 b + \# g' @ Y) T: j* P
恶魔吹着笛子来 来自 : & A4 o! ?( y2 ~) N
7 D' ^8 L0 Y, G9 f# o, A0 _ 同意恶魔吹着笛子,你简直是我的偶像,顺便贴一篇关于C#和.NET专访 " k; d, ]2 e* e6 v0 u 1 G1 ^; W5 ]( _' j0 ]# I1 L
NET and C# Questions with Jeffrey Richter , z- v; t; m8 T, q% m: o0 `: F
1 U6 i4 y$ ~: C' V In the weeks after Microsoft made a huge splash in the development communi 4 ?5 b2 X4 S2 J; S* {ty with their .NET and C# announcments at the July 2000 PDC, Jeffrey Richter " b6 t6 V6 p5 N5 d, D4 z) p5 m accepted our request to field 20 questions from our readers about these new 6 [( q1 A7 k) c, t8 q
technologies. As many of you already know, Jeffrey is a cofounder of Wintel " b. Z4 G- @" i3 R: C+ y
lect, a company that specializes in Windows & Microsoft.Net training and deb ( z6 J. G5 r" ? P. ~% yugging. Jeff is also a consultant at Microsoft working on the Microsoft.NET * i! B9 Z3 z/ q% x) t
Common Runtime Language (CLR) team in which C# and Visual Basic 7 applicatio ' @, [. c4 D' Y4 t) E/ ?5 n& lns operate. Below are the 20 most popular questions that were sent in and Je 0 R n! q" P, p8 tffrey's responses. / u/ F, C8 i0 \: \2 l$ |
% S; v+ C* O" ^/ A: [9 @& E# D1 k6 o For Visual C++ developers everywhere still trying to get a handle on all t h" F3 @7 r6 N% W1 Y3 K0 {his: Thanks Jeff!! ' A8 U2 s3 X# ~: P0 V- U 1 r7 L: P8 }7 C e/ v / u S; A8 l2 F2 m- E
Question #1 Is .NET a runtime service or a development platform? & F8 c' O* ^1 M
( M Z. K6 k( |* T* |7 s
Answer It's both and actually a lot more. Microsoft .NET is a company-wide * z" q* ?4 d0 y& H+ ^3 ^ initiative. It includes a new way of delivering software and services to bu - d" d; h* ^: D' @/ b7 w
sinesses and consumers. A part of Microsoft.NET is the .NET Frameworks. The - o* D- L: _: l! [! O# Pframeworks is the first part of the MS.NET initiate to ship and it was given 7 w. @4 b r* S: U: t3 c V# s* p out to attendees at the PDC in July. The .NET frameworks consists of two pa * n+ p8 S( c" M& ~rts: the .NET common language runtime and the .NET class library. These two & j# s" i4 S! v1 Y7 U, x3 s- c
components are packaged together into the .NET Frameworks SDK which will be % P( K z. S$ b4 ?* e7 w8 w
available for free download from Microsoft's MSDN web site later this month. / Z# f! K D5 T( K9 Q5 n In addition, the SDK also includes command-line compilers for C#, C++, JScr 0 |8 t: E) n! b' ^. W
ipt, and VB. You use these compilers to build applications and components. T 3 a2 Z" W& |5 j3 `" chese components require the runtime to execute so this is a development plat 7 J( _) n4 w! E$ D9 c! U5 y/ aform. When Visual Studio.NET ships, it will include the .NET SDK and a GUI e ( U9 W4 _7 K9 c0 t1 F5 A3 E" hditor, wizards, tools, and a slew of other things. However, Visual Studio.NE " L. u7 h$ q) \, d: s: b/ r& S* _
T is NOT required to build .NET applications. % L# h4 ] Z6 L* E4 N& e0 S
6 L5 X: K& Q) m `8 a5 L
) n: k2 U) h2 \5 ~ Question #2 How likely it is for C# to become a general-purpose (meaning: o! e* |8 F" c( A5 }* `# K
not MS-specific) language and if so, have any other vendors committed to pro 3 Y$ o/ J5 f x4 q9 K" E8 g
viding compilers on any non-Windows platforms? " w* F- t1 s) y0 p2 O# z # Q8 l0 D% Z. d% L: j4 F Answer It's hard to answer this right now. I have been programming in C# a - C7 p/ ]" \% G" V9 R
lmost exclusively for about the past year and I love it. It only took me a f 7 Q, m3 U- f, t Y# C$ d, U
ew days to learn most of it since it is very similar to C++. It was designed 5 c: m$ V8 n& I to compliment the common language runtime and I think that it's unlikely to % F# c, Y3 J2 q5 `+ x5 e3 U! B gain much momentum if decoupled from the runtime. However, you never know. ! P7 o: Z i+ i5 q2 E7 r: W) j3 ? c
Microsoft is submitting C# to the ECMA standards body so any company will ea 6 j# t, F3 o' l* x7 E8 }* bsily be able to produce their own C# compiler however, without a runtime, th : P1 m1 P. L6 X F4 s- a* O# o* K& y
e compiler itself is not that useful. I'm not aware of any companies current v7 G# P( T6 {ly working on their own C# compiler. Certainly, porting the runtime to anoth 0 P6 r z! |' aer OS is no small undertaking. " N. A$ K9 d6 ] i* r( L& ^
/ Q; {8 @$ m7 E ! w; f3 |7 z j$ ]: O8 S Question #3 Can you tell us specific practical problems that C# can fix be 5 H- r n% O: u$ w1 u5 ?" Qtter than Java? 2 Z1 y& H( g1 L# p4 c, J
- |' D+ I$ q! H$ V0 D
Answer I must be honest with you: I have never programmed in Java. I know ( z# B" k7 X R0 m9 a" P
what C# offers the C/C++ programmer: simpler syntax, components that seamles 5 {/ e" x. {6 H7 g& H
sly fit together, type safety, and so on. Other people should be able to add : T; }: f: [3 o/ P; Z4 Vress the C# <-> Java comparison. . \: F% \! X1 W0 Y, B8 r 0 b6 n% c/ E9 e" S( p
' D2 D5 Q* x. N) l) |- F, `
Question #4 Will ADO+ be the preferred and most efficient method to access ' h q) j7 g. W( m. ~ databases from C# or will it have it own (or .NET) class wrappers for the O 7 t3 u& P' a( U9 H; {1 b8 JLEDB API? 8 w; R; K! [1 h6 A+ o Y5 B 2 a+ k+ P* f! i0 G9 j% q Answer The .NET class library includes a System.Data namespace with many t * [8 \9 e# N) v
ypes for database access. These wrappers will be the best (and most efficien ! `: w& d& \: K4 e3 e
t) way for a C# programmer to access data. 3 ?& y7 Y1 n+ h# ^9 J+ [ , U. f: w& Z* M# g( l( N$ k
3 N; Q" K( M& ]# t Question #5 Can C# be used to develop Windows applications or is it soley 0 J8 m2 z K$ j- j; Jused for developing distributed applications? # v# @; M0 w+ {( ^
5 a( k# E4 Z, f5 f# d' q Answer C# can absolutely be used to develop classic-style Windows applicat # m7 T p3 X( {* o6 X% Tions. Actually, this is more a function of the runtime, not the language. So 1 {8 i" \1 q* A- k' ^: a( z3 Z
, the runtime supports console apps, GUI applications, NT Service applicatio , ~ D2 W. I; ^; t4 M, |# Bns, simple components which can be used in applications, web pages and so on 6 s. T G ^6 l0 H" ~0 w: o
. You can't write a device driver but that's about all I can think of that t - S) y, @/ e4 f2 y+ j$ C) W
he runtime doesn't support. P; n" W1 r) m8 b3 ?5 h4 p . c. H( C6 C# k
) R* G1 |1 g5 L Question #6 What is the C# relationship to WinForms? % X! h6 G- o6 e) U
/ N9 F( N- D- v6 m; Q Answer Win Forms is a set of classes in the .NET class library that wrap W + D: @: F2 g7 h% M. T* gin32 windows, brushes, pens, etc. Any language targeting the runtime (includ 3 n/ z9 t- ^, m, ^' ~/ J1 l/ i
ing C#) can construct instances of these types and manipulate them. This is 3 G% P$ } O/ u' v: O+ ~! c# H! E
how you would create an app like Notepad, Calc, or Wordpad. I know that Win & D* v* s* a2 CForms has similarity to J++'s WFC library but I also know that there have be / H+ l" |. u( m5 n$ aen some major changes. 8 Y) U; G1 {8 }6 A* z9 m1 O9 d e ' z7 \& y# Q$ h& d0 T$ l2 Y , N5 F, X- j2 X. i1 s( `! ~ Question #7 Rumor has it that the C# language has been submitted to the EC 4 R6 H7 s, e0 bMA for ratification. Is this true and what impact do you see that having on 8 H. S3 K3 _; a
other companies adopting it as a general language (such as C and C++)? % f: k$ _9 d0 @4 K, _
6 a: Z, m0 i' A6 u( i* K4 y; g6 f Answer Yes, it is true. I pretty much answered this in question 2. . v9 _ [' R& E& H5 ]$ N" H
4 S* c0 E* H6 C 2 ?2 [" X+ I- ] Question #8 Which will be the role of ATL and COM in the new .NET technolo / U& l8 P1 x- G
gies? ! ]* p: l: ?/ x9 V7 h- v* Q; i ( B+ R; G7 y4 f, Q/ E Answer The .NET frameworks offers a replacement for many existing librarie . G" M. r, X) K. E
s, like ATL, MFC, C runtime library, standard template library and so on. .N 6 H& i# x! v* lET programming is significantly easier than using any of these older technol / Z! o/ {7 \& Oogies. For this reason, I suspect many developers will move away from using 7 l6 M0 L2 v) V' A# Lthe older technologies. The older technologies can buy you performance howev 3 Y1 b% L% i8 b
er; so, some people that are very concerned about this will stick with what' & x6 e p0 \& H/ J [1 W& [
s around. As for COM, developing components with .NET is orders of magnitude + @9 D! ^( ~/ V
easier and the interoperation between components pretty much happens for fr . f! G+ [. G: s* P/ ~ee. Again performance may be an issue for some. And, for the time being COM+ l9 D2 v9 j3 w8 D# M services, like transactions, are not being offered directly to .NET code. Y . F+ [+ a* O1 T) Q% v/ U
ou can still access these COM+ services but .NET code must incur an interope " F! T, R+ O1 B, R& x" h6 arability transition, which translates to a performance hit. # D0 B1 t" p& Z) u$ z0 y 9 d# q! t) A9 l8 |$ O1 J9 M 4 L0 {- _) U- ]8 P- v/ W/ p$ l
Question #9 Why was the templates feature not carried over from C++ to C#? 6 w% q: l& w; u' X3 f 8 a5 n0 T R* T R, \9 }) V 5 G* O. L j1 c Answer Again, this is more of a runtime issue than a C# issue. First, temp - H0 B7 s8 U7 P5 p3 B
lates are difficult to implement and Microsoft choose not to do the work for 9 K4 F3 l/ H* v* t" T; o Version 1 of the product. They may do templates or something similar in fut [) N0 c6 p3 U% P$ B4 V( L
ure versions. Second, since the runtime is a multi-language runtime, introdu 4 n5 n$ B6 Y( V
cing templates means that all languages targeting the runtime would be requi % }, d3 n; i( a( ? T4 F
red to support templates in some form. There are a lot of issues here that n * v* K9 r9 \0 K5 K9 e
eed to be carefully considered. ' B: ~3 D0 U# d9 g 5 A* [7 ?* f* n3 U8 S 5 {* z% h* T/ K: [# X) a* [5 V# J
Question #10 Will C# replace the pseudo keywords that clutter ATL COM code 7 N' I/ O0 `5 L e& Q
with real keywords? Examples: OLE_COLOR, BOOL, VARIANT_BOOL, and DISPID_XXX * a5 Q4 |5 O8 t
XXX. $ y- v6 W! k# x5 k$ v, ?
+ K' R9 U! q, J Answer Absolutely, all types have new names as provided by the .NET class + F' @- V1 `: Clibrary. 7 E+ K: E. ?( L2 ?& ~ 3 Q( P3 ]) z8 t3 z& \% c " {4 V3 u& D7 W( h3 H Question #11 We've seen managed extensions, but aside from that, what futu & p+ l- i# y" c, [) t8 }
re does C++ have at MS and in .NET? 0 a6 K' Z: f5 X7 G$ [- W' `, H. F# ?9 N # X% Z1 x1 }( \0 w9 @) A- [
Answer C++ is unique in that it is the only Microsoft language that allows : l8 H- W% f C4 V. C
the developer to write managed and unmanaged code. So, I can easily see dev 4 d0 R8 @; J+ E/ i# u. z
elopers writing in unmanaged C++ for performance-critical algorithms and the `& C( x3 }5 }$ Sn using managed C++ for type-safety and component interoperability. I'm sure ) l+ ]/ Y( p/ w7 ~ Microsoft will keep C++ going for years to come: device drivers need it, Wi / ]: w& Z3 t8 i
ndows is built with it, SQL Server< Exchange, and other BackOffice products $ z+ H9 S7 O# y2 n3 m* ?
will probably use C++ for a long, long time. ! e5 g+ b! f# }8 J% v, S
2 a) @% u( C8 w3 [2 n
% w' N4 b1 C3 x/ V9 A4 m4 E
Question #12 If .NET supports ActiveX/COM, how will security be assured if 5 a$ H& ?8 b* Q M; T2 U
a C# application runs from within a browser? + p( }5 z% e& l9 n8 V, N- J & e' n9 I: N! |& J" R; `. F Answer The .NET runtime offers code access security, which allows an admin ; \: X+ I: Z/ I6 N: aistrator/user to configure security based on code identify. By default, any 4 U& L# S6 k$ _
code downloaded via the Internet or intranet is untrusted and will not be ab . f2 T/ T) X, p) ?2 Q( Hle to access files and other resources. In fact, when I build a console appl 5 m. K# x6 V( T9 o* I! Gication and run it from a network share, I get an exception when it tries to / q* y# ]: l/ a3 V access certain resources. If I copy the same file to a local disk directory ( p6 x( s8 D9 r+ i- M) j
and run it, it runs fine. Code access security is integrated with the runti , L0 s% G \8 z5 S3 H+ l' ?me and is too deep a subject to cover here. 5 i; @* _' Q9 B2 { X: k
/ s Z( Z$ E" c, r
: N* o% K( \/ t, o
Question #13 With regards to the .NET runtime, do I need it on the machine 5 \4 m( X9 f7 @& [" f
that I deploy C# apps on? 9 m9 ?3 i- p7 c9 g' v & E/ ]8 J( m1 X( u& g Answer Yes. All managed apps need a manager; the runtime is the manager. M . W( t! b6 \6 Yicrosoft will eventually package the runtime so that it is freely redistribu & u2 n8 e: k4 Q$ E
ted. For now, end-users will have to install the full .NET SDK from MSDN web - c9 e2 K( w: X7 ~( t site (when available). This is similar to how VB developer must ship the VB * S' [: X8 C" `6 U runtime today. , @' I- m* r+ f* Q
( W! B+ Z6 R7 k/ F
/ I4 g& k$ O! y, o7 q1 G ~ Question #14 There has been mention of being able to derive C# classes fro ) T2 {3 l- l6 a/ v; T
m VB classes. Is this true and where can we see an example of how to do this # |3 v3 c! E+ L" i' `2 d4 Z2 N8 e2 u? + g8 F# p: _& P4 [& Z% d( [( \- t0 T
@1 N" L: k" N8 Z
Answer This is true. In fact, any language that targets the runtime can de # ?0 _0 v! g) l$ Z; h* K& h
rive from any type created in another language. Also, the Visual Studio debu 5 T3 ^, [1 V8 P7 S$ [7 D0 G: y5 W( Z; M
gger fully supports debugging across languages. Each entry in the call stack ) L7 }$ b3 X' w window shows the function on the stack and the language that the function w ( i4 C( A: y" I5 Vas written in. This is very cool and got a round of spontaneous applause whe - J- P4 B$ O* c" ]8 V* j
n shown at the PDC. There are samples in the .NET SDK that demonstrate how t 2 U1 u- ?" A7 X/ o1 M
o do this. It's really quite simple. Actually it just happens, there is noth 5 c4 j6 t7 q2 x/ M& E6 @: }; m# B& Sing for you to do. You can also throw exception across language boundaries a ; D! i. |: m5 `9 }# q$ l/ E" t( h
s well for error handling. 4 D* ?- Y) v: _6 p9 G* |
' G7 y4 j/ X/ T* |* j) Y 3 {$ h- n# T+ F9 T# Z6 n/ b Question #15 Can I derive a C# class from a C++ class? If so, how? ' d/ y1 U6 J8 T' k ; F( x, d7 R6 p6 } Answer Same as the answer above: Any managed language can inherit from a t % M" Z2 \0 Q8 F6 \. Kype in another other managed language. If you use native C++, then you can't ' S" G+ l5 v3 V% F( W$ n
do this, however. # V# ^, @7 Y# a# F 7 Y# Z6 `- I! x
% e' \* v, f- u
Question #16 Will the new version of MFC have the option of working in a m % ^+ l' _1 v- q, W& o5 a" |anaged environment? . _1 b" \/ c2 ~* f
" D: q2 |" J9 o$ V5 N: U' p8 g; e" b Answer I haven't been tracking the new version of MFC but I'm pretty sure # |- e7 H/ O+ {% Ethe answer is no. MFC is all unmanaged just like it has always been. For man 6 {5 c: }1 G* H8 \$ Y, Vaged applications, Win Forms is the window manager that people should use. - t5 E* T; K7 L# b, A% Y
, _) D' O( ~) c8 A, g# f 2 Q j$ {: c& @; E" w8 @
Question #17 If the new version of MFC will operate in a managed environme ' z( e0 _# R/ `1 ~nt, will it have the option of building desktop Win32 apps and not needing . 5 l5 L9 n" l# d9 X5 }NET runtime support? ) | w+ W- B! ?+ o
' G1 b, x* `; C8 r! p6 d
Answer I'm pretty sure MFC is unmanaged and will never require the runtime " X- _' [7 Z& T7 U+ b' \ e0 w& m7 Y0 ]
. h! \/ {* f+ t& F
0 e+ o( J( O0 |4 h" D
+ b1 F3 s$ F, b# O7 F
Question #18 Stroustrup has been quoted as saying "I have not expressed a $ y7 s- W+ g$ r! V9 Ntechnical opinion on C#, and I don't plan to do so. C# is yet another propri + V. F4 B2 F" e! ^4 a& M0 Netary language specialized for Microsoft's Windows system." Do you agree or + b8 B$ h* f& x$ g e J7 _
do you think C# is more of a generic language open to other platforms? # `+ U7 A+ E- S: C' { $ a) z# w0 O3 q& D( e9 q Answer C# is a language designed for the common language runtime; not Wind $ r7 v) a4 g- S2 Iows. The CLR can be ported to other operating system like Linux and Solaris - F0 G J+ O8 Z* L1 @: W. x) v4 e- j
and if the CLR is there, then C# will probably be there as well. In the gran + F1 o. q4 l9 zd scheme of things, C# is not that important or interesting. It is a syntax 4 E9 T( ?' E# Hchecker that spits out intermediate language consumable by the runtime. You 0 G9 U- l7 q* A! K, P5 a
can love C# or hate C# - your choice. I happen to love it and think is the b [. r1 T# G8 [: W
est programming language for the types of applications I write. . J1 {/ W; V* n( K+ ?; G . ?( C" a' b3 G( I: U0 M3 i
% l4 O- s; g$ S: L4 K" u
Question #19 I heard a rumor that VB7 will allow static linking of the run 1 m# a/ r& V% N$ C; S, R
time, like MFC. Is there any truth in this? If so, will C# also be able to c 8 s9 g. J$ S- T3 ]2 ~3 qreate standalone apps? ! w2 o" L* F/ ?6 z+ T/ Y
* w$ b' `! c4 p8 E% @1 _8 a
Answer This is absolutely not true. No language will able to statically li , o- L3 v, S2 a8 j9 Y d: `/ C/ ]
nk to the runtime. $ \" U- Q. P2 x5 K+ v % \/ _; t$ }/ H, I9 F7 l5 y
; z) C& @& X, i2 U8 |$ [
Question #20 Does C# still use resource files? If not, what mechanism is p 7 |" T' X( i: w4 U. C, n
rovided to allow for localization? 0 u: X1 a% ? | ^9 O
3 K- |( s0 `+ Q5 z Answer The .NET frameworks designers have created a new resource model. Re 9 ?4 ?% d- {! \' x Csources can be embedded in EXE or DLL files the way Win32 resources are or r 9 E- `/ P" p' F
esources files can now be stand-alone files like a single jpg or bmp file. T $ q( ]: b4 ` ?7 j
here is also the concept of fall-back cultures. If the Swiss German resource $ s n; P. R, v/ n$ H* C. a+ A: O
can't be found, the runtime looks for the German resource. If the German re 0 O9 d; R! |$ f7 N3 r
source can't be fond, it looks for the "default" resource. Each language wil : A& P7 p8 B7 Tl typically be built and shipped as a separate assembly rather than packagin % b. F$ |, T, r9 N7 |7 D4 _0 tg everything up into a single file. Like code access security, a full discus - a1 r9 m7 P4 o% o
sion of the new resource model is too much to put here. % X* ]3 \. ~( d( Z9 `' @ `( k : R4 o6 q9 s. n& C' V% L8 R* O