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


2 comments: