以文本方式查看主题 - 曙海教育集团论坛 (http://peixun0.cn/bbs/index.asp) -- Microsoft.NET Framework (http://peixun0.cn/bbs/list.asp?boardid=78) ---- Microsoft .NET vs. J2EE: (http://peixun0.cn/bbs/dispbbs.asp?boardid=78&id=2643) |
|||||||||||||||||||||
-- 作者:wangxinxin -- 发布时间:2010-12-15 11:13:20 -- Microsoft .NET vs. J2EE: What exactly is the .NET platform [and] how does the .NET architecture measure up against J2EE?
Java runs on any platform with a Java VM. C# only runs in Windows for the foreseeable future.
.NET and J2EE offer pretty much the same laundry list of features, albeit in different ways.
By allowing cross-language component interactions, .NET is enfranchising Perl, Eiffel, Cobol, and other programmers.
.NET is a good thing for those of you committed to Microsoft architectures.
.NET will undoubtedly become the default development environment for Microsoft platforms.
However, several of the goals of the .NET platform are fairly lofty and not at all guaranteed to fly, at least not in the short term.
It would be easy to dismiss .NET as more Microsoft marketing-ware and continue on your merry way. But don\'t.
[Microsoft is] fighting Java and open source initiatives on their own terms, putting their own spin on "open" and attempting to directly address the needs of developers.
If you consider yourself an evangelist for Java or open source platforms, then the nature of the war is changing. Be prepared.
Microsoft has put a stake in the ground with SOAP, and they\'re pushing hard to put something understandable and useful in the hands of developers. J2EE proponents need to do the same with their platform. Even if you don\'t write code dedicated to Microsoft platforms, you have probably heard by now about Microsoft .NET, Microsoft\'s latest volley in their campaign against all things non-Windows. If you\'ve read the media spin from Microsoft, or browsed through the scant technical material available on the MSDN site, or even if you attended the Microsoft Professional Developers\' Conference (where the .NET platform was officially "launched"), you\'re probably still left with at least two big questions:
And, if you think more long-term, you might have a third question rattling around your head:
The .NET framework is at a very early stage in its lifecycle, and deep details are still being eked out by the Microsoft .NET team. But we can, nevertheless, get fairly decent answers to these questions from the information that\'s already out there.
First, let\'s get some concrete details. Here\'s one cut at an itemized list of the technical components making up the .NET platform:
The comparisons in this table only scratch the surface. Here\'s an executive summary of .NET vs. J2EE: Features: .NET and J2EE offer pretty much the same laundry of list of features, albeit in different ways. Portability: The .NET core works on Windows only but theoretically supports development in many languages (once sub-/supersets of these languages have been defined and IL compilers have been created for them). Also, Net\'s SOAP capabilities will allow components on other platforms to exchange data messages with .NET components. While a few of the elements in .NET, such as SOAP and its discovery and lookup protocols, are provided as public specifications, the core components of the framework (IL runtime environment, ASP+ internals, Win Forms and Web Forms component "contracts", etc.) are kept by Microsoft, and Microsoft will be the only provider of complete .NET development and runtime environments. There has already been some pressure by the development community for Microsoft to open up these specifications, but this would be counter to Microsoft\'s standard practices.
J2EE, on the other hand, works on any platform with a compliant Java VM and a compliant set of required platform services (EJB container, JMS service, etc., etc.). All of the specifications that define the J2EE platform are published and reviewed publicly, and numerous vendors offer compliant products and development environments. But J2EE is a single-language platform. Calls from/to objects in other languages are possible through CORBA, but CORBA support is not a ubiquitous part of the platform. The Bigger PictureThese last points highlight some of the key differentiators between .NET and J2EE, and point towards Microsoft\'s real play here. Microsoft is doing two very notable things with .NET: It is opening up a channel to developers in other programming languages, and it is opening up a channel to non-.NET components by integrating XML and SOAP into their messaging scheme.By allowing cross-language component interactions, .NET is enfranchising Perl, Eiffel, Cobol, and other programmers by allowing them to play in the Microsoft sandbox. Devotees of these languages are particularly amenable to gestures like this, since for the most part they have felt somewhat disenfranchised and marginalized in the Microsoft/Sun/Open Source wars. And by using XML and SOAP in their component messaging layer, Microsoft is bolstering their diplomatic face and adding an element of openness to their platform, providing ammunition against claims of proprietary behavior. What\'s the correct response?For Microsoft developers:.NET is a good thing for those of you committed to Microsoft architectures. ASP+ is better than ASP, ADO+ is better, but different, than ADO and DCOM, C# is better than C and C++. The initial version of .NET won\'t be real until sometime in 2001, so you have some time to prepare, but this will undoubtedly become the default development environment for Microsoft platforms. And if you\'re developing within the Microsoft development framework now, you will undoubtedly benefit from adopting elements of the .NET framework into your architectures. However, several of the goals of the .NET platform are fairly lofty and not at all guaranteed to fly, at least not in the short term. The IL common language runtime, for example, has some fairly significant hurdles to overcome before it has any real payoff for developers. Each language that wants to integrate with the component runtime has to define a subset/superset of the language that maps cleanly into and out of the IL runtime, and has to define constructs that provide the component metadata that IL requires. Then compilers (x-to-IL and IL-to-x) will have to be developed to both compile language structures (objects, components, etc.) into IL component bytecodes, and also generate language-specific interfaces to |