Vous êtes sur la page 1sur 25

Oracle ADF Overview

Prepared By Karsten Schulz Terp-Nielsen @Oracle Denmark Presented By Bahaa Farouk @hp Egypt

Oracle ADF

Motivation Challenges building J2EE apps


Building J2EE applications can be complex. Development time can be extensive. Choosing and implementing appropriate design patterns can be overwhelming. Do it yourself applications often repeat existing application code. A large portion of do it yourself code is dedicated to common tasks. The more code you write, the greater the chance of errors. An application framework is needed.

Oracle ADF
Introduction
Reduces the complexity of J2EE development by providing visual and declarative development Increases development productivity

Less coding, more reuse Focus on the application, not the plumbing

Provides a flexible and extensible environment by allowing multiple technology choices and development styles Encourages J2EE best practices by implementing standard J2EE design patterns

Oracle ADF

End-to-end J2EE Framework


Implements standard J2EE best practices Model-View-Controller (MVC) design pattern
Rich Clients Web and Wireless Clients Controller Model Business Services

Focus on the application, not the plumbing Consolidation and evolution of previous frameworks

Oracle ADF

Visual and Declarative Development


End-to-end Application Development

J2EE & Services WYSIWYG editors UML modelers Structure pane Structure pane Property inspector No separate generation step - always synchronized Underlying code always accessible

Visual

Declarative

Code View/Design View Synchronization


Oracle ADF

J2EE Architecture (Simplified)


Enterprise JavaBeans ADF Business Components Web Services Java Objects

Clients

Business Services

Database

Oracle ADF

No Standard API for Client Binding


Enterprise JavaBeans ADF Business Components Web Services Java Objects

JDBC

Clients

Business Services

Database

Oracle ADF
ADF Model Data Controls Data Binding JSR-227: A Standard Data Binding & Data Business Access Facility for J2EE Component
Web Service TopLink

Model

EJB Java Class

Oracle ADF

ADF Model Architecture Data control: describes the values and actions defined by the business service Bindings: define how UI Client components use the values and actions in Bindings the data model Data Control Business Service

Oracle ADF

ADF Model Architecture Decouples client and business service layers Client code contains no references to the business service

Better design practice Code is more maintainable

Architecture can be extended to add more types of business services

ADF Business Components


Simplifies and optimizes O/R mapping Simplifies and optimizes binding of View to logic

Deployed either as a Local Model or as a remote Session Facade Flexible Deployment

ADF BC High-level architecture


HTML, Java, and XML Interfaces Task-Based App Service Data Presentation & Manipulation Business Logic

L XM

Application

View

Entity

Payment Plan Mgmt

SlowPaying Customers

Customer Bill

Late Payments

Payment

ADF BC Application
View Objects Entity Objects

Top Customers Pending Orders

Customer
Customer

Order

Ord

Database

Application Module

Start with database tables

Entity objects encapsulate business rules, logic, defaults in a consistent way for a table

View objects encapsulate SQL queries to project, join, filter, order data for external client interaction

Application module defines data model of view object usages for a complete application use case

UI works with the application module as backend business service

As you build new applications, underlying components are reusable

ADF Productivity With Choice


Rich Client
Swing / JClient JSP

Web / Wireless
ADF UIX JSF/ADF FACES

View Controller Model Business Services

Struts/JSF

ADF Bindings ADF Metadata Services ADF Data Control

Java Classes

EJB Session Beans

ADF Business Components Service Object

Web Services

JDBC

TopLink Queries

EJB Finders

ADF Business Components Query Object

Data Access

Java Classes

EJB Entity Beans

TopLink Mapping

ADF Business Components Entity Object

Persistent Business Objects

ADF Faces
Built on top of JSF APIs A large component set >100 different components Far more advanced and interesting components

Partial-page rendering, etc.

ADF model support out-of-the-box ADF Faces skins (Look and Feel)

ADF Databinding (JSR 227) Open Source per January 2006

http://www.oracle.com/technology/products/jdev/htd ocs/faq_adffaces_apache.html

ADF Faces

ADF Faces
ADF Faces also includes many of the framework features most needed by JSF developers today:

File upload support is integrated at a component level Client-side validation is automatically derived from Validators and Converters for an improved user experience A pageFlow scope makes it easier to pass values from one page to another A new hybrid state saving strategy gives developers the best of both client and server-side state saving

JSF Architecture with ADF


EL accesses bindings object to value bind UI components ADF bindings object is set through ADF Filter in web.xml Bindings object accesses ADF Binding container, which then accesses DataControl Business Services provide access to various data sources

Renderer

UI Component

Expr. Language

JSF Page

ADF bindings Object

ADF Binding ADF DataControl

Business Service 1

Business Service 2

Business Service 3

RDBMS

XML

URL

WS

Demonstration

Develop a more complex Web Application based on ADF Faces


1. 2. 3. 4.

Create ADF Business Components model Layout flow Make Edit page Optional: Make Create page

Vous aimerez peut-être aussi