Thursday, March 30, 2006

Java SE 6 isn't for the Enterprise its for Slashdot

First off I should own up to something, I've been on the Java SE 6 JSR group but I'm going to comment only on the publicly available information, but don't expect it to change too much.

Secondly I've got a few prejudices about development, these come from broadly three sources

1) The Mythical Man Month
2) Having Ada, Eiffel and C as my first three "commercial" languages
3) Working on projects with tens, or even hundreds of developers

So Java SE 6 is now in beta, and its got lots and lots of "cool features" to attract the Slashdot crowd. As someone whose applications are mainly

1) Developed by lots of people in different countries
2) Expected to be maintained for years by different people
3) Run remotely on Servers

This means that what I use are things like J2EE, Spring, Struts and all those application container frameworks out there. I'm used to selecting the technology mix that we will use on the project and picking the 3rd parties libraries, products or projects that will be used. And when selecting those technologies one of my major considerations is how to LIMIT functionality being used in the wrong way.

What I have problems with is "clever" developer code that is a bugger to maintain, and people going for the Shiny Nickel Anti-pattern, and using things because they are "in the specification" so they must be right. The other problem I have is that underneath my nice application container there are a huge raft of Java standard libraries that not only don't I need, but which I definitely don't want being called (Midi sound from J2EE anyone?).

So what are the highlights of Java SE 6?

Security - Kerberos, JAAS & Smart Card. Well if I've got J2EE then I've got this already, if I've got Spring its not exactly a leap, so no bonus here.

Integrated Web Services - Oh great, because it was SO hard to use Axis or Web Services in J2EE anyway. Worst of all this doesn't just mean CALLING web-services, it includes call-backs, that's right folks every single Java application will have a Web Server embedded in it with Java SE 6. I can see security people all over the world updating their recommendations on Java for the desktop. This is before we get to the challenge of doing asynchronous programming in a standard Java app, a problem that makes multi-threading (which most people can't do) look simple.

Enhanced Management - Now includes a bit more monitoring and a link to Solaris, whoopee.

Increased Developer Productivity - Absolutely rubbish, everything that has gone in is around bells and whistles, there is nothing about helping developers, putting in async coding models is about as far away from productivity as you can get. There are no elements for instance that help IDEs work better with Java, nor are there any elements that add more productive language features.

Improved User Experience - Great some desktop improvements, what a huge bonus on my remote server.

Missing off the list is my personal "favorite" which is the scripting support, and to top this for Sun this means bundling JavaScript as a language. This Java SE release effectively recommends heterogeneous programming as a good thing and that scripting is something to be embraced on your project. I'm not a huge fan of scripting, I'd put it in the multi-threaded code perspective, there are about 2% or less of developers I'd trust to do it well, its not something I want "clever" developers putting in because they think its cool.

So with Java SE 6 its now official that Microsoft were right (and the DoD and language research people wrong) that multi-language development is a good thing(tm).

This is a kitchen sink Java SE release where lots of libraries that could have been downloaded separately have been integrated into the basic platform. Unlike every previous Java release where there has been a good mix of enterprise requirements and some populist elements, this release is purely for the populist with only problems for the enterprise. Its bigger and more bloated, now featuring a whole new language (JavaScript) a Web Server and yet more libs for pretty GUIs.

The good news is that Java SE 7 might focus more on the multi-billion dollar market than the Slashdot crowd.

Its about time that Enterprise Java projects, whether in Spring, Java EE or whatever had a basic Java platform that doesn't include all the crap aimed at creating a platform that "proudly" boasts more bells and whistles than .NET. In the same way as having GUI code in the kernel of an operating system is a bad idea(tm), its a dumb idea for the Java core.

We need a core platform that just includes the basis, we need a Java Desktop version that includes the GUI. Enterprise projects can then just use the extras that they want, and not have to cope with the crap that they don't. With SWT and the like being used more often its time to admit that some people might not want all those Swing libraries. Almost exactly what Sun do already and no I don't know what that isn't a sensible strategy either.

Time to start lobbying for Java SE 7 code named Dolphin - the enterprise release?

* - bad idea(tm) is a trademark of Microsoft Corp

5 comments:

Anonymous said...

If you or your developers can’t do multi-threading then I think its time for a career change for you lot. This is one of the main reasons Java server side development is in the mess it is. J2EE tried to make it is easier, whilst all it did was increase development costs and make people spend far too much time doing application server administration.

Steve Jones said...

I'm saying that 95% of developers can't do multi-threading, and I'll stand by that. Unfortunately very few developers these days have a degree in Computer Science and have studied works like those by Hoare equally few understand the complexities of multi-language programming.

Multi-threaded code is a hard problem to do well, I'd disagree that J2EE made it worse, because given that there are more average developers than good developers its a lot safer to have average developers doing J2EE and a bit of admin than trying to write multi-threaded code.

Some of us have to plan for everyone, and not just for ourselves. Pretending everyone is smart is a dumb plan.

Anonymous said...

Under the covers of J2EE there is a multi-threaded application. You can easily develop a J2EE application, however once go live if you forget about threads, etc, your in trouble. My experience in being a server side consultant, is that where we have developers with limited ability building complex apps your heading into trouble.

Building complex applications without the right people is a dumb plan. If you get a nurse to do a doctors job your asking for trouble. In my experience this have been the consultancy approach.

Steve Jones said...

Its very dumb to try and build complex applications without ANY top grade people, equally its pretty dumb to assume that everyone is Doug Lea, especially those maintaining the app.

To use your analogy, you need lots of nurses and a few doctors to run A&E, it doesn't work if you just have nurses, and its too expensive if you just have doctors. After patient care is done by Nurses rather than doctors, and Nurses are a damned sight more trained than some of the people who work in IT application maintainance.

Java SE 6 ignores all of these real world problems to create a "cool" set of features for the slashdot crowd, and a pain in the arse for those of us who worry about the enterprise.

Development - its the only career where we'd allow the untrained to do open heart surgery.

Anonymous said...

"Development - its the only career where we'd allow the untrained to do open heart surgery."

Yep and thats why we end up with Mustang catering for the "slashdot crowd".

It's inevitable, allow the industry to be largely made up of those that can't cope with threads, don't know what a server is and have no understanding of the difference between performance and scalability and you have a majority with a non-expert perspective and a loud voice which drowns out those that know a little.

The vendors then cater for the majority because they just care about money. They have no interest in making anything better and certainly won't take a stand to tell these people they're wrong for fear of losing sales.

There goes innovation, quality etc. Business wanted large quantities of cheap "programmers", that's what it got and this is the inevitable result. Sigh.