This blog is continued on http://www.radio21g.com/faces
Alright, Let the game begin.
In this lesson, you will see how to create a JSF Hello World Login page using JDeveloper and ADF Faces.
1) Open you JDeveloper and Create a new Application as below.
2) In the “Create Application Dialog”, set the application’s properties as the following
The created new “HelloWorld” application will look like this. It has two Projects: “Model” and “ViewController”, which are automatically created for you by JDev when you choose the Web Application template in last step.
4) Then we will create a JSF page on the new “ViewController” project.
Choose the JSF JSP for the file type.
Give the page a new and choose the .jspx file type instead of the .jsp type. (.jspx is a xml like JSP file type, which is for JSP 2.0 standard)
Choose “Do Not Automatically Expose UI Component In a Managed Bean”, we will come to that later.
You need to select the JSP Tag Libraries you will use in your page, so its defination will be added to the JSP page header for you.
Give it a title.
You now finished creating your first JSF page. You can see it in the Application Navigator under the “Web Content” folder.
To create J2EE application using Oracle ADF Faces, you need an IDE called Oracle JDeveloper and nothing else.
Oracle JDeveloper(JDev) is an IDE just like the famous JBuilder (actually it was originated from JBuilde’s early version). But the difference is that JDeveloper is free. You can download the JDev’s latest version from Oracle’s OTN website.
There are 3 flavors you can choose to download: Studio Edition, J2EE Edition, Java Edition. Please choose the J2EE Edition. It includes the ADF libraries and does not overloaded with other Oracle proprietary toolset in the Studio Edition.
After downloaded the zip file, to install, you need to first unzip the file to a directory you like. Then, …… it’s done.
You will see a file called “jdeveloper.exe” in the unzipped directory, you just doubleclick on that file to launch the JDev for the first time.
Now, you are all set and we soon move into the real game play in the next session.
1. What is Oracle ADF Faces? What do I use it for?
Oracle ADF Faces is an implementation of standard JavaServer Face (JSF) specification. JSF is a framework designed by SUN for creating a Visual Basic or Borland Delphi like rapid web application development tool.
Generally, you use ADF Faces to rapidly and easily (hopeful) create a J2EE based web application.
2. Why must I use JSF?
You don’t. There are tons of J2EE framework, like Struts, WebWorks, Tapstry, Spring, etc, all of these are to help you build a web application. JSF or ADF Faces is just one of them.
There are two general differences (or advantages) between JSF/ADF Faces and other frameworks.
- JSF is a J2EE standard, which means it have more support from major software vendors like SUN, Oracle, BEA…. In this case it may have potentials to live longer than other frameworks.
- JSF is trying to bring the web application development experience back to the good old days we enjoyed during the C/S era when we had the Visua Basic, Borland Delphi and PowerBuilder. I believe this is a right path at least for now.
3. Why must I use Oracle ADF Faces? What does a Database company have to do with JSF?
ADF Faces is Oracle’s implementation of JSF standard. There are other implementations out there, like MyFaces, ICEFaces and Sun’s reference implementation. ADF Faces is among the best JSF implemenations so far, it owns more 100+ JSF UI/non-UI components which programers can use to create their web app.
Actually Oracle is using the ADF Faces to build their next generation of ERP/CRM systems called Fusion Applications. So ADF Faces is more widely used than many other JSF components.
4. How do I learn ADF Faces? Do I need to know JSF first? Is it hard?
Basically, I suggest you learn the JSF before learn the ADF Faces. There are many JSF tutorials you can find using google. jsftutorials.net is good place to start with. There are also some good books about JSF, JavaServer Faces: The Complete Reference is a good one. Generally, JSF is a little complicated than Struts.
If you know JSF already, ADF Faces will be just a walk by the lake for you.
However, in articles on this site I’ll assume you have no experience with JSF.
This is the #1 post of this blog. I’m gonna spend a little time explaining what you will see in this blog in the future.
1. What is this site all about?
Generally, this purpose of this site is to teach people how to use Oracle ADF Faces framework to create J2EE application.
2. Why Oracle ADF Faces?
First of all, it’s a Oracle product and I’m working for Oracle. ‘
Secondly, I do believe a JSF implementation like ADF Faces together with Oracle JDeveloper will move J2EE web app developers a step closer to the Rapid Application Developer (RAD) goal. It will definitly boost the productivity if you know it well.
3. Why without Databinding?
If you know Oracle’s ADF product, you will understand that besides ADF Faces, there is another major ingredient in the ADF framework – the ADF Data Binding mechanism. The existance of ADF Data Binding is to enable utimate drag&drop style development when building a data driven application. It will release you from the burden of manually plumbing the UI component with the underlying business service layer and handles the UI events for you automatically.
But the ADF Data Binding is a sword with two sides. It does save you time from writing some event-handling code. On the other hand, it is not like a breeze to learn how to use Data Biniding. What makes the situation more complicated is that the ADF Faces (or the JSF) is also not as easy as some of the old popular frameworks like Struts. You can imagine, what happens when you have to mix the two at the same time, not to mention you have to know the ADF Business Component or EJB which serves as the Business Service Layer as required by the Data Binding.
So this site is determined to devote to the pure ADF Faces (JSF) way of programming.