SQL Zone is brought to you in partnership with:

Matthias has posted 1 posts at DZone. View Full User Profile

Introduction to Oracle's ADF Faces Rich Client Framework

01.22.2009
| 113619 views |
  • submit to reddit

Web 2.0 and Ajax become more and more important when searching for a JavaServer Faces component suite for the next generation application project.This article gives a quick introduction to Oracle’s ADF Faces Rich Client, the next generation of ADF Faces, by exploring some of its components.

About Matthias Wessendorf. Matthias Wessendorf is a software developer at Oracle. He currently works on ADF Faces, which is an AJAX-based JSF component suite. Matthias also contributes to the OpenSource community, mainly Apache MyFaces and Apache Trinidad. Before joining Oracle, he worked as a CMS-Developer at Pironet, where he was building a next-generation CMS, using UI technologies like XUL and AJAX. His blog is located here (->http://matthiaswessendorf.wordpress.com/) and you can follow him on twitter (http://twitter.com/mwessendorf).

 

The development of ADF Faces goes back to the year 2001, as it started as UIX and became later, when JSF arrived, the ADF Faces library. In 2006 Oracle donated the first generation of ADF Faces to the Apache Software Foundation and the project is now maintained there under the name Apache MyFaces Trinidad. ADF Faces Rich Client (see [adfRich]) is the next generation of ADF Faces and it is part of the JDeveloper 11g offerings. You can download the current version of JDeveloper 11g from [jdev11g].

RIA – Rich Internet Applications

The ADF Faces Rich Client Framework (RCF) contains more than 150 AJAX-enabled JSF components ([adfComps]), therefore the realization of RIA, by using JSF, is pretty simple. Figure 1 shows an example of a very rich user interface, based on RCF:

The library does not contain only UI centric components it also ships various helpers, such as JSF validators and several listeners to export data to Excel, for instance. It contains a complete JavaScript API as well. RCF requires a JSF runtime implementation of the 1.2 version of the specification and it uses internally some of the APIs, offered by Apache MyFaces Trinidad 1.2.x ([Trinidad]).

Getting started with RCF

After downloading and installing JDeveloper 11g ([jdev11g]) launch it to create your first ADF Faces project. To do that, click on the “New Application...” button as seen in figure 2:

This opens the wizard of figure 3:

In this wizard we give the application a name (here “DZONE”) and we choose the “Fusion Web Application (ADF)” template for our new project. After done this, click FINISH to generate the project. What you got is a ready-to-go project, where no extra configuration work is needed. No need to add the FacesServlet from JSF or the required RenderKit for ADF. The wizard in JDeveloper does all the work for your convenience. Figure4 shows the structure of the generated project:

Now we are close to our first ADF Faces based JSF page. To create page select the “Web Content” folder, click the right mouse button and select the “New...” item. This gives you the dialog of figure5...

...where you go to the “Web Tier” category to “JSF”. After picking the “JSF Page” item on the right side you click OK.  In the dialog of figure 6...

...you provide the name of the JSF Page and you select the the “Create as XML Document (*.jspx)” checkbox. This ensures we are getting the JSPX syntax, which is a XML-based JSP dialect. To physically create the page, just click OK. You now get an almost empty JSF Page, (see figure 7):

...which contains two key components the <af:document>, which renders tags like <html>, <head> or <body> and the <af:form> component, since a lot of ADF Faces components require a form to work as expected. This page has all you need and is ready to take more components. Just drag a component from the “component palette” on the right to the main page, for instance take the “Input Date” component. Now let’s save and run the page. To run the page click with the right mouse on the page and select the “Run” item, as you can see in figure8:

Now JDeveloper is launching the Weblogic server to deploy your application, when ready you will see a new browser (window) that is poiting to your previously created JSF page. You now see a very simple page, which contains one component, the <af:inputDate> component. By clicking on the icon a popup is visible, where you can select a date (figure 9):

This page does not have much functionality, but remember how easy and fast it was to get to this point! With a very few clicks you created a project with a common project structure and were able to launch the page in the Weblogic container.

AttachmentSize
figure3.PNG70.88 KB
figure4.PNG19.87 KB
figure5.PNG42.74 KB
figure1.PNG35.5 KB
figure2.PNG51.51 KB
figure6.PNG16.45 KB
figure7.PNG81.35 KB
figure8.PNG85.61 KB
figure9.PNG4.29 KB
figure10.PNG17.57 KB
figure11.PNG24.25 KB
figure12.PNG6.75 KB
figure13.PNG12.57 KB
figure14.PNG12.6 KB
figure15.PNG7.06 KB
figure16.PNG4.01 KB
figure17.PNG5.35 KB
figure18.PNG7.28 KB
Published at DZone with permission of its author, Matthias Wessendorf.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Comments

Rick Hightower replied on Thu, 2009/01/22 - 10:55pm

Matthias,

I have a lot of respect for you and for Oracle.

My boss at Intel once told me the great thing about standards is this: "There is a lot of them to choose from".

You could say the same about Ajax enabled JSF component suites. RichFaces, ADF, Tomahawk, ICEfaces, and about a 1/2 dozen more. How do you pick?

A while back I started using RichFaces. I evaluated Oracle ADF several years ago and it just did not work out for us, and at the time we decided to use RichFaces + Tomahawk instead.....We have been using RichFaces ever since, and with the publication of a recent RichFaces book; we finally learned how to use it well.

So questions come to my mind...  How does Oracle ADF compare to RichFaces, ICEfaces, Tobago, Trinidad (where does Trinidad start and Oracle ADF continue)?

Also there is a pretty steep learning curve to learning some of these frameworks and getting around their many quirks. Which makes it difficult to switch as the investment in learning is high... How do you convince someone like myself to give Oracle ADF a try (or another try) who might be using one of the 8 other flavors of JSF Ajax enabled components?

Also how do the Ajax features in Oracle ADF align with the upcoming Ajax features included in JSF 2.0?

Always good to hear from you and this is a good tutorial. 

To learn more about some of the other frameworks try this site:
http://www.jsfmatrix.net/

Peter Thomas replied on Fri, 2009/01/23 - 8:50am

I keep hearing about various products from Oracle branded "Fusion" and it is getting a little confusing.

Can you help me understand what exactly a "Fusion Web Application" means?  How does it relate to JSF?

Shay Shmeltzer replied on Fri, 2009/01/23 - 12:24pm in response to: Rick Hightower

Rick,

 If the last time you looked at ADF Faces was more than a year ago - you really need to take a new look at it - the type of UI it lets you build now is much richer then before with a lot more components , about 150 of them, and a lot more built in Ajax in the components themselfs, and also a collection of data visualization components (Graphs,gantt, Maps, Gauges etc).

 As far as why you would choose one set over the other I think you can look at some factors:

One of them would be the number and functionality of the components themselfs - unfortunattly mixing JSF components from different vendors in the same project can be challenging and the Ajax functionality just adds more complexity with a risk of different framework handling the Ajax interaction and client side life cycle in different ways - so a clear conclusion is to look for a framework that include as many components as possible - so the need to step out of it would be minimized if not eliminated. As far as I know ADF Faces with over a 150 components has the richest set out there.

Another aspect to evaluate is the functionality that the framework provides beyond components and that it let you add to your application. This would be things like drag and drop support, pop-up and dialog windows, menus, templating, skinning, accessibility, internalization etc.

Yet another criteria for choosing might be the actual underlying architecture used for achieving the Ajax behavior. Some components for example use client side manipulation, some use server side and some use a hybrid approach. These aspect can influence the end result in terms of performance.

I guess other factors can be IDE support and development experience, framework integration, price, support and training, community etc.

I hope this helps a bit to understand what to look for.

I would encourage you to start by just looking at the set of components offered and compare it to what you have today and see if you are missing anything or if you actually going to get a better UI with ADF Faces.

The two online demos are a good place to start:

http://jdevadf.oracle.com/adf-richclient-demo/faces/components/index.jspx

and

http://jdevadf.oracle.com/dvtdemo-dvt-faces-demo-context-root/faces/dvtFeatureDemo/index.jspx

Shay

 

Shay Shmeltzer replied on Fri, 2009/01/23 - 12:34pm in response to: Peter Thomas

Peter

Fusion is the "tag word" for Oracle similar to .NET for MS and WebSphere to IBM or WebLogic to ex BEA.

But at the end of the day Fusion means two major things:

Oracle Fusion Middleware - that's Oracle's application server with WebLogic as the core Java EE engine and SOA, Portal, BI, Security and other layers on top.

Oracle Fusion Applications - that's that next generation of Oracle's enterprise applications (HR, CRM, Financials etc). Those are applications that Oracle builds and sells to organizations - basically competing with SAP, SalesForce etc...

The interesting thing is that the Fusion Applications are built using JSF and the ADF Faces set of components to create the front end. This mean that Oracle has a lot riding on the functionality and success of the ADF Faces componetns - basically Oracle is eating its own dog food and actually uses its own technology to build their next generation of applications.

So to answer your question - a Fusion Web Application is an application that uses ADF Faces as the front end to the application and the rest of the ADF framework stack as the back-end.

You can see some screen shots from the upcoming Fusion applications that leverage ADF Faces here.

 Shay

 

Rick Hightower replied on Fri, 2009/01/23 - 1:52pm

Thank you for your comments Shay. Do you think with JSF 2.0 defining standards for Ajax interactions that it will be easier to combine components from multiple vendors? How well and how soon will Faces ADF align with JSF 2.0 (which of course is not even out yet)?

Hernando Barake replied on Sat, 2009/01/24 - 11:16am

Rick,

Aonther consideration is pricing.  See http://www.oracle.com/technology/products/jdev/htdocs/jdevpricefaq.html.

 Hernando

Surya De replied on Sat, 2009/01/24 - 1:27pm

Thanks Hernando for the link. I have been using Oracle's stack on and off...for example I have played with the 10g SOA suite and while it does have its really really impressive, it has its share of problems, I am looking forward to the 11g release. The 10g vs 11g JDeveloper, the changes are quite impressive.

 

However am I to understand that for production purposes, the JDeveloper stack is free and the only thing you will have to pay for is the Weblogic license?

 Thanks in advance for clarifying. :) 

 

