Developing with Oracle ADF

1-2 Java EE Developers Guide for Oracle Application Development Framework other activities, for instance method calls or other task flows. For more information about ADF Controller, see Part III Creating ADF Task Flows of the Oracle Fusion Middleware Fusion Developers Guide for Oracle Application Development Framework. Figure 1–1 Simple Oracle ADF Architecture

1.2 Developing with Oracle ADF

Oracle ADF emphasizes the use of the declarative programming paradigm throughout the development process to allow users to focus on the logic of application creation without having to get into implementation details. Using JDeveloper 11g with Oracle ADF, you benefit from a high-productivity environment that automatically manages your application’s declarative metadata for data access, validation, page control and navigation, user interface design, and data binding. Note: In addition to ADF Faces, Oracle ADF also supports using the Swing, JSP, and standard JSF view technologies. For more information about these technologies, refer to the JDeveloper online help. Oracle ADF also provides support for using Microsoft Excel as a view layer for your application. For more information, see the Oracle Fusion Middleware Desktop Integration Developers Guide for Oracle Application Development Framework Introduction to Building Java EE Web Applications with Oracle ADF 1-3 At a high level, the declarative development process for a Java EE web application usually involves the following: ■ Creating an application workspace: Using a wizard, JDeveloper automatically adds the libraries and configuration needed for the technologies you select, and structures your application into projects with packages and directories. For more information, see the Creating an Application Workspace section of the Oracle Fusion Middleware Fusion Developers Guide for Oracle Application Development Framework. ■ Modeling the database objects: You can create an offline replica of any database, and use JDeveloper editors and diagrammers to edit definitions and update schemas. For more information, see the Modeling with Database Object Definitions section of the Oracle Fusion Middleware Fusion Developers Guide for Oracle Application Development Framework. ■ Creating use cases: Using the UML modeler, you can create use cases for your application. For more information, see the Creating Use Cases section of the Oracle Fusion Middleware Fusion Developers Guide for Oracle Application Development Framework. ■ Designing application control and navigation: You use diagrammers to visually determine the flow of application control and navigation. JDeveloper creates the underlying XML for you. For more information, see the Designing Application Control and Navigation using ADF Task Flows section of the Oracle Fusion Middleware Fusion Developers Guide for Oracle Application Development Framework. ■ Identifying shared resources: You use a resource library that allows you to view and use imported libraries by simply dragging and dropping them into your application. For more information, see the Identifying Shared Resources section of the Oracle Fusion Middleware Fusion Developers Guide for Oracle Application Development Framework. ■ Creating the persistence model: From your database tables, you create EJB 3.0 entity beans using wizards or dialogs. From those beans, you create the session bean as the facade that will be used by the pages in your application. You can implement validation rules and other types of business logic using editors on the metadata files that describe the session bean and its underlying entity beans. For more information about using JDeveloper with EJBs, see the Developing EJB and JPA Components topic in the JDeveloper online help. Note: This guide covers developing an application with session and entity beans using EJB 3.0 annotations and JPA Java Persistence API for model persistence, along with the Oracle ADF Model layer, ADF Controller, and ADF Faces. This process is very similar to developing a Fusion web application. The main difference is that a Fusion web application uses ADF Business Components for the back-end services. When the development process and procedures are the same for both application types, this guide refers you to the Oracle Fusion Middleware Fusion Developers Guide for Oracle Application Development Framework for that information. Please disregard any information in the Fusion Developer’s guide regarding ADF Business Components such as entity objects and view objects. For similar information for EJBJPA, refer to the Developing EJB and JPA Components topic in the JDeveloper online help. 1-4 Java EE Developers Guide for Oracle Application Development Framework ■ Creating data controls for your services: Once you’ve created your entity and session beans, you create the data controls that use metadata interfaces to abstract the implementation of your EJBs, and describe their operations and data collections, including information about the properties, methods, and types involved. These data controls are displayed in the Data Controls Panel. For more information, see Chapter 2, Using ADF Model Data Binding in a Java EE Web Application. ■ Binding UI components to data using the ADF Model layer: When you drag an object from the Data Controls panel, JDeveloper automatically creates the bindings between the page and the data model. For more information, see Chapter 2, Using ADF Model Data Binding in a Java EE Web Application. ■ Implementing the user interface with JSF: JDeveloper’s Data Controls panel contains a representation of the beans for your application. Creating a user interface is as simple as dragging an object onto a page and selecting the UI component you want to display the underlying data. For UI components that are not databound, you use the Component Palette to drag and drop components. JDeveloper creates all the page code for you. For more information, see the Implementing the User Interface with JSF section in the Oracle Fusion Middleware Fusion Developers Guide for Oracle Application Development Framework. For information about creating specific types of web pages, see the following in this guide: – Chapter 3, Creating a Basic Databound Page – Chapter 4, Creating ADF Databound Tables – Chapter 5, Displaying Master-Detail Data – Chapter 6, Creating Databound Selection Lists – Chapter 7, Creating Databound Search Forms ■ Incorporating validation and error handling: Once your application is created, you use editors to add additional validation and to define error handling. For more information, see Section 2.3.5, What You May Need to Know About Configuring Validation. ■ Developing pages and applications to allow customization: Using the customization features provided by the Oracle Metadata Services MDS, you can create applications that customers can customize yet still easily accept upgrades, create pages that allow end users to change the application UI at runtime, and create applications that are completely customizable at runtime. For more information, see the Customizing Applications with MDS and Allowing User Customizations at Runtime chapters of the Oracle Fusion Middleware Fusion Developers Guide for Oracle Application Development Framework. ■ Securing the application: You use editors to create roles and populate these with test users. You then use a flat file editor to define security policies for these roles and assign them to specific resources in your application. For more information, see the Enabling ADF Security in a Fusion Web Application chapter in the Oracle Fusion Middleware Fusion Developers Guide for Oracle Application Development Framework. ■ Testing and debugging: JDeveloper includes an integrated application server that allows you to fully test your application without needing to package it up and deploy it. JDeveloper also includes the ADF Declarative Debugger, a tool that allows you to set breakpoints and examine the data. For more information, see the Introduction to Building Java EE Web Applications with Oracle ADF 1-5 Testing and Debugging ADF Components chapter of the Oracle Fusion Middleware Fusion Developers Guide for Oracle Application Development Framework. ■ Deploying the application: You use wizards and editors to create and edit deployment descriptors, JAR files, and application server connections. For more information, see Chapter 8, Deploying an ADF Java EE Application.

1.3 Introduction to the ADF Sample Application