Sunday, July 01, 2007

The J2EE King is Dead - Long live the J2EE King!

I've quit posting on Objects. Gilad Bracha is much better qualified then I and besides he has a cool blog. Gilad reckons that Java is not OO. Well that's something coming from the guy who led development on the Java VM for a number of years.

As for me, I've decided to take Gilads advice and ensure that my next project is not a Java one. I'm seriously getting into Ruby and Rails, and I'm also dabbling with Flex. I'm finding the Ruby forums kind of boring though, basically filled of helpful knowledgeable people, supplying useful technical tit-bits, without an axe to grind insight.

In contrast the Java forums like TSS are a lot more "fun". I've noticed a trend lately, the OSS projects that exposed the swindle known as the J2EE Application Server are now seizing the J2EE crown for themselves. Spring, which is a neat framework, that basically helps to overcome a Java language smell (Gilad discusses this too), now sees itself as the new J2EE King. I have read several articles from Rod Johnson, and whilst he is very eloquent in describing the pitfalls in J2EE and in particular EJB, at no point does he mention that IoC is merely a pattern to deal wit the fact that object construction cannot be done in an OO fashion with Java. Now is this just an oversight on his part, or is he just simply ignorant of this fact?

Also, Johnson seems to have got himself into a squabble with the JBoss/Hibernate guys. The JBoss camp has an alternative vision for the new J2EE, and they see themselves as the true successors to the J2EE throne. Again, at the core is a framework to deal with the limits of the Java language. Hibernate with the use of CGLIB manages to overcome the static nature of Java, by late-binding POJOs to a database agnostic persistence mechanism at runtime. Has it escaped Gavin Kings notice that Rails manages to do the same thing, within the Ruby language and without having to resort to ugly tricks?

You would have guessed that both of these clever guys would have realised that the problem is with the language, and that they would be spending their time building OO frameworks using a more appropriate, 'OO' programming language, but they aren't, so why?

Well the simple answer is money. Java is an established market, and they both intend to exploit it. Unlike the old guard, which they have successfully over thrown, these new upstarts have an open source business model. I'm not an expert on OSS, but apparently you can make money out of software by giving it away. The thing about these new pretenders however is that in my opinion, they are both fundamentally dishonest. I don’t believe either of them is being totally open about their true motives. When an Oracle salesman walks up to you in a pin-stripped suite and offers to sell you a product, you know what you’re potentially getting into, but when Gavin King offers you Seam as the solution to all your problems what are his motives? Is he truly altruistic ?

Marc McFluery of JBoss fame is a very rich guy. So how did he make his money? The JBoss camp has chosen to stick close to the JCP and build on Java "standards". Their latest offering in this vain is Seam 2.0, which builds on JSF1.? and EJB3.0. As I understand it JBoss with Seam is fully J2EE 5 compliant. So I guess this is what Red Hat thought they bought. McFluery must of laughed all the way to the bank!

So back to Gavin and his Seam2.0. Without going into details, Seam tries to do with J2EE5 what Rails does with Ruby. Now I guess you're saying that a full blown J2EE5 App Server is not needed to do what Rails does, even with a limited language like Java - yes, true, but... JBoss is J2EE5 standards complaint so they must use all the J2EE5 standards :^).