Cheers!

Shay Shmeltzer replied on Sat, 2009/01/24 - 3:03pm

Just to answer some of the above questions:

 

JSF 2.0 - as you probably know Oracle is very active in this standard and we keep our finger on the pulse there. The spec is still not out and we are still working on seeing how this is going to effect the components we have and future development. I'm guessing this is something that every other JSF set of components out there is looking at.

 

License/Pricing - JDeveloper is free no matter what platform you deploy to. The ADF Faces components are part of the ADF framework which comes free with new WebLogic server licenses (or old Oracle Application Server licenses) - and has a license cost if you want to deploy it to other servers ($5k per CPU).

By the way if you are looking for a free set of JSF components with Ajax capabilities you might want to take a look at Apache Trinidad - on top of which ADF Faces is based. While ADF Faces add a lot more interactive behavior - the Trinidad component are still quite good. (And you can get the visual development experience for them for free in JDeveloper). 

Shay Shmeltzer replied on Mon, 2009/01/26 - 7:00pm

By the way, for those looking for a good tutorial that shows some of the key capabilities have a look at this one.

http://www.oracle.com/technology/obe/obe11jdev/11/rich_client/adfrichclient.htm

Scot Mcphee replied on Fri, 2009/02/13 - 8:53pm

The rich client framework looks very interesting, but can you show me how to develop clients with this technology using Maven or Ant to drive the build on a continuous integration server, and with Test-Driven principles in mind, and using the IDE of my choice?

