May 08, 2005

Is there a Future for Java?

Over the last 5 years I have done Perl, Java and .NET development. Lately I have done a whole boat load of .NET development using ASP.NET with C# and VB.NET. I have had my fill of what it can do. The 3 years prior to that I developed and maintained several Java web applications with JSPs, Servlets and our home grown MVC frameworked modeled after Struts. And way before all of that I did raw web developing with CGI communications using Perl. Eventually I used mod_perl.

With this experience I have developed a perspective on how .NET compares to Java and Perl. In my days with developing interactive websites with Perl I was tempted to head towards Java and I loathed Microsoft because of their lack of standards compliance and their vast supply of security holes. My primary example of those problems back in 1999 and 2000 was Microsoft Frontpage...


It produced nasty HTML markup which was bloated with heavily embedded tables and font tags everywhere. Today any half decent web designer or developer should know the problems with heavily embedded tables which easily result in web pages reaching over 100k in size. And then there is the problem of Frontpage simply producing garbage code. Applications like Adobe GoLive and Macromedia Dreamweaver use to create equally disastrous markup. I have learned to simply code markup by hand.

But things over the last 3 years have suddenly changed. Perhaps the change could be attributed to the DotCom days going bust but I believe it has a lot more to do with standards becoming stable and relevant. In one case I worked on a project where a sort of SOAP transaction was taking place between two servers running Java servlets. A developer on the project was annoyed by the fact that the project was not using software from the Apache Axis project to handle the SOAP transaction. Instead we were building raw strings and sending them over HTTP. I was curious why and determined it was that way simply because when the software for the project was first created the SOAP specifications were pretty new and the Axis project was not fully implemented.

Essentially, the choice was to write as little code to get the job done and then freeze the communications protocol as it was at the time. It would not evolve with every new specification on the SOAP protocol. The old "if it ain't broke, don't fix it" rule was in effect. I found that to be a solid strategy.

Fast forward to now and I am working with Visual Studio.NET 2005. The previous release, VS.NET 2003, had horrible markup with unclosed tags and otherwise erroneous syntax. My best guess is that Microsoft simply produced the IDE using the de facto standards at the time for the basis of their markup generating wizardry. Consider it had to work with Netscape 3 and 4 and MSIE 5 at the time. Consider how poorly Netscape 4 stacks up to Firefox these days.

Many Visual Studio users build websites using the visual mode and may be completely oblivious to the rules of HTML 4 or XHTML 1.0. In the new version of VS.NET which is only in Beta 2 status currently, there is the option to select from a list of document type definitions. It provides a way to validate your HTML markup as you develop. It allows me to quickly write the markup by hand but if I click over to the visual display and make a few quick changes it does not distort and change the markup I created by hand unlike the 2003 version. This also means designers can produce valid XHTML templates and pull that markup into VS.NET without it being restructured to suit VS.NET. That allows me to code markup to standards so it will work well with MSIE 6.0, Firefox 1.0 and future releases.

Back in the land of Java I have no idea where to start. I purchased the personal license of IDEA a year ago and I have used it to write code and I have tried to use it to work with web pages. It does not seem to provide a great deal of support for XHTML validation. It is generally regarded as the best IDE for Java by most developers.

Perhaps the WST Components for Eclipse will provide the realtime syntax checking of HTML and XML markup that I expect and require for modern development. It is hard to determine what it really does and how complete the implementation is currently. I would appreciate some screenshots at least. Too many times I have set up Eclipse and installed new components only to be disappointed by the lack of actual functionality. One time I installed a Javascript debugger and I was really excited by what the website claimed it could do and I found that all it did was decorate the icon in Eclipse for files with ".js" as the extension. The context menu provided no Javascript options and the editor was not even color-coded for syntax. It was a waste of time.

I guess what is comes down to is that the Java development environment is so fragmented. Sun fails to lead and everyone else, like IBM, JBoss, Macromedia and Apache come up with their own shiny objects to distract and attract developers. Since I have been pushed into working with ASP.NET I have found that Microsoft is able to provide direction for the future of the .NET platform.

In the land of Microsoft there is the idea of the Garden Path. A developer will find they are most productive if they follow that path. By following the Garden Path you will also have plenty of documentation assisting you every step of the way along with active support in VS.NET. I have learned to find this Garden Path and unlearn my past habits of blazing my own trail and I have found it helps me be more productive. This seems to be my central frustration with Java. While my day job has me working on an ASP.NET application for another 4 to 5 months I still want to do Java development at home and would like to be on a Java project again in the future.

