| By Max Katz | Article Rating: |
|
| April 18, 2008 04:00 PM EDT | Reads: |
55,032 |
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,032
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
- Adobe Flex Developer Earns $100K in New York City
- Rhomobile CEO to Speak at iPhone Developer Summit 2009 West
- Rhomobile to Exhibit at Cloud Computing Conference & Expo
- Building a Social Site with Ruby and Rails
- Accelerating Innovation with Yahoo! Cloud Serving
- JetBrains' IntelliJ IDEA Goes Open Source
- Migrating from UNIX / RISC to Red Hat Enterprise Linux
- What Could You Do With Your Code in 20 Lines or Less?
- JetBrains Releases RubyMine 2.0
- Elance Work Index Reveals Strong Demand for Qualified PHP Programmers
- Get Time Tracker Source Code in SproutCore
- 4th International Cloud Computing Conference & Expo Starts Today
- Is Microsoft as Free as Open Source?
- Adobe Flex Developer Earns $100K in New York City
- Rhomobile CEO to Speak at iPhone Developer Summit 2009 West
- Rhomobile to Exhibit at Cloud Computing Conference & Expo
- Building a Social Site with Ruby and Rails
- Accelerating Innovation with Yahoo! Cloud Serving
- Enterprise LAMP Summit Asks Global Open Source Leaders “Can LAMP Deliver?”
- Engine Yard Gets More Money
- JetBrains' IntelliJ IDEA Goes Open Source
- Migrating from UNIX / RISC to Red Hat Enterprise Linux
- What Could You Do With Your Code in 20 Lines or Less?
- Why Do 'Cool Kids' Choose Ruby or PHP to Build Websites Instead of Java?
- Ruby on Rails Won't Make It in 2007 and Forget About AJAX
- The Top 250 Players in the Cloud Computing Ecosystem
- The Jury's Still Out On Ruby On Rails (RoR) and AJAX
- Red Hat Named "Platinum Sponsor" of Virtualization Conference & Expo
- Can Ruby Live Without Rails?
- An Introduction to Ant
- Testing in Ruby on Rails
- Ruby On Rails Moves At 'Acela' Rates Toward Java
- Java Kicks Ruby on Rails in the Butt
- Cyberhive Supports Ruby On Rails
- Ruby on Rails One-Day Seminar: Introducing Ruby on Rails – the Pain-Killer for Web Developers

