I might want to deploy your rich client framework on an Oracle fusion middleware deployment environment, but using modern development methods like TDD, and not a crappy IDE that I don't know the keystrokes for, and which probably doesn't run on development operating system of choice, which is Mac OSX. Anyway, I don't want "wizards", I want code that's designed from the tests first. Also, in my development environment, on my workstation, I would like to use a lightweight server environment like Tomcat. Not something that eats half a gigabyte of memory just to start up - whatever the heavyweight production environment that is the eventual target.

Until you can decouple your server and presentation technologies from your IDE and the 20th century development thinking it embodies, I just won't be choosing it or recommending to my clients.

super pan replied on Tue, 2009/07/28 - 12:49am

Oracle's ADF is certainly a powerful tool. I support it. New Balance

serena lin replied on Sun, 2009/08/09 - 10:09pm

rather useful informations that i have to learned, thank you anyway, good job! by Nike air max 90 sneakers on unque styles released 2009, welcome Link Text

Michael Je replied on Fri, 2013/04/05 - 7:38am

  Anyway, I don't want "wizards", I want code that's designed from the tests first. Also, in my development environment, on my workstation, I

view source http://www.babul-ilm.com/ print? 1. 

would like to use a lightweight server environment like Tomcat. Not something that eats half a gigabyte of memory just to start up - whatever the heavyweight production environment that is the eventual target.

Sumit Narayan replied on Wed, 2013/04/17 - 7:23am

 Well I didnt have much knowledge about about AJAX and rich content related stuff in Java. You have enlighten me with this new concept and helped me to clear my concept

http://www.ifeel.edu.in

John Brown replied on Wed, 2013/07/24 - 1:28am

 I finding this framework for years, just try it today, it very wonderful.

Oud oil

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.