Tuesday, February 28, 2012

Getting started with ADF Web Application

Creating ADF web application is very easy as like as ice on cake . . All you need to initiate the first step by installing Jdeveloper which is available from Jdeveloper Download . Choose the right installation which suits your environment . Many of the Jdeveloper installations that comes along with many master pieces like SOA,Web center . . All we need to focus on learning ADF, remaining does not really matter even though we have installed . Built in web-logic server comes along with the j developer installation that helps to run our pages in later part.

once the required set up is created ( installing jdeveloper in the machine ) follow these steps:

1) Open Jdeveloper >  select 'Default Role' in 'Select Role' dialog. Jdevloper opens up with the default layout .

Here we go to create basic ADF sample application that contains ADF Model and UI (view controller) project.It is good to know what these projects contains and how it helps in the development mode before we kick off the lesson .

Model project contains Entity objects and View Objects and Application module that forms the core components to create ADF pages . In more simple words Entity object that represents a table in a Database. View objects are created out of entity objects that helps to do CRUD operation in DB i.e create a row ,update a row .  Every database operation must be done through VO's .

Step 1:

Click on New Application  in the Application Navigator

















Step 2:

In the Create Fusion Web Application (ADF) dialog box Enter your Applications Name. Here in jdeveloper an application may consists of many projects .For Demo purposes we will have a unique application name as AdfDemoApps and clickNext choosing Fusion Web Application in the application template . NOTE : Make sure the primary directory path is same for all the steps

















Step 3 :

Enter the model project name 'AdfDemoModel'. NOTE : By default the technologies required to create model project will be displayed in the Selected box under Project Technologies. If you want any other technologies you can choose from the available list and shuttle it.

















Step 4:

















Step 5 :

Enter the Project Name for UI. The project we created at step 3 is to hold model components and this is to hold the UI related pages i.e jsp pages. AdfDemoUi the project name.NOTE : By default the technologies required to create UI pages will be displayed in the Selected box under Project Technologies. If you want any other technologies you can choose from the available list and shuttle it.

















Step 6 :















Click Finish



Step 7 :

Two Projects are created under AdfDempApps application and can be seen in the below screen shot



















Now we are three steps short to make our complete set up ready . Guess what we missed , Yes Database configuration.

Step 8 :

Click on Application Resources if it is not in expanded mode.
Right Click on Connections > New Connections > Database

















Step 9 :

Create database connection dialog opens up ,fill in the details and click ok. I use HR database schema

















Step 10.

Database View through connections options we just created and of course the final look


Tuesday, February 7, 2012


Oracle  ADF Architecture

Oracle ADF provides commercial java framework for building enterprise applications . It provides visual and declarative approaches to Java EE Development , It is strongly based on ready to use design strategy and visual rich tools.in simple words we can say, drag and drop the components on to the page and the rest will be taken care by ADF .


Oracle ADF Architecture that follows MVC architecture.

Model Layer - Represents data values
View Layer - This layer contains the UI pages
Controller Layer - It process and determines the navigation,user input processing etc
Business Service Layer - encapsulation of business logic


Advantages of ADF :

1 . Oracle ADF has the flexibility that encourages and supports various technology to use when implementing each of the above said layers.

2. Oracle ADF is flexible.

3. EJB,Toplink,Web-services and many more can be used as ADF model layer.

4. JSP,ADF Faces, Swings and many more can all be used as ADF view Layer.

5. It provides extra-ordinary services like transaction management, ORM ( Object relational mapping ), resource pooling within ADF.

6. Great power of SQL within java objects that connects to any DB.

7. ADF offers AJAX enabled rich UI Components to build web applications

8. we can choose our own style of development when working with ADF either the declarative approach or by editing source code.

9. Performance is assured.

10 .  The look and feel is very rich that primarily distinguish it from legacy applications that used various web technologies .