JBoss Seam : Stitching JSF and EJB3
|meet the runtime challenges over a network to provide the actual user interface i.e. a webbased user interface.
There has been made great efforts to provide the componentized user interfaces over the web to reduce the response time in reloading a changed UI. However to present a componentized user interface over the web is still challenging as it demands the framework to utilize the stateless HTTP protocol to render the changing UIs. However, every time the end user gets each UI as a separate dynamically generated web page and every time it requires the web browsers to interact with the UIs.Though, stateless HTTP protocol forces the actual rendered UI to stay loosely coupled with the code generating those UI. Classic GUI APIs like Swing demands a tightly coupling of the application code with the GUI. However, Unlike Swing, JSF decouples the presentation code at the expense of sending a completely new web page over the network.
Figure 2 illustrates one of the core features of the JSF framework i.e. loose coupling between the networked UI framework and the code that renders the UI. JSF provides a flexibility to use a number of render kits to render different user interfaces. For instance - the most frequently used render kit is the HTML render kit.
Figure 2: The rendering framework
In Figure 2, notice the gradual change made to the
classic UI architecture to get the new rendering framework. Only there has been introduced a little change in writing the application code. Still the application handles
|| the UI component events, co-ordinates the access of data and modifies the state of UI
On the other hand, there is a little observable difference from the application developer’s
perspective that lies between classic tightly coupled GUI frameworks and the contemporary
loosely-coupled web-based component UI frameworks.
However with the release of JEE 5 – It will be simpler to create the JEE applications almost as simple as coding the Swing applications. In JEE5, Most of the concerned changes with the JSF specifications will orient around to provide a rich set of UI components via JSP presentation technology to create highly flexible web-based user interfaces.
JSF: Facing Code-bloat issue
Achieving the desirable illusion of tightly coupled UI components cause the application
developers to preserve the undesirable sideeffect of code bloat when the JSF works along
with JEE. Most of the typical JEE 5 applications developed with JSF and JSP perform few tasks repeatedly i.e. executing a code performing the tasks – again and again. There are few of the tasks that are retrieved as a part of Model section of the developed MVC application using different UI, few of such frequently occurring tasks are:
- to create backing beans that bind to JSF UI components
- to create the application objects for application logic
- to shuffle the data between the backing beans and the application objects
- to co-ordinate the data transfer between the JSF UI components and the backing beans
- to persist the application objects, perhaps through yet another set of objects used for persistence
Figure 3 illustrates some of these
interactions. The thin arrows illustrate the source of the
Nov 2007 | Java Jazz Up | 17
|View All Topics
|All Pages of this Issue
69 Download PDF