All-You-Can-Gulp Steamin' Hot Hard-Core Java! No-compromise, professional, non-newbie tips, tricks and solutions. You're invited to join!

Saturday, November 22, 2003

Web frameworks

If you want to understand the differences between different web-frameworks for Java, here is a brief summary:

Struts:
Model-View-Controller based. The model is your EJB/other data, the View are JSP pages and the Controller is a combination of an XML file and code grouped in 'Action' objects. Provides helper classes that will automatically make JSP form data available to the developer in a Java object (instead of parsing the request parameters etc.). Still cumbersome to develop in.

JSF/UIX:
The application flow is determined as in Struts -- actually Struts can even be used as a drop-in controller.
Server-based stateful components. But application flow control is still cumbersomely defined in 'Action' style objects.
Difficult to create reusable components.
Layout still done the JSP way (even though it is with a specialized tag library) or with XML (as with Oracle's UIX).

Echo:
From component level to application flow level, it is object-oriented and event-based.
If you've ever programmed in AWT/Swing/SWT or any other 'event listener' or 'signal-slot' architecture you will be comfortable with Echo.
You layout your UI the object oriented way, with components. A new WYSIWYG editor coming soon will make this even easier.
Very easy to create reusable components and even sub-applications. The framework takes care of rendering your application to HTML and translating the user's actions to meaningful server-side events.