But the idea of going back to the chaos of Java is not appealing. Once I go back my version of IDEA will still be using 4.5 and I will not be able to upgrade to 5.0 without buying another license. At that point I may simply choose to use Eclipse. From there I must decide what components I will use. I will also have to decide which web frameworks to use. I know that Struts is effectively a dead end due to the miracle that is JSF. (sarcasm) So to do the cutting edge stuff I believe I will simply be lost. I will likely just develop a web application without a framework. I prefer to keep things simple anyway. I was never sold on Struts anyway.

As far as JavaServer Faces (JSF) goes, I am immensely unimpressed and disappointed by it. That last time I was on a large Java web application project I was getting more JSTL and Jakarta Taglibs components put to use. Then a couple of years ago I saw David Geary present JSF. It was being promoted as the next big thing for Java. But my question to Geary at the end of the presentation was, "Does this integrate with tag libraries?" and his was response was "No." Apparently there was a sytax conflict and it just couldn't be done. To go to JSF meant abandoning all of you code which you carefully designed to leverage the powerful decouple which tag libraries provide and then tie your wagon to this new flag ship.

A little over year later I attended another presentation by Geary and he was going to show off what you can now do with JSF. He showed a control where you can log into a website and log out. That was it! One control! And as I read his blog, he could be leaning towards Ruby on Rails like many other Java developers. It seems some feel Java is a sinking ship, or at least for the moment there is another shiny object which has everyone's attention. If Sun and others are saying the old way of doing development with JSP and tag libraries is dead and the event-driven way is where we must go, it means we must abandon what we have been working on the past several years. If you are going to abandon existing software which is the cornerstone of your businuess does that mean you automatically stick with the current platform, or does it give you a good reason to look for alternatives? It seems like Ruby on Rails or ASP.NET 2.0 are 2 solid alternatives, especially if the Java roadmap is just going track behind what Microsoft is doing anyway. Consider also that JSF was only created to compete with ASP.NET.

I attended the Geary presentation after starting work with ASP.NET 2.0 which has the Membership and Personalization controls which provide controls such as Login, LoginStatus, LoginView, PasswordRecovery, CreateUserWizard, and ChangePassword. With those controls I can quickly create a website which provides membership functionality in a few minutes. Nothing like it has been created for JSF to my knowledge.

Sun has started to open up a little more and the Java Community Process (JCP) has been updated to be more Open Source friendly. You can thank the Apache Software Foundation for that. If Sun is going to truly innovate and accelerate their development they need the Open Source community to assist in the effort.

With a more friendly JCP licensing policy the Apache Software Foundation started Geronimo, a J2EE Server implementation. And this week the ASF is considering a project to create a J2SE 1.5 implementation. It will be called Harmony. With the above concerns I have about Java, I feel these two projects offer a great deal of hope for the future of Java. It may not have a major affect on the community or trends in software development for a year or more but once it is ready it should have a very positive influence on Java and the quality of software in general. I feel the ASF has demonstrated strong leadership in the community and I know they will be able to develop the Garden Path, not only for Java, but all Open Source development with a business-friendly license. The ASF just better not create their own new IDE from scratch or make other poor decisions like that. Their history has shown they make solid moves and I expect the same going forward.

Posted by brennan at May 8, 2005 08:14 AM | TrackBack
Comments

Hi !!!

Its' an excellent article, which provides information regarding future of java and at the same time it also discusses abt the strong point of .Net. Java has bright future provided JCP and ASF functions properly.

Posted by: raghvendra singh at June 7, 2005 01:07 AM

Yup, I agreed that JSF is just following ASP.NET so blindly. VS.NET IDE is always fast, and Java Studio Creator really slows down development.

I loves Java, but my day job do not allow me the time and money to keep on advocating for Java goodness. Performance is where Java should look into, and no matter how many Java developer tells you modern Java is already 'near' fast, they are all really pulling your leg...just dun take their stats, do a machine and machine comparison with VS.NET and Sun Creator and you cannot deny the hard fact that JAVA IS DAMN SLOW...

Posted by: mech at June 28, 2005 05:34 AM

hi! thank you so much for this entry. I learned a lot!!! wowwwwww!!! i'm a java student. hopefully,we'll finish the course within the month. we are now starting our group project.anyway, i hope to see more entries concerning java soon...it's really nice to learn from others' experiences...keep it up guys!

Posted by: susan at February 10, 2006 12:17 AM
Post a comment

Comment Rules

Express your opinions and provide feedback, but abide by the following guidelines:

  1. Use language appropriate to civil conversation. Profanity is not acceptable.
  2. Innuendo is not allowed. If you have a point, make it clearly.
  3. Insults towards the site author or the author of a comment will not be tolerated. The point is to provide a healthy exchange of viewpoints.
  4. Comments must pertain to the topic of the blog entry.

Comments which do not abide by the rules will be deleted.










Remember personal info?







[ Home ]