From all accounts Seam at its core is an elegant framework, the problem is though is that it solves the wrong problem. The problem it should be solving is how do I build web applications with Java quickly? (to which the obvious answer is, you don't :^)). Instead the problem it chooses to solve is how do I build web applications using J2EE5, including EJB3.0, JSF and a full blown App Server? If you sell Application Servers, or product consulting for Application Servers like JBoss does, then perhaps this latter problem does need a solution. So back to the question, what are Gavin Kings motives when he is selling Seam? Well if you are as cynical as me, you would say that it is to push JBoss as an Application Server and to sell more product consulting.

These political and business issues have dogged the IT industry for a very long time, yet they are never adequately debated amongst the developer community in my view. My concern is that there will be a lot of young naive developers out there that believe that they can trust the likes of Rod Johnson and Gavin King as honest “community” leaders, and will actually invest hours learning either Spring or Seam, only to find out that it all was one big con and that their time would have been much better spent learning Ruby.

Anyway, like I say I intend to be doing less Java in the future. Personally, I prefer not to identify with a specific programming language and I like to see myself as just a Programmer first and foremost; that way I’m free to choose any programming language that suites me. My advice to the Java community though, if they are listening, is to watch out for the new pretenders. They could turn out to be worst then the ‘leaders’ we have now.

11 comments:

Villane said...

Personally, I would bet on Spring (and OSGi). It solves real problems currently in front of me. You note that IoC is a reaction to a problem in Java, but it seems that you are ignoring that it's just one problem. The fact that there are a few problems with something, doesn't mean that you should switch. I'm sure Ruby has lots of problems too. Including problems that Java doesn't have. And it may well take *years* until they all become apparent. A big problem is of course just the history and community size issue -- a lot of folks, including me, will stick with Java until Ruby has seen wider adoption, has just as good tooling, libraries etc. Currently Ruby seems to enjoy rather lot of hype, but it may well be just a loud minority speaking. Once I see something like Eclipse or Weblogic done in Ruby, I will take notice.

Oh, and I don't need to develop "web applications quickly". I need to develop applications that scale, are maintainable and can take advantage of incremental improvements and be well supported in the future. Quickly is a bonus of course. Ruby may well be able to provide all that, but I want to see actual proven cases of that before I even think of switching.

Pranab said...

With recent wave of consumer centric, web 2.0 based applications,java is not necessarily the best choice, whether with JEE or Spring. High productivity of Ruby and being able to build "web applications quickly" is critical for certain kind of applications. Not all applications fall into the category of highly transactional with complex business logic.

Andy said...

The problem it should be solving is how do I build web applications with Java quickly?

Actually, I'm coming from the Delphi camp and can build web apps of a traditional CRUD kind just as fast in Seam as I could in Delphi (which was damn fast), starting from scratch. Not to mention that Seam solves all my navigational, multi-browser and most back button issues out of the box.

I think anyone with a little Seam experience could easily duplicate the infamous Rails blog in 15 minutes without any problems.

I wonder whether the Ruby blog scales as well as the JEE5 one?

Paul Beckford said...

Hi Villane,

"It solves real problems currently in front of me. You note that IoC is a reaction to a problem in Java, but it seems that you are ignoring that it's just one problem."

You've made two common mistakes here. Firstly, you say that Spring/OSGi solves all your problems, but how do you know whether or not they could be better solved using something else? Also for brevity, I've focused on one (two actually) limitations of Java - but doesn't that make you curious to know whether there are more?

The thing I see again and again is that for a man with just a hammer every problem looks like a nail. All I am suggesting is that as programmers maybe we should ensure that we have more than one tool in our tool box.

If we do that, then we are better able to select the right tool for the job at hand.

The industry has chosen to go down an Algol inspired static programming path. This means that there is a whole family of programming languages inspired by Lisp that have been ignored. Being ignorant to this whole branch of programming means that stuff like Ruby seems new. Ruby is in fact older then Java, and many of the techniques used in Ruby go back to Smalltalk (1970's) and Lisp (1950's). So if you look at it this way, Java is the baby, and we've all been involved in a public evaluation over the last ten years :^)

devshed said...
This comment has been removed by the author.
David Pollak said...

You might want to look at the lift web framework (http://liftweb.net) It's based on Scala, compiles down to JVM bytecode, runs wicked fast, and is as quick, easy, and efficient as Rails, but secure, high performance, and works with existing Java infrastructure (e.g., Tomcat, Jetty, WebLogic, your favorite Java classes).

smackyou said...

j2ee is dead. Sun sold out. Spring sold out. No one wants to continue to develop on an overbloated slow dead fossilized horse skeleton. J2EE is dead. I don't want to beat this dead fossilized horse skeleton any more.

Anonymous said...

J2EE King is a very useful and practical program that can be used to run different applications at the same time, and to buy viagra

Sandeep SEO said...

Thanks for posting the blog. This was so interesting blog, I felt comfortable while reading the post, thank you......................Please contact us for Oracle Fusion Financials training details in our Erptree Training Institute

Unknown said...

Very interesting blog to read and to share, thanks for sharing such a good blog. Keep posting more blogs like this thank you.................................................
Click Here For More Details
Oracle SCM Training in Al Karama, Dubai

ravi said...

nice post thanks for sharing nice blog keep posting if want visit more https://snowflakemasters.in/