The non OO part of J2EE
GUI development has always been a pain. Looking back, the most commercially successfull, and easy to use tool for GUI based application development was Visual Basic. It had an easy form creator where you can drag drop your widgets and create your own application UI in minutes. Once you are done with it, you can simply tie some application logic to each form button.. u have your application ready!
Then came the web based era of application development where UI was interpreted as HTML and rendered by a web browser. Application logic would run decoupled in a middleware server. Microsoft was quick to launch its new technology based on IIS(web server) called ASP.
java kept developing in the background. Java's concept was simple: Object Oriented, open source and platform independent. For UI based application development, java had awt and then swing. Everything was object oriented.. Eventually swing evolved, new tools were introduced that made it easy to develop forms using java-swing(vb style). In the mean time Java based web technology(asp or .net equivalent) developed independent to swing into the massive J2EE framework. J2EE does everything one would expect from a good middleware framework but for the UI part.
I must say Java couldnt keep its promise of "object orinted" when it comes to the web/html part of J2EE. JSP(an answer to asp) was deviced as java embeded in html which will generate html based UI's at run time to be displayed in the user browser. JSP is (html + java) highly non object oriented. JSP discussion is incomplete without the underlying java counter part: servlets. Servlets are object oriented but I must say it is difficult if not impossible to design UI based forms using servlets. The main problem here is "browser based html" and the decoupling between browser and the middle ware application.
This complexity was addressed using different design patterns, frameworks etc. For instance STRUTS the popular framework to seperate UI, navigation and business logic. And then JSF to remove the disadvantages of STRUTS and to provide a better standard for tool developers. Its all good but where are the objects? For instance, JSF which defines user element placement has become more XML oriented then object oriented.
With evey new standard and framework introduction in the J2EE(web tier) world, we are only moving away from complete object orientation. If you want to know what an complete object oriented application is, and what the advantages are, then just create an application using Java-Swing. In the java-swing world you can create the entire application using the plane old java classes(completely OO) and may be few property files to store customaziable information external to the application code!
So web part of J2EE is bad? I dont have an answer. This is just an evolution, it had to evolve this way. May be the sane thoughts tossed during the evolution didnt win the votes of sponsorers over what is practical.
I would like to propose here one such "sane" but not very practical thought for web based appliaction development:
Create your entire application as an pure java-swing based app. Then create a layer on top of it which will convert the java based swing forms into browser based html pages. Let this layer take care of navigation and other other conversion logistics. We have a simplified framework!
I ran across an commerical application that does just this!
@link to webcreme
This might sound more like an integration tool that must be used to expose the existing java application to web based clients.
But if this concept is explored properly and if the application is designed properly, I think we have a new era of Java web based development.
Feb 13:
@GWT
@Java2Script, RCP to RIA
0 Comments:
Post a Comment
<< Home