# Getting Started with Oracle ADF

The Oracle Application Development Framework (Oracle ADF) is an end-to-end application framework that builds on Java Platform, Enterprise Edition (Java EE) standards and open-source technologies. You can use Oracle ADF to implement enterprise solutions that search, display, create, modify, and validate data using web, wireless, desktop, or web services interfaces. Because of its declarative nature, Oracle ADF simplifies and accelerates development by allowing users to focus on the logic of application creation rather than coding details.

Oracle JDeveloper IDE Component | Corresponding OEPE IDE Component
--- | ---
Applications Window | Project Explorer
Structures Window | Outline
Components Window | Palette
Data Controls Panel | Data Palette
Properties Window | Properties
Databases Window | Data Source Explorer
Log Window | Console
Application Servers Window | Servers

## Understanding the Oracle ADF Architecture

In line with community best practices, applications you build using the ADF web technology stack achieve a clean separation of business logic, page navigation, and user interface by adhering to a model-view-controller architecture.

For more information about the Oracle ADF Architecture, see the Oracle ADF Architecture section in "Introduction to Building Fusion Web Applications with Oracle ADF" in Developing Fusion Web Applications with Oracle Application Development Framework.

## Configuring Oracle WebLogic Server

Before starting to create your pages, you need to create a server configuration for Oracle WebLogic Server (WLS). It will be the link to the WLS instance that will be used to run the project.

Note: To use GlassFish ADF enabled runtime with you JAVA or ADF application see Configuring and Using ADF with GlassFish Server.

The WebLogic server should be running. You can use an existing domain or create a new domain.

To configure WLS using an existing domain:

1. From the main menu, select Window > Show View > Other.

2. In the Show View dialog, select Server > Servers to open the Servers pane.

3. In the Servers pane, right-click and select New > Server.

   Alternatively if there are no servers defined, click the `No servers are available. Click this link to create new server.` link.

4. On the Define a New Server page of the New Server wizard, expand Oracle and select the type of Oracle WebLogic server you are running, for example, Oracle WebLogic Server 12c (12.1.3). Enter the server's hostname, for example `localhost` and click Next.

5. On the server details page of the Define a New Server wizard, click Browse next to WebLogic Home. In the Browse for Folder dialog navigate to the WebLogic home directory and click OK.

   Alternatively, if you have already defined domains for the IDE they are listed when you choose Browse > Known Domains.

   Click Next.

6. On the Add and Remove page, in Available select your application and click Add to shuttle the selection to the Configured. This associates your application with the newly created domain.

   Click Finish.

   The new server connection appears in the Servers pane. Note that the server is a in stopped state.

To configure WLS and create a new domain:

1. From the main menu, select Window > Show View > Other.

2. In the Show View dialog, select Server > Servers to open the Servers pane.

3. In the Servers pane, right-click and select New > Server.

   Alternatively if there are no servers defined, click the `No servers are available. Click this link to create new server.` link.

4. In the New Server wizard on the Define a New Server page, select the server type. Select Oracle and then select the type of Oracle WebLogic server you are running, for example, Oracle WebLogic Server 12c (12.1.3). Click Next.

5. To create a new domain, in the server details page of the Define a New Server wizard, click Create then Create Domain. In the New WebLogic Domain dialog:

   - Enter a name for the domain.

   - Optionally specify a password that will override the default password `welcome1`.

   - Check that the extensions you want are selected.

   The IDE validates the domain path you choose and automatically enters the Java home path in Java home. It also lists the relevant extensions on the server.

   Click Next.

6. In the New WebLogic Domain dialog, specify a name and a location for the domain. Optionally, you can specify a new password (the default is `welcome1`). Under Extensions, select Oracle JRF - 12.1.2.0.

   Click Finish.

7. On the New Server wizard, Domain directory is now populated. Click Next.

8. On the Add and Remove page, in the Available list, select your application. Then click Add to shuttle the selection to the Configured pane. This associates your application with the newly created domain.

   Click Finish.

   The new server connection appears in the Servers pane. Note that the server is a in stopped state.

To configure WLS using the WebLogic Server configuration wizard:

1. From the main menu, select Window > Show View > Other.

2. In the Show View dialog, select Server > Servers to open the Servers pane.

3. In the Servers pane, right-click and select New > Server.

   Alternatively if there are no servers defined, click the `No servers are available. Click this link to create new server.` link.

4. In the New Server wizard on the Define a New Server page, select the server type. Select Oracle and then select the type of Oracle WebLogic server you are running, for example, Oracle WebLogic Server 12c (12.1.3). Click Next.

5. To create a new domain or update an existing domain using the WebLogic Server configuration wizard, click Create then LaunchDomain Configuration Wizard.

   The Oracle Fusion Middleware Configuration Wizard opens where you can create a new domain or update an existing domain.

   Once you have specified the domain in the configuration wizard, click Browse next to WebLogic Home. In the Browse for Folder dialog navigate to the WebLogic home directory and click OK.

6. On the New Server wizard, Domain directory is now populated. Click Next.

7. On the Add and Remove page, in the Available list, select your application. Then click Add to shuttle the selection to the Configured pane. This associates your application with the newly created domain.

   Click Finish.

   The new server connection appears in the Servers pane. Note that the server is a in stopped state.

## Creating an Oracle ADF Application

OEPE supports the creation of the following ADF application artifacts:

- JPA Entity

- EJB Session Bean as service

- JSF Managed Bean for binding

- ADF Data Controls for binding data to the View and Controller

- ADF Task Flow as Controller

- ADF Components as View

To create an ADF application:

1. From the main menu, select File > New > ADF Application.

2. In the New Oracle ADF Application dialog, enter the following:

   - Application name

   - Application project location The default is `user_home``/workspace`.

   - Dynamic web project name. The default is `Web`. This name is appended to the application name.

3. Click New Runtime to set the WebLogic Runtime environment. The New Server Runtime Environment wizard opens.

4. In the New Server Runtime Environment wizard, Select Oracle and then select the type of Oracle WebLogic server you are running, for example, Oracle WebLogic Server 12c (12.1.3) and click Next.

5. On the server details page, click Browse next to WebLogic home and browse to the location of your WebLogic server installation. Click OK.

6. In the New Oracle ADF Application dialog, select a JPA project in the JPA Project field. To optionally create a new JPA project, click New JPA Project.

7. In the New JPA Project wizard, enter the following details then click Next:

   - Project name

   - Project location (`user_home``/workspace` by default)

   - Target runtime

   - JPA version (If you have installed JPA 2.0, the version defaults to `2.0`)

   - Configuration

   - EAR Membership. Select an EAR file to add the project to. Note that the JPA project will be added to the application's EAR file by default.

   - Working sets. For more information, see the help topic "Working Sets" in the Workbench User Guide > Concepts > Workbench.

8. On the Java page, specify the source folders on build path and the default output folder, and click Next.

9. On the JPA Facet page, specify the Platform, JPA Implementation, and database connection settings, and click Finish.

10. In the New Oracle ADF Application dialog, you will see that your JPA project is listed in the JPA Project field. Click Add project to working sets if you would like to include the current project in a working set. Select an existing working set from the Working sets menu or create a new one.

11. Click Finish.

    Two projects are created in the Project Explorer - an EAR project and a dynamic web project. If you created a JPA project, that is also added to the Project Explorer.