The Oracle Application Development Framework (Oracle ADF) is an end-to-end application framework that builds on J2EE standards and open-source technologies to simplify and accelerate the implementation of service-oriented applications. If you develop enterprise solutions that search, display, create, modify, and validate data using web, wireless, desktop, or web services interfaces, Oracle ADF can simplify your job. Used in tandem, Oracle JDeveloper 10g, and Oracle ADF give you an environment that covers the full development lifecycle from design to deployment, with drag-and-drop data binding, visual UI design, and team development features built-in.
All of these features can be summarized by saying that using ADF Business Components for your J2EE business service layer makes your life a lot easier. The key ADF Business Components that cooperate to provide the business service implementation are:
■Entity Object: An entity object represents a row in a database table and simplifies modifying its data by handling all DML operations for you. It can encapsulate business logic for the row to ensure your business rules are consistently enforced. You associate an entity object with others to reflect relationships in the underlying database schema to create a layer of business domain objects to reuse in multiple applications.
■Application Module: An application module is a transactional component that UI clients use to work with application data. It defines an updatable data model and top-level procedures and functions (called service methods) related to a logical unit of work related to an end-user task.
■View Object: A view object represents a SQL query and simplifies working with its results. You use the full power of the familiar SQL language to join, project, filter, sort, and aggregate data into exactly the “shape” required by the end-user task at hand. This includes the ability to link a view object with others to create master/detail hierarchies of any complexity. When end users modify data in the user interface, your view objects collaborate with entity objects to consistently validate and save the changes.
Oracle ADF has the following components
ADF Business Components: VO, EO & AM
ADF Model : DataBinding (.cpx, .xml) & DataControls(.dcx)
ADF View: JSP, JSF, ADF Faces etc.
ADF Controller: Task flows (adf-config.xml), faces-config.xml
Oracle ADF is an Oracle product. Ide used to develop ADF application which is Oracle JDeveloper. This IDE has all components that support rapid development starting from designing Applications using the UML to Java, Visual Designer, DataBase development, Testing Webservices to Deployment. Most of the features are just drag and drop. Hence this IDE becomes the perfect choice for ADF development. Although it’s a bit slow and hangs sometimes still we don’t have any other option.
Controllers in the ADF framework are TaskFlows, Faces-config.xml, adfc-config.xml. In all these files you can define navigation between the pages.
Association represents the relationship between 2 and more tables like a foreign key relationship. If you create Entities from a database association will automatically get created for the entity. Users can also define custom association if there is no foreign-key is defined in the database. In this way, users can handle foreign keys in ADF applications and can remove overhead from the database.
EnitityObject in ADF is similar to Table in database. Any number of ViewObejct can create on a single Entity.
ViewObject represents the data collection. These view objects can be created in different ways which are as follows:
Entity Based ViewObject: These view objects will hold the reference of an underlying entity. These view objects can hold data from single or multiple entities. While defining Viewobject based on Entity you can select the attribute which you want to keep in the entity.
SQL Based ViewObject: These ViewObejct are based on SQL quarries. These view objects will have underlying SQL Query. At runtime, they will hold data return by SQL.
Programmatic View Object: The user can define the view attribute which defines the view object. Data will insert programmatically into these ViewObject.
Static ViewObject: While defining user will define an attribute for view and later he has to provide the values for those attributes. This kind of view object will have a fixed no of rows.
Control hints are associated with the current view or entity attribute. All view objects inherit the hint values at run time.
Control hints for data controls and bindings, including Labels, Date & currency formatting.
No, Directly it’s not possible to create EO using multiple tables.
Entity objects will always have a one-to-one relationship with a database object or web service.
But using views you can create Entity Objects on multiple tables.
The six phases of the JSF application lifecycle are as follows (note the event processing at each phase):
1. Restore view
2. Apply request values; process events
3. Process validations; process events
4. Update model values; process events
5. Invoke application; process events
6. Render response
Top Link is an Object-Relational Mapping layer that provides a map between the Java objects that
the model uses and the database that is the source of their data.
By default, a session is created named default. In the following steps, you create a new session.
|king Beans||Managed Beans|
|A backing bean is any bean that is referenced by a form.||A managed bean is a backing bean that has been registered with JSF (in faces-config.xml) and it is automatically created (and optionally initialized) by JSF when it is needed.|
|The advantage of managed beans is that the JSF framework will automatically create these beans, optionally initialize them with parameters you specify in faces-config.xml,|
|Backing Beans should be defined only in the request scope||The managed beans that are created by JSF can be stored within the request, session, or application scopes|
Service Methods can return Scalar or Primitive Datatypes.
If the application contains run-time customizations using MDS, it must be bundled as an EAR. For a simple WebCenter portal application with no such customizations, WAR can be created.
Oracle Application Development Framework (Oracle ADF) provides several types of binding objects to support the attributes and operations exposed by the Oracle ADF data controls for a particular business object:
ITERATOR BINDING, one per accessor attribute that your page or panel displays. Iterates over the business objects of the data collection and maintains the row currency and state.
VALUE BINDINGS, one for each data-bound UI component. Provides access to data.
ACTION BINDING, specifically defined for a button component. Provides access to operations defined by the business object.
Value Binding Types:
1. Attribute-Value Binding
2. Boolean Value Binding
3. List Value Binding
4. Range Value Binding
5. Scroll Value Binding
ADF task flows provide a modular approach for defining control flow in an application. Instead of representing an application as a single large JSF page flow, you can break it up into a collection of reusable task flows. Each task flow contains a portion of the application’s navigational graph. The nodes in the task flows are activities. An activity node represents a simple logical operation such as displaying a page, executing application logic, or calling another task flow. The transactions between the activities are called control flow cases.
ADF task flows offer significant advantages over standard JSF page flows
-The application can be broken up into a series of modular flows that call one another.
-You can add to the task flow diagram nodes such as views, method calls, and calls to other task flows.
-Navigation is between pages as well as other activities, including routers.
-ADF task flows are reusable within the same or an entirely different application. After you break up your application into task flows, you may decide to reuse the task
-Shared memory scope (for example, page flow scope) enables data to be passed between activities within the task flow. Page flow scope defines a unique storage area for each instance of an ADF-bounded task flow.
Data Control Palette hierarchy: The Data Control Palette displays two types of actions:
Actions that typically operate on all data collections in the current web page’s binding context (such as Commit and Rollback) in the Operations folder at the root level of the hierarchy.
Operations on a specific data collection (for example, MyView1). Data collection-specific operations (such as Create and Delete) appear in the Operations folder as child nodes of the collection in the Data Control Palette.
It’s an operation by which an entity instance at one end of an association can access the related entity object instance at the other end of the association. An Accessor that travels from destination to source is called a source assessor and an accessor that travels from source to destination is called a destination accessor.
It is described in the entity object definition XML files which can be used by view object and view link definition to specify cross entity relationship. Its return type will be the entity object class of associated entity object definition or ‘EntityImpl’ if the associated entity object definition has no entity object class.
JSF supports three Bean Scopes.
Request Scope: The request scope is short-lived. It starts when an HTTP request is submitted and ends when the response is sent back to the client.
Session Scope: The session scope persists from the time that a session is established until session termination.
Application Scope: The application scope persists for the entire duration of the web application. This scope is shared among all the requests and sessions.