J2EE vs. Net, Java vs. C #: Comparative just evaluation

zhaozj2021-02-11  206

J2EE VS. Net, Java vs. C #:

Since there's been plenty of discussion on these topics, I thought I'd write down my own views on these matters. For the record, just in case someone questions my experience in languages ​​and libraries, I was one of the first adopters of Smalltalk, C , and Java, taught all three professionally for several years, taught programming languages ​​at UT Dallas, wrote an ORB in Smalltalk, wrote the first portable STL toolkit for C , wrote the ObjectSpace Systems cross-platform systems libraries, wrote the JGL generic collections library and the multi-protocol ObjectSpace Voyager Java ORB. and of course, I wrote a good deal of the TME Electric XML toolkit and GLUE web services platform for Java. Sorry for the long-winded introduction, but establishing a strong background In There Areas Helps to Establish A Basis for My Opinions, and throws Out Any Claims That I am Some Kind of Java-Hater!

Historically, languages ​​build on each other, borrowing the best ideas and then throwing in some new ones Some languages ​​evolve, some stagnate, and some die C -..> C -> C # is a good example of an evolution, and Smalltalk is an EXAMPLE OF A LANGUAGE THAT I Loved But IS Pretty Much DEAD.

C # was designed by Anders Hejlsberg, a long-time hero of mine, the force behind Turbo Pascal and Delphi, and a guy with an obvious talent for language design and implemention. In C #, he's taken a lot of the best ideas from previous languages , integrated some new ones of his own, and come up with a natural evolution of where Java was heading. For example, the ability to associate attributes with any element supports declarative programming in an elegant and powerful way. C # makes iteration simpler and more natural for developers, and auto-boxing simplifies manipulating collections of primitives. There are many other nice features of C # that are covered in several articles I've read.It's also significant to note that several new C # features have already been proposed and will be implemented Soon, Making C # One of the Freshest and Quickly Evolving Languages ​​on the Market.

The Java language, on the other hand, had a strong initial start and then essentially stagnated after Java 1.1. The only new thing in the last 6 years has been the assert keyword, which is not much to write home about. I'm definitely Don't Like Languages ​​That Include An Entire Kitchen Sink of Features, But C # Shows The Kinds of Features That Could Easily Have Been Added to Java.

For a while, Sun was sitting in the cat bird's seat with a great lead in the languages ​​and libraries space. Microsoft did not want to adopt a strategic language that it could not improve upon, so it decided to create its own language that could be evolved at a reasonable pace. Now that C # has gone beyond Java, Sun has got to quickly evolve Java or watch it slowly fade away. I think that IBM realizes this, and I hope that it's working hard behind the scenes to rectify the situation .It's frustrating but understandable that James Gosling holds disdain for C # Gosling keeps going on about how C # is a clone of Java, but it's not -. it borrows the best from Java and then adds improvements of its own, just like Java improved upon previous Languages. That's The Way IT Works, Regardless Of Which Company Is Involved!

Another thing about C # that seems misunderstood by much of the Java community is the concept of "unsafe" code. The idea behind "unsafe" code is that a programmer should be able to access low-level programming constructs without having to clumsily drop into a different language. in Java, you have to use JNI to link with libraries written in a language like C to get at low-level constructs. in C #, you can use the C # language to get at low-level constructs, and code which does this is marked specially so that the executing environment is aware of it and can prevent code flagged in this way from executing. This seems an elegant way of providing the full range of expressive power within a single language, less error prone, and easier to manage .

All That Being Said, I Write My Code in Java these Days Because of its portability.

Enough of Java and C #. What about J2EE and .NET?

The great thing about Java when it arrived was its simplicity and portability. Over time, the J2EE libraries have become pretty complex IMHO. For example, there have been many conversations on various news groups complaining about the learning curve and performance associated with EJB.. NET is definitely simpler than EJB for building server-side components, and so Java badly needs a new and simpler way to build portable and scalable server-side components. This of course is the reason that TME launched GLUE and has been working on its rapid evolution.The main advantage that J2EE has over .NET is portability. Whether this advantage remains is primarily a business decision for Microsoft. There is no technical reason why the core .NET framework can not be made cross-platform, and several groups are Already Working on Doing this. HECK, CLR WAS Designed from The Ground-Up To Support this! SO J2EE IS An Uneasy Situation In Which A Simple Snap of Bill Gate's Fingers Results in ITS Primarily Adv Antage being neutralized.

The Best Defense for Java / J2ee IS Fairly StraightForward:

- Standarize Java And Allow Some of the Language Wizards At Ibm and Other Companies To Evolve The Language At A Similar Pace To C #.

- Come Up with a far simpler server-side programming alternative to ejb

Time is Running Out ...

转载请注明原文地址:https://www.9cbs.com/read-5099.html

New Post(0)