Upload
er-sndp-srda
View
127
Download
4
Embed Size (px)
Citation preview
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.
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 choices and development styles
Encourages J2EE best practices by implementing standard J2EE design patterns
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 Services
Web and Wireless ClientsRich Clients
Model
Controller
Oracle ADFVisual and Declarative Development
End-to-end Application Development– J2EE & Services
Visual– UML modelers
– Structure pane
Declarative– Structure pane
– Property inspector
Code View/Design View Synchronization– No separate generation step - always synchronized
– Underlying code always accessible
Oracle ADFJ2EE Architecture (Simplified)
Enterprise
JavaBeans
ADF Business
Components
Web Services
Business ServicesClients
Java Objects
Database
Oracle ADFNo Standard API for Client Binding
Enterprise
JavaBeans
ADF Business
Components
Web Services
Business ServicesClients
Java Objects
Database
JDBC?
Oracle ADFADF Model
Data Controls
Data Binding
JSR-227: “A Standard Data Binding & Data
Access Facility for J2EE”
Web Service
TopLink
EJB
JavaClass
BusinessComponent
Model
Oracle ADFADF Model Architecture
Data control: describes the values and actions
defined by the business service
Client
Bindings
Data Control
Business Service
Bindings: define how UI
components use the
values and actions in
the data model
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
ADF BC High-level architecture
PaymentPlan Mgmt
HTML, Java, and XML Interfaces
SlowPayingCustomers
LatePayments
Customer
Bill
Payment
View EntityApplication
BusinessLogic
Data Presentation& Manipulation
Task-BasedApp Service
ADF BC Application
Database
Ord
Customer
Entity Objects
Customer
Order
TopCustomers
PendingOrders
View Objects
Application Module
View objects encapsulate SQL queries to project, join, filter, order data for external client interaction
ADF – Productivity With Choice
ADF UIX
ADF Bindings
ADF Data Control
ADF Business
Components
Service Object
ADF Business
Components
Query Object
ADF Business
Components
Entity Object
Swing / JClientA
DF
Me
tad
ata
Se
rvic
es
View
Controller
Model
Business
Services
Swing / JClient JSP ADF UIXJSF/ADF
FACES
Rich Client Web / Wireless
Struts/JSF
ADF Bindings
ADF Data Control
Java
Classes
EJB
Session
Beans
Web
Services
ADF Business
Components
Service Object
JDBCEJB
FindersTopLink
Queries
ADF Business
Components
Query Object
Data
Access
ADF Business
Components
Entity Object
Java Classes EJB Entity Beans
TopLink Mapping
Persistent
Business
Objects
AD
F M
eta
da
ta S
erv
ice
s
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 Faces skins (Look and Feel)
ADF Data binding
Open Source
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
ADF “bindings” Object
ADF Binding
Renderer
UI Component Expr. Language
JSF Page
RDBMS
ADF DataControl
Business
Service 1
Business
Service 2
Business
Service 3
XMLURL
WS
Demonstration
A Web Application based on ADF Faces
1. Created ADF Business Components model
2. Layout flow
3. Made Edit page