| By Max Katz | Article Rating: |
|
| April 18, 2008 04:00 PM EDT | Reads: |
55,007 |
It's essential for IT managers to consider and be aware that more than one delivery platform exists today for Rich Internet Applications. Table 1 covers three platforms and their associated technologies.
While the last two approaches still involve the browser as their foundation, each also taps into powerful virtual machines that are installed as plug-ins to deliver even richer applications.
Let's look at the choices.
JavaServer Faces
Let's start with JavaServer Faces. JSF is an open source, component-based user interface Java framework for building pure browser-based applications. JSF is also the standard technology for building Web user interfaces in the Java EE 5 stack. Pure browser-based applications mean that nothing beyond the standard browser is required to run the application. JSF components generate standard HTML markup. JSF provides a declarative approach to designing the UI. JSF components provide all the logic, as well as encapsulated HTML rendering, so the developer can concentrate on building the UI, instead of messing with low-level HTML. Out-of-the-box, JSF provides a basic set of components such as links, buttons, layout, and tables. What's more, the JSF component approach makes it the perfect technology to develop Rich Internet Applications. However, to efficiently deliver a Rich Internet Application, we have to take the component model a step further.
A popular technique for delivering RIA applications inside a Web browser is AJAX. AJAX stands for Asynchronous JavaScript and XML. It is basically a collection of existing technologies for radically changing user experience on the Web. However, manual AJAX development or the utilization of one of the JavaScript libraries is challenging and, ultimately, both are very poor options. With manual development, it's not uncommon to spend a significant amount of time battling JavaScript browser incompatibilities. Finally, and probably most importantly, manual AJAX coding doesn't fit the JSF component model.
Nevertheless, all is not hopeless. Due to JSF's extensibility and its component approach, combining JSF and AJAX can be done easily. That's where RichFaces comes in. RichFaces is a rich JSF component library that provides a large number of components with AJAX support. Rich components from RichFaces render all the necessary JavaScript to send an AJAX request and, at the same time, know how to partially update a part of a page when a response comes back. IT organizations can add rich functionality without writing any JavaScript code. Developers can again concentrate on UI development instead of low-level AJAX coding and JavaScript debugging (because the components' JavaScript code will have been tested in all the modern browsers).
While JSF and RichFaces are solid tools for building Rich Internet Applications, other alternatives do exist. Enterprise IT managers must understand and be aware that other delivery mediums exist for Rich Internet Applications. First, we have more than just the browser to deliver Rich Internet Applications. It's common today to look at the browser as the only vehicle for delivering Rich Internet Applications, but it isn't the only medium that should be considered.
Let's look at a quick example using JSF and RichFaces components. We are declaratively defining the UI using JSF tags. Declaratively defining the UI is easier and more natural. When this page is processed, UI components on the page will render the necessary HTML and JavaScript to be sent to the browser.
<h:form>
<rich:panel>
<f:facet name="header">RichFaces</f:facet>
<h:panelGrid>
<a4j:commandButton value="Hit Me!"actionListener="#{clickBean.count}" reRender="c" />
<h:outputText id="c" value="Number of hits: #{clickBean.numOfClicks}"/>
</h:panelGrid>
</rich:panel>
</h:form>
The model behind this page is a simple POJO:
public class ClickBean {
private Integer numOfClicks = 0;
public Integer getNumOfClicks() {
return numOfClicks;
}
public void setNumOfClicks(Integer numOfClicks) {
this.numOfClicks = numOfClicks;
}
public void count(ActionEvent event) {
numOfClicks++;
}
}
And, finally, when the page is run in a Web browser, Figure 1 shows the result:
Note that when clicking the button, only the counter area is updated. We are not reloading the full page.
Published April 18, 2008 Reads 55,007
Copyright © 2008 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
- Rich Internet Applications - State of the Union
- The Business Case for Rich Internet Applications
- Rich Internet Applications vs AJAX: "2008 Will Be A Crucial Year"
- Moving Beyond AJAX: 2008 Is the Decision Year For RIAs
- Bringing RIAs into the Enterprise: New Challenges, New Solutions
- Rich Internet Applications: 2008 is the Year the RIA Category Accelerates
- Rich Semantic Internet Applications with Flex
- AJAXWorld Keynote Speaker on the Risks and Rewards of RIAs
- The Business Value of RIAs: An Informal, Virtual Round Table
- Model-View-Controller and the Brave New World of Rich Internet Applications
- Rich Internet Applications: Tips, Tricks & Techniques
- Choose Your Rich Internet Applications Trajectory at AJAXWorld in New York City
- Next-Generation RIAs: Future Directions for Rich Internet Applications
- Sun Frees Rich Internet Applications from Browsers, Releases JavaFX 1.0
- JavaFX vs Silverlight vs Flex
More Stories By Max Katz
Max Katz is a Senior Systems Engineer at Exadel. He has been helping customers jump-start their RIA development as well as providing mentoring, consulting, and training. Max is a recognized subject matter expert in the JSF developer community. He has provided JSF/RichFaces training for the past four years, presented at many conferences, and written several published articles on JSF-related topics. Max also leads Exadel's RIA strategy and writes about RIA technologies in his blog, http://mkblog.exadel.com. He is an author of "Practical RichFaces" book (Apress). Max holds a BS in computer science from the University of California, Davis.
![]() |
Tom Van den Eynde 04/19/08 04:00:16 AM EDT | |||
It's simple: go with Adobe Flex - it simply rocks. |
||||
![]() |
DW 04/18/08 11:18:54 PM EDT | |||
Hmmm, have you checked out the Orbeon Forms?(http://www.orbeon.com/) |
||||
![]() |
Hmmm 04/02/08 01:38:47 PM EDT | |||
Yes, XForms sounds good. PicoForms offers a solution that would work, and Yahoo has done their new mobile back end using server-side tech. An on-device XForms processor would help write portable mobile apps. |
||||
![]() |
skalvi 03/25/08 07:43:14 PM EDT | |||
If I want to write an enterprise application for my business and I want my PC user's to be able to use it as well as mobile user's, java will not work. Web start will work on the PC but not a PDA, since I would have to use a midilet. Same with flash. I would have to develop in flash lite for the PDA's. I would have to write different version of the same program for different devices. The same with GWT for the PC based version. I would have to write a seperate application for Android and the Davlik jvm. This is where JSF is most suitable, with the concept of plugable rendering kits. Why can't I just use GWT on the gphone? Maybe I can. Maybe we should hybridize JSF. So what is the best platform for write one run anywhere? anyone? |
||||
![]() |
Confusion Solution 03/01/08 04:46:58 PM EST | |||
> The number of different frameworks and libraries So just use Flex instead, hehe! |
||||
![]() |
Max 02/28/08 03:34:19 PM EST | |||
@Michael: Nowhere am I comparing JSF and Flex, I'm merely discussing various technologies and delivery platforms for RIA applications. Nowhere am I saying that one is better than the other. I'm not sure why you would want to hand-code JavaScript, unless you are building a framework, doing a school project or some research. Do you consider GWT (Google Web |
||||
![]() |
Michael 02/28/08 07:30:10 AM EST | |||
sorry, but comparing JSF and Flex is ridiculous. JSF has nothing to do with RIA. You might say that JSF is a possibility to build Ajax apps, but then: why JSF? It is utterly unsuited for Ajax compared to other web frameworks BECAUSE it hides the JS from the dev. |
||||
![]() |
Alex 02/20/08 12:59:53 PM EST | |||
Good article. It misses one important comment though. Your JSF example has to make a server call to the pojo to increment the click counter, while both Flex and JavaFX example do not need to do this because of their stateful nature, which is very important. Out of these three, Flash Player's UI looks better than others. |
||||
![]() |
DW 02/20/08 10:07:40 AM EST | |||
What about XHTML and XForms Offline? |
||||
- 4th International Cloud Computing Conference & Expo Starts Today
- Publishing Synergy: Blog, Twitter and Ulitzer
- Performance Tuning Essentials for Java
- Cloud Expo New York Call for Papers Deadline December 15
- Google Wave
- IBM Hardware Chief, Intel VC Exec Arrested in Insider Trading Scam
- Cloud Computing Can Revitalize Your Career as Software Developer
- SOA World Magazine "Readers' Choice Awards" Voting Is Now Open
- Oracle+MySQL Opponents Take to the Barricades
- Virtualization Expo Call for Papers Deadline December 15
- Oracle Faces Growing Price for MySQL
- SpringSource Moving to Spring 3.0
- 4th International Cloud Computing Conference & Expo Starts Today
- Deputy CIO of the CIA to Keynote 1st Annual GovIT Expo
- Publishing Synergy: Blog, Twitter and Ulitzer
- Performance Tuning Essentials for Java
- Cloud Expo New York Call for Papers Deadline December 15
- Cloud Computing Expo: Exclusive Q&A with Yahoo! SVP Cloud Computing
- Google Wave
- IBM Hardware Chief, Intel VC Exec Arrested in Insider Trading Scam
- Cloud Computing Can Revitalize Your Career as Software Developer
- Oracle-Sun: IBM Reportedly Behind Delay
- Citrix Aims To Cripple VMware’s Cloud Designs
- Oracle Trashes HP Relationship for Sun
- After Ubuntu, Windows Looks Increasingly Bad, Increasingly Archaic, Increasingly Unfriendly
- SCO CEO Posts Open Letter to the Open Source Community
- Simula Labs Launches Hosted Delivery Platform To Enable Enterprise Open Source Adoption
- Where Are RIA Technologies Headed in 2008?
- Source Claims SCO Will Sue Google
- How Open Is "Open"? – Industry Luminaries Join the Debate
- Latest SCO News is Plain Weird
- IBM Tells SCO Court It Can't Find AIX-on-Power Code
- SCO Claims Linux Lifted ELF
- Flashback: Investing in 'Professional Open Source' - Exclusive 2004 Interview with David Skok, Matrix Partners
- HP Starts Pushing Desktop Linux
- Linux Business Week Exclusive: Linux Kernel To Be Re-Written To Counter Microsoft FUD





























