Creating an Application Workspace
In this recipe, we will get to know a little bit about the JDeveloper IDE and how we can navigate around it; after this, we will start with the first steps of creating our ADF application by creating the ADF Application Workspace.
How to do it…
In order to create the ADF Application Workspace, perform the ensuing steps:
- Start JDeveloper; you will find different panes highlighted in the following screenshot:
One of the main panes is the Application navigator pane (the top-left pane), which displays the application files. If there are no applications (such as the case when you open JDeveloper for the first time), you end up with two links: one for creating a new application and another for opening a pre-existing application.
The center pane is the main pane, which will be the Start Page when you start JDeveloper.
The bottom-left pane is the Structure pane, that gives you the structure of the center pane. If a Java class is in the main pane, the structure pane will contain all members and methods of this class. You can maximize or close any pane in JDeveloper, and if you want to open it again, you can do so from the Window menu.
Create a new ADF application by clicking on the New Application... link from the Applications pane or navigating to File | New | Application.
- Choose ADF Fusion Web Application as your application type and click on OK.
Now the Create ADF Fusion Web Application dialog pops up.
- Choose a name for your application; I'll call it
HelloADFFaces
. - Choose an application package prefix for your application; for example, if your company is called ACME, and you are making this application commercial and the application name is HR, the prefix should be something like
com.acme.hr
. In this case, the application ischapter2.helloadf
and it'll be commercial. So, the prefix will becom
and the companyadffaces
; therefore, it'll becom.adffaces.chapter2.helloadf
, as shown in following screenshot: - Click on Finish to end the wizard.
How it works…
When you finish the wizard, you will end up with a page in the center pane called HelloADFFaces Overview, which has a checklist of what you should do (the plan of your application). The Applications pane now has two projects: one called Model
and the other ViewController
. These projects have been created for you by the wizard. The Model
project should hold your Business Service Layer and ViewController
will hold your pages and all of your controller's logic.
Tip
Notice that we clicked on Finish instead of Next, which is why you didn't witness the creation of the Model
and ViewController
projects. In the wizard, you can change their names and technology scopes. There is also another step at the end of the wizard in which you can specify your build tool, either the default JDeveloper build tools, Maven, or Ant.
The checklist is very helpful for planning your ADF application, especially if you are starting with ADF development; you should also check the plan to find good resources and references to start your ADF application.
We will put the ADF project together by embracing the JDeveloper ADF plan and following the checklist of steps to be done.
See also
For more information about the JDeveloper user experience, check the following excellent video: http://download.oracle.com/otn_hosted_doc/jdeveloper/12cdemos/JDevOverview12c/JDevOverview12c.html.