0 s2 d- b: _* X; T+ o% A! Y It's not a time for us to determine which language will more better! / s# F d# ^% C$ N) E0 D
) d3 t6 o; E @7 ^9 n in factly,In China,too many corporation just writting some codes for 7 b, k' c2 l# j. i/ e' B . r- v, r* P a U enterprise's MIS,OA,ERP or other application.It do not need so speed # r4 f' ^6 T+ k2 ]1 G% d ; x5 o- k: R0 p/ [1 C- ^1 N& z* }
and do not need so good original code. just want more data,more easy and m 4 h4 U" ^# _$ S' x6 n
ore quickly. J) r! w( P# Q; R ; `) o. k" z; O) h
so c++ is not a choice in such enviroment. and u know,many codes we write ! e' [5 M* U% s/ c3 k* V2 Y% otoday will be useless.and there r so many easy tools such as VB + z6 L6 i6 `! h ; M9 N: }, q. \3 Y( ^
for windows designer, Developer/2000 or PB for database,Domino Designer fo $ B: J- e( U4 }- c: U) o* S4 [+ w
r OA application,why c++??? 8 W7 z& W5 p3 X3 p5 @
" C1 w n" U/ N& F0 h+ W
in DOS mode. i like Turbo c2.0, with it and MASM i can do everything. / Z' n4 H% Z }- ?1 ~7 M
* U! c. q- {* ?3 u0 a- ^! V
but now i hate c++, it has waste my time! my corporation do not need / j$ W2 E( D, `+ x
. e, N7 b; h6 {, j+ y& V c++,just need java,xml,php,pb,vb,delphi,developer/2000,domino designer etc ; e( g% u7 c% b. % Q* D. f6 j! _0 y- W3 h0 ]0 Q
1 E( o+ v! d# c! R6 C P so, a tool is just a tool,if the advantages in some aspect of the tool ( c) | C2 h, r5 J% L0 [. d U5 @
2 J' {* m3 W2 Y) y+ ~4 y
u needed. it's will be a good tool for u. others it can bring u unfortunat * E" F \. z0 G- v! F
ly! - X# h! V( s( Y% G% z% o) M% w
" D/ I5 h/ H4 R2 K) u* T 恶魔吹着笛子来 来自 : ! L! {* e6 R5 B, {6 r * F) `* ?* Q1 f/ | s6 i 果子,国内的Java应用不到10%基本上是ms的天下.这些可能是由于中国软件业规模太小 5 J! z1 e: x/ T- B) r
的缘故.而在国外40%的商务系统的开发都是Java,c/c++不到10%.譬如BEA公司一个有3个 : z K3 N/ m3 W$ j( L. u7 }
java程序员创立的公司开发了第一个基于J2EE的Application Server---weblogic.BEA公 7 ?0 x6 e/ F0 @5 Q+ M% X0 ~* C6 c司依靠weblogic在短短4年里成为世界第四大软件公司仅次于CA公司.可见JAVA的功能是 * |1 m* M8 F% y9 P7 |' o
如何的强大.微软的.NET的负责人说,你们想要知道.NET是什么样子,那就去看看JAVA.JA # E# }" _ w" H" p' k% R3 X8 \
VA是什么样子.NET就是什么样子. ) C. }* b: C8 q/ R
2 k) e5 @$ B2 C1 N! K( o
1 q0 d* w$ ~: n' a. {# { 5 x. k" D o/ e ! d, D2 o8 Y1 C& \- ?" }2 h6 l/ J
0 R0 u2 p% o. |; h& v
chenxiqi 来自 <a href="http://chenxiqi@yeah.net" target="_blank" >http://chenxiqi@yeah.net</A> : ; E, M3 j2 C+ [; D7 x* J( }
8 c. | b `& i, f& ] VC++开发数据库软件确实比较慢,可有许多软件只能用C/C++来开发,如果VC++退出历 % F* s5 R/ g$ Y% I) F+ M+ V5 J+ n) {
史舞台,那岂不是说只有数据库软件才叫软件,我想世界不会如此单一。 . n: f1 q; o9 R( s: e+ \8 S 6 Z* u# ?/ p% R0 { ( G& l4 J1 F' w: u) X2 n) O+ p zhangxiuyong 能告诉我什么是MVC的开发技术吗 * c( z9 d( c- B6 H, W1 L , [" m5 b: d& q% _& O
恶魔吹着笛子来 来自 : # {5 {& {* {# o 2 i* s) H( p1 F) M% t 什么样的的软件只能用c/c++开发? 6 k& q$ d/ l8 v* a& C( [* q; I u
- t; n/ {, i/ s
操作系统?apple的OS7,os8,os9都是PASCAL开发的. % C! o* ^* w& E! B/ y/ H + W9 k. I) M2 R# ~0 @1 Y6 b' w
数据库?oracle8i就是JAVA开发的 _' y6 w: K5 Z
z S$ F6 Y) c+ n 游戏?你也许没有见过用DELPHI开发的<笑傲江湖><风云>,甚至有VB开发的<神龙教> ' x+ N" ?2 Z6 U, ?7 B, F2 D# `
6 n1 {5 X; j5 g- e* M \ 同时VB7.0全面支持direx8.0.可想而知游戏的难度会大大的降低吧. * R% D x: P, N; `6 H
# n R; v) z& t% v$ K( A' T
MVC=Model, View, Controller Design Pattern 1 S {' ~1 ~ ?1 T5 t
7 S- R/ i0 j" g3 \; g1 Q; i
6 h6 w9 t9 u6 Q- L: L* ` & n% [" C: Q" B W1 U9 A 恶魔吹着笛子来 来自 : 3 p. F7 Z% }2 I: _. M# g/ V
4 t* i9 t6 t. m. v+ P- n 什么样的的软件只能用c/c++开发? 7 h& Z. {+ @7 k2 ? ! N2 [8 T4 ]) V% c \* [
操作系统?apple的OS7,os8,os9都是PASCAL开发的. 6 ^$ M+ d7 H; T2 j: k, \( r
D8 ^' K7 e( S+ z
数据库?oracle8i就是JAVA开发的 1 A8 c$ N5 O; O* X6 m
% g5 s. ]' l% N" m, {
游戏?你也许没有见过用DELPHI开发的<笑傲江湖><风云>,甚至有VB开发的<神龙教> 1 O' z( l T. L) m+ i. B
' J) _1 u1 k3 ?/ u9 p: c5 }( r
同时VB7.0全面支持direx8.0.可想而知游戏的开发难度会大大的降低吧. 5 N R& w ?# Z ~ 6 J5 B6 f9 x# z 我的意思不是说c/c++会消失而是应用的范围将会大大的降低并且将会进行脱胎换骨的 + [! u; A- ]' y1 W3 u升级(用了20几年升升级总可以吧,java的升级不算太成功,但是是一个不错的先例我想c 8 E; G8 y: D, h7 P# q" u( ^2 N
#的前景会更好). ) I/ u9 s) m) H1 r, F6 w
; H1 X: Z7 \. X
BTW: ( w* Y f0 V- I" P; O+ K
# D% V1 b7 G9 \5 z5 \
MVC=Model, View, Controller Design Pattern 7 M+ U/ q) d! }& Z0 K3 [ 4 P, K9 s& ?+ e. F# a 2 ^* j( Q2 B6 t+ `7 N! B * f) V t# p6 a: I& e
xubin 来自 http:// : : f! X; D# C8 p! e5 e7 m$ c1 @2 e7 \% {
6 m( W$ n" @2 F( i6 ^
在工业控制中,直接对I/O地址操作,就要用C++。 + H ]/ j; A0 v6 W! \ " f' D- G- {) R% W* ?4 K; ?
恶魔吹着笛子来 来自 : 9 v. z6 E, ]9 R . H) z& n5 t4 ~; R3 G- \" o3 G
俺有一个同学毕业设计用VB做单片机。你这不是在讨论问题是在抬杠。 - J4 X6 z# k2 [6 Y9 _
2 n# d# t% b$ {0 b7 J
wenyy 来自 <a href="http://www.vchelp.net" target="_blank" >http://www.vchelp.net</A> : / G- s! A, Q- i& ?4 M
: B1 N- ?+ ]$ {1 R& [) l2 Q ?8 J
我想一种语言并不会因为其他语言的出现而消失, 1 D: x# a1 [" u8 {5 } 3 d! {$ e8 |7 X3 @/ ^ 比如说c与C++,C++与C#的关系。 ) p' e; S; ~# c+ A + E9 P2 L% R% t ?5 B3 J
所以我想讨论问题时首先是要排除敌视, : u2 Q7 t# Y# c7 Z 5 d6 L( S# q4 {2 X. U 然后才是透彻的分析。 * a7 b: L' |/ h* Q
. S: x. o9 q( m7 u IT世界不光只有网络,还有其他很多。 % e8 ^1 ^. x- T' u ( w" |( P' H: i$ m) u4 _ 所以某些工具在一定范围内适用是正常的, 8 N! v/ n8 ~# n e" ^
7 g* j) m" G& c2 U" B% \! k 其实在国外, 8 b; [+ z9 y1 ~8 r
6 M/ b0 @* s" x9 x7 E" ~& m SERVER端软件大都用JAVA,而CLIENT却没有多少用JAVA, ! O0 k4 Y1 p& R1 [
. i% ^+ O4 ~1 X
这和速度有关,当然也与MS对JAVA的态度有关。 2 c, s B- f& W) J& D
, S3 `( k- ?& N( |: @8 v- f, G1 B
0 [' a: l- s! o/ n 不过我一直认为C/C++不会因为JAVA的出现而消失。 4 ^7 e F" {# I' L' A0 X # f0 k' I) V$ D+ e 就象COBOL目前为止还在使用一样, ; Z. y2 h8 T( e% h* i+ p! w - G$ \4 }( p- {+ }. y$ q4 s+ l 5 b$ M" ~7 J: \" O( r 不过以后会有愈来愈多的解释性语言出现,因为解释语言比编译语言的兼容性好,这 / W, j. S* a3 U8 b
是不得不承认的。 ' \9 E/ M$ \' N, H0 P6 j) X7 C: ], Z G8 y' I5 _- P8 B: B$ \2 U 恶魔吹着笛子来 来自 http:// : ) Q) U/ }: R' |
, f+ B5 [% r* N+ g$ S# m8 n
是的wenny.也许我说c/c++的消失有点夸张化了,但是实事求是的说.java和c#的出现 6 M7 D6 D$ z+ W. |0 R
v8 ^* [9 q0 |* w! D* Z; y; M% M( m c/c++的升级换代是在所难免的.对么. 2 S2 l% N0 i9 P# c * u4 J9 h2 ]- I 恶魔吹着笛子来 来自 http:// : 2 F! d1 `, X$ j$ x+ J, P
; x% N. t2 E+ m( B% r7 Y' D
而且我一直认为java和c#不是另外一种语言而是c++的升级.就象是c到c++的升级一样 ) m: } O, d5 T' |; X! l.对不对. , v ^/ D. B" O7 ?4 M% |
+ d2 k$ M( g& G6 i# F8 ^
xcc 来自 http:// : 4 L, j5 |; L9 B5 f, c
: x6 |/ i1 o8 N: h5 ~+ o: O3 y
同意恶魔吹着笛子,你简直是我的偶像,顺便贴一篇关于C#和.NET专访 9 }3 E) a/ {: X; \ " I# e. D& T' e4 B& ]
NET and C# Questions with Jeffrey Richter 1 e4 ~8 j' f- j( x( r
, A2 ^- j! E6 u" r L# {9 z* s9 z In the weeks after Microsoft made a huge splash in the development communi / a& _5 D- p9 |; w5 g0 Hty with their .NET and C# announcments at the July 2000 PDC, Jeffrey Richter ) o I" r2 [! l0 F' `: i
accepted our request to field 20 questions from our readers about these new - S& [ ^ Y; w5 n6 I5 X
technologies. As many of you already know, Jeffrey is a cofounder of Wintel 4 }4 [# j- |- a, @- s2 t
lect, a company that specializes in Windows & Microsoft.Net training and deb : G6 ]+ i6 d) c E d- C
ugging. Jeff is also a consultant at Microsoft working on the Microsoft.NET 2 [0 |! g8 [) P9 G
Common Runtime Language (CLR) team in which C# and Visual Basic 7 applicatio , f# x+ ]9 J) _% L3 Gns operate. Below are the 20 most popular questions that were sent in and Je 3 w& v3 A6 i% k; W8 @
ffrey's responses. 9 ~- R2 W D' ^" [8 `
) r% b: {! ?$ s# y
For Visual C++ developers everywhere still trying to get a handle on all t 7 A, w8 d7 J" G7 _. phis: Thanks Jeff!! " P1 u, ~- x& C; T+ O 6 x: X5 y% a0 Z v3 o8 y ! z2 e, x# K9 R/ i, j. E; N0 F
Question #1 Is .NET a runtime service or a development platform? " c& k! W; C0 L1 E! s+ n2 A N/ t0 z : h) U8 ~( O# [4 I, K$ W Answer It's both and actually a lot more. Microsoft .NET is a company-wide / K7 ^7 F( Q# t7 V
initiative. It includes a new way of delivering software and services to bu ' n: `0 J6 A8 A) X" y( \
sinesses and consumers. A part of Microsoft.NET is the .NET Frameworks. The ; q" }8 D! R5 |3 }% | F
frameworks is the first part of the MS.NET initiate to ship and it was given 7 ]1 S: _6 M; q0 Q! B out to attendees at the PDC in July. The .NET frameworks consists of two pa & l0 l5 A5 M4 N9 {' t9 Z
rts: the .NET common language runtime and the .NET class library. These two ! Y4 h9 n9 c1 b% M Z
components are packaged together into the .NET Frameworks SDK which will be ( _/ U; o* r: j" }) x# w6 Q9 p4 savailable for free download from Microsoft's MSDN web site later this month. 7 o1 A8 I: f% }: q
In addition, the SDK also includes command-line compilers for C#, C++, JScr * I; t( Y6 C3 Y" a+ G1 u3 s- qipt, and VB. You use these compilers to build applications and components. T . F F, P3 s- z4 X, w+ D9 T
hese components require the runtime to execute so this is a development plat - Z# m" P6 e2 T7 e2 K" ^
form. When Visual Studio.NET ships, it will include the .NET SDK and a GUI e , K1 L2 `3 ^, u1 N+ [% J Sditor, wizards, tools, and a slew of other things. However, Visual Studio.NE 3 u2 G: f S' l( q& mT is NOT required to build .NET applications. 4 P# E( c; b2 {
+ }4 C) ?& Q; r" K A, u U- b9 w 9 E" i! F) [( U
Question #2 How likely it is for C# to become a general-purpose (meaning: $ ?9 [9 t5 ^1 T9 `/ ]3 mnot MS-specific) language and if so, have any other vendors committed to pro 6 U1 Y+ Y T) E, V
viding compilers on any non-Windows platforms? ) p$ Y9 ?& l/ Z; B# W9 }% L ! j" i. R# X1 H
Answer It's hard to answer this right now. I have been programming in C# a " C; t( I `2 ]- L3 V+ g4 klmost exclusively for about the past year and I love it. It only took me a f # ~$ d# O* n: G) V) R9 gew days to learn most of it since it is very similar to C++. It was designed ( c2 C6 h* D8 c, A, Q7 k
to compliment the common language runtime and I think that it's unlikely to 1 i# T$ Z/ ^" E7 S, I9 d6 T% Z9 z gain much momentum if decoupled from the runtime. However, you never know. , B' h$ C( \- A% U
Microsoft is submitting C# to the ECMA standards body so any company will ea , u, b; \; b9 E4 x" Usily be able to produce their own C# compiler however, without a runtime, th 3 S) [" O( Z2 je compiler itself is not that useful. I'm not aware of any companies current / L9 z( g& a2 F' f0 v9 ^4 Y
ly working on their own C# compiler. Certainly, porting the runtime to anoth . l- k' r) B' ?5 H" M4 Fer OS is no small undertaking. / f: Z) \9 z4 s, J& f5 f: f1 W% T # C7 ?" _/ }# O h2 h2 E# O' g, c / a# ^* @6 c2 @' Z3 `5 `- u
Question #3 Can you tell us specific practical problems that C# can fix be U4 v! M6 e! \8 o% S/ k7 B! ltter than Java? 2 [0 J8 {4 u9 h6 Z: u* E2 N $ o. j/ Z& D7 w Answer I must be honest with you: I have never programmed in Java. I know , K2 ~+ P3 }: E% lwhat C# offers the C/C++ programmer: simpler syntax, components that seamles # ], ?' X6 ?; q5 Q6 {sly fit together, type safety, and so on. Other people should be able to add * K; p, v& s: F- Y7 y% } \ress the C# <-> Java comparison. 7 v6 \ M; S& q; s4 c7 z$ z ) T5 E* D4 H0 L* W& E' v- B
$ u+ v/ Y5 v y& z8 H* E
Question #4 Will ADO+ be the preferred and most efficient method to access " @" N- h) E4 u$ f- ~: z databases from C# or will it have it own (or .NET) class wrappers for the O ; `- w# T- K: n+ L7 q! ?
LEDB API? + T7 x1 l, B2 T$ }$ A 7 x: e. r* R7 g0 A Answer The .NET class library includes a System.Data namespace with many t ) e; h9 N4 N# K. @0 g
ypes for database access. These wrappers will be the best (and most efficien $ W6 F% N4 O0 ^+ \! y
t) way for a C# programmer to access data. ( T/ e. [# P0 d4 F5 y4 H- a: o
! H* I0 A3 Q! }# j
% ~- b) o; x% q: f
Question #5 Can C# be used to develop Windows applications or is it soley $ X% g7 Q+ n% A( f8 dused for developing distributed applications? / j# ]1 ~7 a' L1 Z) D- E " }' m9 V2 N: a! R0 Q* L Answer C# can absolutely be used to develop classic-style Windows applicat : t1 L, b/ J! ]
ions. Actually, this is more a function of the runtime, not the language. So % D$ U; k" j8 ~7 W6 t' w
, the runtime supports console apps, GUI applications, NT Service applicatio / S6 v ^1 a1 {; rns, simple components which can be used in applications, web pages and so on 6 ?, }9 b! w+ Y) i8 I0 C
. You can't write a device driver but that's about all I can think of that t 2 T1 A+ g* D( [% } d3 hhe runtime doesn't support. # _* o& ^ e# `, _
8 F: u3 ]& L; t* L1 l , y9 ~2 @8 V* T& C& l Question #6 What is the C# relationship to WinForms? . ?' [( H0 t8 Z( c
) a$ G3 d0 x9 h" T3 ^, Y1 I7 i) Q# v1 L Answer Win Forms is a set of classes in the .NET class library that wrap W # W7 \+ _% Z/ b$ y/ M3 Tin32 windows, brushes, pens, etc. Any language targeting the runtime (includ 5 ^/ C7 y! |7 a1 F$ [" K7 F
ing C#) can construct instances of these types and manipulate them. This is : e- f3 L9 |7 a* U6 o4 i8 qhow you would create an app like Notepad, Calc, or Wordpad. I know that Win . ^; x3 E& J6 c
Forms has similarity to J++'s WFC library but I also know that there have be * U2 E. U4 U4 I9 h- J6 p0 o' u: hen some major changes. ; Q; {- t+ {/ g7 l7 k0 W! r- n" Z( _
4 X" N( i! z. |. Q$ M8 W 5 w7 s/ T* U" B Question #7 Rumor has it that the C# language has been submitted to the EC 8 n# u, |1 H1 }, ^% i" N
MA for ratification. Is this true and what impact do you see that having on ! |3 F5 G% G# K) k Hother companies adopting it as a general language (such as C and C++)? $ d5 b% e# X# p# q, u$ H
- S- X3 b! `+ R* g0 \/ Z/ p4 z
Answer Yes, it is true. I pretty much answered this in question 2. 5 d) y: K+ Q0 g* r" a0 ~ 3 y9 C( X3 z8 R* l. ^
4 W& P1 h, _, M7 b( w0 R* f Question #8 Which will be the role of ATL and COM in the new .NET technolo ; ^0 R6 m1 h% U8 h7 ?
gies? 5 G" J4 }0 Z$ j$ Z8 b
( I% Y4 B0 B W1 x7 B5 M Answer The .NET frameworks offers a replacement for many existing librarie 6 {3 d: X) ~/ g4 M. E+ H0 ?
s, like ATL, MFC, C runtime library, standard template library and so on. .N $ g! k3 [; z6 [7 @. r
ET programming is significantly easier than using any of these older technol 9 l0 Y& R F* A. a v, }
ogies. For this reason, I suspect many developers will move away from using 0 C) y; z2 W" [" @* j- \3 V
the older technologies. The older technologies can buy you performance howev . ^* Y8 R" O+ t7 M+ ] l; Eer; so, some people that are very concerned about this will stick with what' 3 D" d8 X3 ^" K! J3 q: Ps around. As for COM, developing components with .NET is orders of magnitude 3 t5 u. D: M2 f, B0 O. j
easier and the interoperation between components pretty much happens for fr . K W6 D! p+ X' H1 M# {% j! \7 T/ |ee. Again performance may be an issue for some. And, for the time being COM+ . T: I- Y4 o6 ]; \# s0 k
services, like transactions, are not being offered directly to .NET code. Y & n6 A% P2 y+ M* k* H q' n
ou can still access these COM+ services but .NET code must incur an interope / m2 e4 s _6 c% q! Z
rability transition, which translates to a performance hit. ) |' m7 _$ f0 \ - t$ G8 }1 m9 G' }( ~
7 x t% P9 O( ~& w' A& v/ P' t Question #9 Why was the templates feature not carried over from C++ to C#? $ Y) f! b& |+ |' |, P ]$ W
' W. g3 x( Q% |. ]6 D8 j . Z2 N O4 O. p a2 x& d Answer Again, this is more of a runtime issue than a C# issue. First, temp * j7 @* u3 D7 }" ~3 \. |
lates are difficult to implement and Microsoft choose not to do the work for 2 }5 B4 G' H2 v* ^ Version 1 of the product. They may do templates or something similar in fut * [4 G: z& E5 F Vure versions. Second, since the runtime is a multi-language runtime, introdu 3 k! c% A: { b; n4 X
cing templates means that all languages targeting the runtime would be requi 1 L. Y# h a) {; u
red to support templates in some form. There are a lot of issues here that n 9 b/ b' J( M6 b, f8 L. J
eed to be carefully considered. , }4 e/ S& D9 C* w, `) K ; I6 ~! r1 q l3 N, ^$ V
! v! H( D+ \8 u% M Question #10 Will C# replace the pseudo keywords that clutter ATL COM code $ ?+ v1 |6 m3 `7 B
with real keywords? Examples: OLE_COLOR, BOOL, VARIANT_BOOL, and DISPID_XXX 4 }' ?2 @; `, h c ^+ K( y* x5 b5 q4 s
XXX. 9 ~% }0 _ C; d+ w# ^# M; M5 b
, b7 z! S4 q& [/ O8 I' @$ c, d
Answer Absolutely, all types have new names as provided by the .NET class 3 `! W1 C h6 c* y2 i) O
library. 1 [0 ]. z: s$ O
" p5 x6 y) W; c
+ R( u0 b0 [6 L7 S4 C/ D s3 w Question #11 We've seen managed extensions, but aside from that, what futu ! }# a2 X8 p9 w L* V
re does C++ have at MS and in .NET? 0 n/ A( K) n+ D0 Q3 N( u % @3 | a3 b4 d% `
Answer C++ is unique in that it is the only Microsoft language that allows " ?6 x2 Y l( S3 ~- B+ D3 w( z6 d the developer to write managed and unmanaged code. So, I can easily see dev $ s* {8 p0 F. G" f' e4 `
elopers writing in unmanaged C++ for performance-critical algorithms and the $ p% e" `6 L+ ?5 v0 \& zn using managed C++ for type-safety and component interoperability. I'm sure 2 d0 t2 P4 q) h; T+ C
Microsoft will keep C++ going for years to come: device drivers need it, Wi 7 Z7 H" B$ B' c( P) w7 {ndows is built with it, SQL Server< Exchange, and other BackOffice products # o' f, P8 a7 Y0 t/ ewill probably use C++ for a long, long time. / }, D* n) H- p& N3 I+ k# J & {: H% [, W& \
5 `0 D# D* R/ ?/ V: C3 X" F
Question #12 If .NET supports ActiveX/COM, how will security be assured if % H# h: y/ J. H' r8 U% s a C# application runs from within a browser? ! \# A# w2 V7 J5 I9 o
5 M( S0 w/ M \4 W- F Answer The .NET runtime offers code access security, which allows an admin 9 X5 o% R3 i) ~istrator/user to configure security based on code identify. By default, any 8 z$ Q. D6 [* Y) D- D- T
code downloaded via the Internet or intranet is untrusted and will not be ab $ Z$ q7 g8 I. I; v3 L: ~" ~
le to access files and other resources. In fact, when I build a console appl * H/ {& z7 B4 I
ication and run it from a network share, I get an exception when it tries to % z* K) |+ O" H access certain resources. If I copy the same file to a local disk directory ; W8 k/ z% T [1 m( V/ v; {% u and run it, it runs fine. Code access security is integrated with the runti - m2 v0 i5 m- ]/ x
me and is too deep a subject to cover here. 1 Z5 `( u% q, u9 {% J3 ] ' K& ?# W( E5 @; I) K( m - w" Y% e( K; J7 |
Question #13 With regards to the .NET runtime, do I need it on the machine 6 [* N+ A6 y; |6 ^; I
that I deploy C# apps on? 9 U: v+ W, ^$ n+ ^0 u8 Q, O
. u3 i$ N. z" i5 ?/ J/ j+ d
Answer Yes. All managed apps need a manager; the runtime is the manager. M 6 ~- T: o! f' V* m3 f. U
icrosoft will eventually package the runtime so that it is freely redistribu & M5 {8 i- L- ^ted. For now, end-users will have to install the full .NET SDK from MSDN web , [4 }# C1 P1 \2 f7 j/ r. `3 t site (when available). This is similar to how VB developer must ship the VB 6 a h: @1 J; p9 d runtime today. ! U2 Q4 v9 j3 z4 }: i/ I3 s; [ & h. ^2 [* T, C' S: P" s: H; H ) A; l7 X: b0 A/ b3 {# B, |8 X Question #14 There has been mention of being able to derive C# classes fro ! R1 x: ~2 ~+ H5 d: Z
m VB classes. Is this true and where can we see an example of how to do this . u: l8 A. |$ g? 7 w9 n& l: v1 b& | " L6 D. N/ c- Y* c. g" D: {/ [0 x Answer This is true. In fact, any language that targets the runtime can de 0 ?2 K( k8 J$ Q8 X- A6 ~rive from any type created in another language. Also, the Visual Studio debu ! f I, X4 s# M8 P: D( z; w0 \
gger fully supports debugging across languages. Each entry in the call stack ) b" c& b# h/ O1 U) B- c ?. f window shows the function on the stack and the language that the function w & P/ Y! Y+ _% ~' p( Z, V
as written in. This is very cool and got a round of spontaneous applause whe : p# N: O. j9 o u
n shown at the PDC. There are samples in the .NET SDK that demonstrate how t 4 ?$ W4 V( ]5 X- z) Z: m. H. p
o do this. It's really quite simple. Actually it just happens, there is noth * M2 G) o0 x. X( k( [, a
ing for you to do. You can also throw exception across language boundaries a + S: T" T8 l! n- k ls well for error handling. , N- B7 O$ X+ r * {% N* g. J# S7 _- I4 q! { - {1 l2 S/ t$ |/ V8 { Question #15 Can I derive a C# class from a C++ class? If so, how? ; l/ @3 [( Y ~3 {% ]7 P% g" g
) N2 d+ |& `2 v. v4 Y Answer Same as the answer above: Any managed language can inherit from a t , d& N0 ~. g; v: E; j9 ^ype in another other managed language. If you use native C++, then you can't - }: l7 H% ^- E do this, however. ! r7 s+ X- E; v1 ~ 2 ?0 V2 n% ~8 M1 B. s
7 [/ t/ j6 T( c# [) n Question #16 Will the new version of MFC have the option of working in a m ! j; k& i/ m& }, G
anaged environment? ; ^0 A6 ?" B" K, i; I/ l ) d0 o+ B5 D1 U Answer I haven't been tracking the new version of MFC but I'm pretty sure ) K0 f. {: ]3 }$ jthe answer is no. MFC is all unmanaged just like it has always been. For man . x/ u# c5 C, L, W/ X+ Q
aged applications, Win Forms is the window manager that people should use. 6 C4 h4 `9 L% {4 i- T * m0 o% [- a& P ' e- a# f2 K$ D/ O: J" @ Question #17 If the new version of MFC will operate in a managed environme 2 v& Q0 n" v* d# Rnt, will it have the option of building desktop Win32 apps and not needing . ' q, `( O$ E7 x, f. Z
NET runtime support? 9 \1 _2 H2 x/ U% B q# K. C , v8 |4 I* q/ {$ Q+ c9 x" J Answer I'm pretty sure MFC is unmanaged and will never require the runtime " i; G" C/ }" M+ g* _
. 7 e$ Y) r3 j8 \, A. A 1 R( |6 P3 ] O9 Z9 ~0 P {
2 ?+ v, a0 ^4 O' v! d" ?2 Z
Question #18 Stroustrup has been quoted as saying "I have not expressed a . C }4 L( N! A& U+ h, k, a/ Utechnical opinion on C#, and I don't plan to do so. C# is yet another propri - i& J9 {% e. S$ Y: S
etary language specialized for Microsoft's Windows system." Do you agree or " \, r- A" {; L3 A- \7 q) y/ ]do you think C# is more of a generic language open to other platforms? R4 i% V+ R/ k) {8 P# @
% N5 I$ q( w; w9 H+ G/ c
Answer C# is a language designed for the common language runtime; not Wind ( p5 A' C6 Z$ @8 A0 C% zows. The CLR can be ported to other operating system like Linux and Solaris 2 |1 @" G9 g# a( N" land if the CLR is there, then C# will probably be there as well. In the gran ) k' R. r6 @, ?, d" x* md scheme of things, C# is not that important or interesting. It is a syntax ) X; N5 U; f; |* q" n; {
checker that spits out intermediate language consumable by the runtime. You ' D4 A* E. {) `/ H0 |can love C# or hate C# - your choice. I happen to love it and think is the b 6 U) h( q" h6 ^0 D3 E4 _est programming language for the types of applications I write. 1 b8 T0 |" S* ~, l" X* ~ : h" J! r, [$ n 2 X F% D a( ~, |! \: f
Question #19 I heard a rumor that VB7 will allow static linking of the run 8 W/ \* e( F. Z! o% u# _time, like MFC. Is there any truth in this? If so, will C# also be able to c ( r8 p. Y4 r. w% S i
reate standalone apps? 0 y1 \9 Z8 w0 E9 @7 K % w3 a$ I$ |1 Y( G3 l) ~' ]
Answer This is absolutely not true. No language will able to statically li 1 @6 U# K# M; c8 J: m4 N
nk to the runtime. 2 T7 m# ?9 ]9 j, i. P , A+ @6 K7 T8 d* f4 t / J9 a6 Q0 V4 T/ c' h9 B
Question #20 Does C# still use resource files? If not, what mechanism is p + _7 Q) ]* E( ~' [rovided to allow for localization? 7 E1 E' U% \. U7 v e7 l) f
9 }- |" T* O ]) g Answer The .NET frameworks designers have created a new resource model. Re ; k' d. P# T1 [# b3 Y; M
sources can be embedded in EXE or DLL files the way Win32 resources are or r , m+ [2 y# E$ ?* ]9 ^; Uesources files can now be stand-alone files like a single jpg or bmp file. T 0 k s; U, o9 e( @here is also the concept of fall-back cultures. If the Swiss German resource # ]( n' ~% ~& f0 m; {
can't be found, the runtime looks for the German resource. If the German re 2 W$ g- L: k+ o- ]/ W
source can't be fond, it looks for the "default" resource. Each language wil + t/ b" M+ P' @& U! }$ X; i
l typically be built and shipped as a separate assembly rather than packagin 8 G# m3 E& d2 C" X* D
g everything up into a single file. Like code access security, a full discus $ O( _8 Y# K3 p8 ]6 }% G) p# dsion of the new resource model is too much to put here. 0 O: w! i' ~$ U1 t7 j' j+ ?- Y, r : M3 P, j( F7 H
# b( n2 A/ j; A . n+ D F; g8 U2 s' B5 R5 P
6 `+ J& ^6 g3 _ j+ c6 J
wenyy 来自 <a href="http://www.vchelp.net" target="_blank" >http://www.vchelp.net</A> : 8 \ k2 u4 C& h6 Y& d $ w: n7 p/ g$ L 我想应该这样说,一种新语言的出现会在一定的功能领域上替代其他的开发语言,以 ( Z* E$ q$ C7 _. @" `$ Z9 h7 s1 J
前的开发语言的使用范围会缩小,但不会消失。(就算是出于保护现有资源的目的) % C7 p; y4 [, T) I3 ^' r& W - ~/ b* B/ J, C* J/ O1 v 但没有一中语言是十全十美的, 4 w6 l' B4 S1 `! u+ \3 j
6 T. ?2 ?6 c4 T; b
JAVA,C#都不是。 - n7 S* }9 k/ ^. s" A" {0 ?
( G7 @; |' s$ V9 A + g W$ O4 f, s' i' ?! C7 {+ o. c
, `4 {* f2 O' }$ u
wenyy 来自 <a href="http://www.vchelp.net" target="_blank" >http://www.vchelp.net</A> : : Y( u6 h. B1 m # C& c0 j) H) ` 》》恶魔吹着笛子来 0 \ T9 L. S' |( T5 M 8 @; |& W. c# }. `% S! p4 Z1 X 你好, 5 i2 j9 f# w0 k* f2 X+ T+ W, o 7 \6 j! H# w. s" C
很高兴能够与你进行讨论, , O4 p) K: s* I2 H( L
, H# @2 H2 s- m* l/ x, a7 j 虽然本站名字叫做vchelp.net ) l& ~3 }% i, ^* K9 i% E1 I0 n ( U( L, I, w. S# I/ L7 j2 s
但我不排斥其他的开发语言,只是自己的能力有限不能将本站内容扩展到其他的语言 ' g/ {: A5 ` T* R5 O, 9 s# n; q' d1 \ ) i3 ?2 g4 h7 o. _1 `5 m; u) G/ w5 n
但我很希望大家在本站对开发中可能遇到的问题和矛盾进行讨论,不论是关于语言还 ) ^6 r0 K0 V2 b4 p是开发方法的。 0 S+ r, w; Y6 H. ?0 T0 }. R