Top Banner
Oracle ADF Overview Prepared By Karsten Schulz Terp-Nielsen @Oracle Denmark Presented By Bahaa Farouk @hp Egypt
25
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: adfoverview

Oracle ADF Overview

Prepared By

Karsten Schulz Terp-Nielsen @Oracle Denmark

Presented By

Bahaa Farouk @hp Egypt

Page 2: adfoverview

Oracle ADFMotivation – 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.

Page 3: adfoverview

Oracle ADFIntroduction

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

Page 4: adfoverview

Oracle ADFEnd-to-end J2EE Framework

Implements standard J2EE best practices Model-View-Controller (MVC) design pattern

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

Business ServicesBusiness Services

Web and Wireless ClientsWeb and Wireless ClientsRich ClientsRich Clients

ModelModel

ControllerController

Page 5: adfoverview

Oracle ADFVisual and Declarative Development

End-to-end Application Development– J2EE & Services

Visual– WYSIWYG editors– UML modelers – Structure pane

Declarative– Structure pane – Property inspector

Code View/Design View Synchronization– No separate generation step - always synchronized– Underlying code always accessible

Page 6: adfoverview

Oracle ADFJ2EE Architecture (Simplified)

EnterpriseJavaBeans

ADF Business Components

Web Services

Business ServicesClients

Java Objects

Database

Page 7: adfoverview

Oracle ADFNo Standard API for Client Binding

EnterpriseJavaBeans

ADF Business Components

Web Services

Business ServicesClients

Java Objects

Database

JDBC?

Page 8: adfoverview

Oracle ADFADF Model

Data Controls Data Binding JSR-227: “A Standard Data Binding & Data

Access Facility for J2EE”Web

Service

TopLink

EJB

JavaClass

BusinessComponent

ModelModel

Page 9: adfoverview

Oracle ADFADF Model Architecture

Data control: describes the values and actions defined by the business service

ClientClient

BindingsBindings

Data ControlData Control

Business ServiceBusiness Service

Bindings: define how UI components use the values and actions in the data model

Page 10: adfoverview

Oracle ADFADF 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

Page 11: adfoverview

ADF Business Components

Simplifies and optimizes binding of View to logic

Simplifies and optimizes O/R mapping

Flexible Deployment

Deployed either as a Local Model or as a remoteSession Facade

Page 12: adfoverview

ADF BC High-level architecture

PaymentPaymentPlan MgmtPlan Mgmt

HTML, Java, and XML Interfaces

SlowPayingSlowPayingCustomersCustomers

LateLatePaymentsPayments

CustomerCustomer

BillBill

PaymentPayment

ViewView EntityEntityApplicationApplication

BusinessLogic

Data Presentation& Manipulation

Task-BasedApp Service

XMLXML

Page 13: adfoverview

ADF BC Application

Database

Ord

Customer

Entity Objects

Customer

Order

TopCustomers

PendingOrders

View Objects

Application Module

Page 14: adfoverview

Start with database tables

Page 15: adfoverview

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

Page 16: adfoverview

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

Page 17: adfoverview

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

Page 18: adfoverview

UI works with the application module as backend business service

Page 19: adfoverview

As you build new applications, underlying components are reusable

Page 20: adfoverview

ADF – Productivity With ChoiceADF UIX

ADF Bindings

ADF Data Control

ADF Business Components

Service Object

ADF Business ComponentsQuery Object

ADF Business ComponentsEntity Object

Swing / JClientA

DF

Me

tad

ata

Se

rvic

es

View

Controller

Model

BusinessServices

Swing / JClient JSP ADF UIXJSF/ADF FACES

Rich Client Web / Wireless

Struts/JSF

ADF Bindings

ADF Data Control

JavaClasses

EJBSessionBeans

WebServices

JDBCEJB

FindersTopLinkQueries

DataAccess

Java Classes EJB Entity Beans

TopLink Mapping

PersistentBusinessObjects

AD

F M

eta

da

ta S

erv

ice

s

Page 21: adfoverview

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/htdocs/faq_adffaces_apache.html

Page 22: adfoverview

ADF Faces

Page 23: adfoverview

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

Page 24: adfoverview

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

ADF “bindings” Object

ADF Binding

Renderer

UI Component Expr. Language

JSF Page

RDBMS

ADF DataControl

BusinessService 1

BusinessService 2

BusinessService 3

XMLURL

WS

Page 25: adfoverview

Demonstration

Develop a more complex Web Application based on ADF Faces 1. Create ADF Business Components model

2. Layout flow

3. Make Edit page

4. Optional: Make Create page