Updated: 17/4/07; 10:51:36.
James Strachan's Weblog
Ramblings on Open Source, Java, Groovy, XML and other geeky malarkey
        

Tuesday, November 26, 2002

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<ToolKit> 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 these 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 didn't 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. Once C# and its accompanying frameworks become portable, I will most likely make a transition.

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't 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 advantage 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......

[what's next?]

Incidentally Graham, with your work on STL, Systems<ToolKit>, JGL, Voyager and Glue, you've been a long-time hero of mine.

C# came several years after Java so sure its got some langauge improvements. Its easy to rev a language when you're new and don't have a massive installed base.

The new things added to C# strike me as fairly minor syntax sugar though - I'm suprised to hear that you'd like to switch to C# if it was as portable as Java.  It should be possible to write a C# compiler for the JVM, then you could keep the new syntax of C# while reusing the most important pieces of the Java platform, the cross platform JVM and JDK.

Though I do agree that, maybe its time for someone to create a new Java++ language using some of the ideas in C#. However I'm fairly sure this could just be implementated on top of the JVM like the new generics stuff in 1.5, the pizza compiler, aspectj, jython and the like.

e.g. see my thoughts on J*. Also I don't see anything stopping anyone from IBM or whowever from doing this today - I don't see Sun as stopping anyone - they just can't call it Java.

The fact that this hasn't really happened yet and that generics, despite being available for many years, never gained popular adoption, makes me think that most folks are not that desperate for new bells and whistles inside the Java language and would rather see improvements in the core libraries, frameworks, tools, APIs etc. Most of Java's development has focussed on the platform rather than the syntax. Though now Java has a serious competitor in C#, maybe its time to redress the balance.

Finally on J2EE vs .Net. I totally agree that we need a simpler way to create server side applications. Glue, Axis and recent AOP discussions are all examples of this happening.

I think most Java developers have realised EJB sucks and we need a replacement. Though .Net also has much of the same issues of remoting, activation, state replication, transactions and so forth in .Net remoting as EJB tries to tackle.  EJB just seems to make easy things hard - .Net seems to just hide the hard stuff, but its still there if you look.

We should be able to hide most of the EJB stuff so that development for Java becomes easy POJO stuff again. So far the AOP movement in the Java community seems to be the best hope of this happening.


12:02:32 PM    comment []

The only 2003 calendar to increase your success by lowering your expectations.

I really enjoy reading the ThinkGeek's Despair posters from time to time.

My preferred ones are Incompetence and Mediocrity.

[Andres Aguiar's Weblog]

These are great! Thanks for the links Andres.


7:16:18 AM    comment []

© Copyright 2007 James Strachan.
 
November 2002
Sun Mon Tue Wed Thu Fri Sat
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
Oct   Dec




Click to see the XML version of this web page.
Subscribe to "James Strachan's Weblog" in Radio UserLand.
Click here to send an email to the editor of this weblog.
blogchalk: James/Male/31-35. Lives in United Kingdom/London/Islington and speaks English. Spends 60% of daytime online. Uses a Fast (128k-512k) connection.
this site is a java.blog

currently subscribed to:

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. <big>kev's</big> catalogue of this and that.

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. /\ndy's Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. /dev/null

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. ::Manageability::

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Abe Fettig's Web Workshop

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Absurdities and nonsenses

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. All Things

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. All Things Distributed

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Andres Aguiar's Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Aslak Hellesoy's Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. bayard

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Be Blogging

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Blaug Blawg Blog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Blogging Pubbitch

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. bob mcwhirter

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Brett Morgan's Insanity Weblog Zilla

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Brian Behlendorf's Blog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Brian Jepson's Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Brian Maso's Tecno-Geek Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Bright Eyed Mister Zen

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Cafe con Leche XML News and Resources

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. CapeBlog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Citations for : squishy

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Clemens Vasters: Indigo'ed

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Cocoon and more

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Code Feed

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Code:Q

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Codito ergo sum

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. corporate eejit

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Coty's Radio Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Craig Burton: logs, links, life, and lexicon

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. crazybob.org - web log

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Crowbar Tech

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. cwinters.com

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Darren Hobbs

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. deem

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. deep:code

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. dion

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. dive into mark

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. DJ's Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Don Box's Spoutlet

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Don Park's Daily Habit

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. dorodok

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Doug Kaye: Web Services Strategies

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Eclectic

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Eric Alexander

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. ericfreeman.com

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Erik Hatcher - Blog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Erik's Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Fast Takes

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Forwarding Address: OS X

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Free XML tools

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Glen Daniels

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Gordon Weakliem's Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. graham glass: what's next?

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. gru's logic

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. grubbel

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Guido Casper's Radio Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. IKVM.NET Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Jason Carreira

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Java Testing, Tools, and Engineering

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. java.sun.com

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. JavaGu(i)(y)

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Jeff Turner's Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. jelly

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. jeremiahcode

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Jeremy Allaire's Radio

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Joe's Jelly

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Joel on Software

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Jon's Radio

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Jon's StudioZ.tv Blog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. josh lucas' Radio Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. jutopia

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. kdub's log

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Ken Bereskin's Radio Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Knowing .NET

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. mabo

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Mac Net Journal

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. MacSlash

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. manicwave

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Mark O'Neill's Radio Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Martin Dulisch's Radio Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Matt Croydon::postneo

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Memory Dump

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. meta-douglasp

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. miceda

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Michael J. Radwin's blog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Mike Clark

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Mitch Kapor's Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Mozquito XForms

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Nathan Torkington's Radio Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Nicholas Riley's Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. nickminutello

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Ockham's Flashlight

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Off the beaten track

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. ongoing

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Organic BPEL

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Otaku, Cedric's weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Outer Web Thought Log

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Ovidiu Predescu's Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Part of the problem.....

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Patrick Chanezon's Radio Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Patrick Logan's Radio Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Peter Drayton's Radio Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. PragDave

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. PSquad's Corner

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Pushing the envelope

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Raible Designs ~ We Build Web Apps

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Random thoughts

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Ray Ozzie's Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. rebelutionary

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Remus

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Rick Salsa's Blog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. rinkrank

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Rod Waldhoff's Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. rosewater

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Royle's Random Ruminations

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Sam Ruby

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Sanjiva Weerawarana's Radio Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Sean McGrath, CTO, Propylon

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Service Oriented Enterprise

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. skizz.biz

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Sklires Skepsis...

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Small Values of Cool

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Spike's GeekBlog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Steve Conover's Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Steve's Radio Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Technomagica

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Ted Leung on the air

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. The Blue Pill

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. The Fishbowl

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. The Mountain of Worthless Information

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. The Occasional Blogger

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. TheArchitect.co.uk - Jorgen Thelin's weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. TheServerSide.Com: Your J2EE Community Forum

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. thinair

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Thinking About Computing

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Tobiased thoughts

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Tomalak's Realm

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. toolbox

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. transMorphic

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Vincent Massol Think Tank

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Weblog for Costin Manolache

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Weblog: Morgan Delagrange

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. WebMink

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Whispering

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. X180

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. XMLhack

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. xpzen.com: what's on my mind

Here's how this works.