Vous êtes sur la page 1sur 64

1

2
Oracle ADF: Drag and Drop
Data Binding for J2EE Business Services
Steve Muench
Technical Evangelist, Product Manager,
Developer, Author

Oracle Corporation
3
Model / View / Controller Architecture
Business Service
Collections
of Value
Objects
User Input / Page Flow
Handling Logic
Business
Data
Business
Objects
Controller Layer
Business Services Layer
View Layer
Query Results
Code
Model
Layer
Business
Service
Interface
4
Data Binding Ties M, V, and C Together
Business Service
Collections
of Value
Objects
Business
Service
Interface
User Input / Page Flow
Handling Logic
Business
Data
Business
Objects
Controller Layer
Business Services Layer
View Layer
Query Results
Code
Model
Layer
5
JSR 227: Bindings & Data Controls
5008,00
salary
employeesIter
UI Control
Control
Binding
Iterator
Binding
Business
Service
yourDC
Data
Control
Model Layer
6
Control Binding Types
Value
Binding
Action
Binding
Range
Binding
Attributes
Binding
List
Binding
Tree
Binding
Control
Binding
7
JSR 227: Bindings & Data Controls
What is the Model Layer?
View, Controller, Business Services "Glue"
Why a Declarative, Standard Approach?
Saves Repetive Coding
Enables Visual Design Tools
JSR 277
Data
Binding
Layer
Swing
UIX/JSF
JSP
Web
Services
Toplink
EJB
Java
Classes
Business
Components
8
D E M O N S T R A T I O N
Quick Example of
Declarative Data Binding
For JSP and Swing
9
JSR 227 Design Time Environment
10
D E M O N S T R A T I O N
Quick Example of
Data Binding Using
POJO's Mapped with Toplink
11
How Does Data Binding Fit Into
Your End-to-End Application Architecture?
J2EE is Warehouse of Technology Ingredients
JMS, JDBC, JAXP, SAX, JSP, EJB, Servlets,
JAAS, JavaMail, JNDI, JTA, JCA
J2EE Does Not Prescribe any
End-to-End Application Architecture
What is the Recipe that's Right for Your App?
When Should You Use Which Technologies?
Hint: Your Choices Affect Application Performance!
Each Development Team Must:
Combine Ingredients into a Custom Architecture
Enforce Use of the Architecture Across Team
12
J2EE Design Patterns to the Rescue
Best Practice Techniques
Improve Performance
Increase Maintainability
Avoid Typical Problems
Application Architecture Ideas
What To Do In Which Tier
Which J2EE Technology When?
Paragraphs Of Text, Diagrams
Not Ready-to-use Code
13
J2EE Design
Patterns
Required for Any
Real-World Application
Implementing Them Is:
Time Consuming
Tedious, Error Prone
Ongoing Testing,
Debuging,Maintenance
Don't You Have An
Application to Finish?
14
J2EE Experts Advice
Many common problems
(beyond those addressed by
J2EE application servers) have
been solved well by open
source or commercial packages
and frameworks.
By adopting an existing
solution, we are free to devote
all our effort to meeting
business requirements.


Page 166
15
Write Your Own, or Off-the-Shelf ?
Most teams end up
developing and supporting
their own app-specific
frameworks
Others make the
investment to learn and
use one or more
off-the-shelf frameworks
16
Popular Framework-Based Techniques
Business Service
Collections
of Value
Objects
Business
Service
Interface
User Input / Page Flow
Handling Logic
Business
Data
Business
Objects
Controller Layer
Business Services Layer
View Layer
Query Results
Code
Model
Layer
Struts
JSP + Taglibs
17
Model, Services, Data Access, Business
Objects Often Hand-Coded
Business Service
Collections
of Value
Objects
Business
Service
Interface
User Input / Page Flow
Handling Logic
Business
Data
Business
Objects
Controller Layer
Business Services Layer
View Layer
Query Results
Code
Model
Layer
Struts
JSP + Taglibs
???
18
Frameworks Can Simplify
Business Objects
Persistence
Queries
Transaction Management
Data Access Objects
Business Services
Web and Wireless Clients Rich Clients
Model
Controller
Transactional Service Faades
Business Rules Enforcement
Client "Data Shaping"
Coordinating DAO's with BO's
State Management
Layered Customization
19
Frameworks Can Simplify
Interacting with Business Service Methods
Exposing Business Data to View/Controller Layers
Handling Updates Made to Business Data
Business Services
Web and Wireless Clients Rich Clients
Model
Controller
20
Frameworks Can Simplify
Business Service Location/Lookup and Pooling
Handling User Events and Request "Lifecycle"
Presenting/Internationalizing Messages & Errors
Page Navigation/Flow
Business Services
Web and Wireless Clients Rich Clients
Model
Controller
21
Frameworks Can Simplify
Swing Data Binding
Efficient 3-Tier Client/Server Communication

Business Services
Web and Wireless Clients
Rich Clients
Model
Controller
22
Over 2000 In-House Application Developers
Gives Us Significant In-House Expertise
Oracle E-Business Suite Developers are Building
Complex, Scalable J2EE Business Applications
With Web, Swing, and Web Services Interfaces
Targeting Intranet and Internet Deployment on J2EE
Using J2EE Design Patterns Frameworks
To Accelerate Implementation and Save on Testing
23
J2EE Experts Advice for Strong Foundation
Giving Most Flexibility, Best Performance
Lightweight "Inversion of Control" Container
JavaBean Based Components
Extending from Framework
Configured From XML Metadata
Constructed Using Factories
Solves Common Problems Once
Easier to Test Outside the
J2EE Container Environment
Can Be Repurposed in Both
J2EE Web Tier and EJB Solutions
24
Implements Standard J2EE Best Practices
Modular, Lightweight "Inversion of Control" Container
Model-View-Controller (MVC) Design Pattern






Focus on The Application, Not The Plumbing
Consolidation and Evolution of Proven Frameworks
Oracle Application Development
Framework (ADF)
Business Services
Web and Wireless Clients Rich Clients
Model
Controller
25
Oracle ADF Design Extensions
Visual
WYSIWYG Editors
UML Modelers
Structure Pane
Declarative
Property Inspector
XML Metadata
Synchronized
Code View & Design View Always Synchronized
No Separate Generation Step
Underlying Code Always Accessible
26
ADF Architecture Overview
Business Services
Web and Wireless
Clients
Rich Clients
Model
Controller
27
ADF Model Layer Enables Flexibility
View
Controller
Model
Business
Services
Swing / JClient JSP ADF UIX JSF
Rich Client Web / Wireless
Struts ADF Controller
ADF Bindings
ADF Data Control
Java
Classes
EJB
Session
Beans
Web
Services
ADF
Application Module
JDBC
EJB
Finders
TopLink
Queries
ADF
View Object
Data
Access
ADF
Entity Object
Java Classes EJB Entity Beans
TopLink Mapping
Persistent
Business
Objects
A
D
F

M
e
t
a
d
a
t
a

S
e
r
v
i
c
e
s

28
New Approach to Development
Select Your Development Approach
UML Modeling, Coding, Declarative
Development
Select Your Deployment Platform
Any J2EE Application Server
Any SQL92 Database
Select Your Technology Combination
"My JDeveloper"
Technology Scopes
29
Adding, Yet Simplifying Choices
My JDeveloper
UML
HTML
JSF
Apache Struts
EJBs
Toplink
Ant, JUnit
CVS
Oracle 9iAS
Profiling
Audit/Metrics
JSP
Struts
UI Project
Toplink
Model Project
T
e
c
h
n
o
l
o
g
y

S
c
o
p
e
s

Visual &
Declarative
UML
Swing, HTML
JSP
JSF
Apache Struts
ADF Business
Components
EJBs
Toplink
Ant, JUnit
CVS
Clearcase
Oracle SCM
Oracle 9iAS
JBoss, WLS
Profiling
Audit/Metrics

E
x
t
e
n
s
i
o
n

M
a
n
a
g
e
r

CHOICES
30
D E M O N S T R A T I O N
Quick Example of
Extension Manager,
Technology Scopes, and
Application Templates
31
ADF Architecture Overview
Business Services
Web and Wireless
Clients
Rich Clients
Model
Controller
32
Business Services Layer
Manages Persistence
O/R Mapping
Provides Filtered Views of Data
Custom Queries
Encapsulates Business Rules
Data Validation
Business Logic
Choices of Implementation
EJB, ADF Business Components,
Web Services, Java Classes, TopLink
33
Plain Java Classes
Mapped with Oracle TopLink
TopLink Provides Architecture
for Object/Relational Persistence
Sophisticated Out-of-Box Options
to Map Java Classes to Any Kinds
of Tables or XML
Integrated Mapping Editor
34
TopLink: Define Custom
Finder Queries
35
Enterprise JavaBeans (EJB)
Services are EJB Session Beans
Business Objects are Entity Beans
Leverage Toplink Mapping for CMP
Integrated Environment to
Model, Code, Test, Debug EJBs
Productively Develop EJBs
EJB Module Editor
Basic Design Patterns Support
Data Transfer Object
Session Faade
EJB Verifier
36
J2EE Web Services
Web Services UML Modeling
TCP Packet Monitor
PL/SQL Web Service wizard
WS-I Compliance tester
ADF Data Control Binding
Interoperability with .NET

37
ADF Business Components
Prescriptive Building Blocks for Service-Oriented Apps
Transactional Service Faades (ApplicationModule)
Task-Specific "Data Shaping" Components (ViewObject)
Business Objects with Rules Enforcement (EntityObject)
Used by Over 2000 Developers in Oracle Applications
For Corporate Developers, VAR's, and ISV's Looking
to Avoid Writing Their Own J2EE Application Framework for the
Business Services Layer
Entity
Object
View
Object
Application
Module
38
ADF Business Components
Best-Practice App-Building Infrastructure For:
Coordinating Data Access Objects with BO's
Component Metadata (Prompts, Fmt Masks, Properties)
State Management
Efficient Remote Client Communication
Layered Customization
Use/Test Services as Lightweight Java Classes
Scalable & Performant with Optimized DB Interaction
Option to Deploy as EJB Session Beans, Web Services
39
Building Business Services with ADF BC
View
Controller
Model
Business
Services
Swing / JClient JSP ADF UIX JSF
Rich Client Web / Wireless
Struts ADF Controller
ADF Bindings
ADF Data Control
Data
Access
Persistent
Business
Objects
Entity
Object
View
Object
Application
Module

PaymentPlan
MgmtService
SlowPaying
Customers
Late
Payments
Bill Payment
Customer
40
Business Services Design Time
UML Modelers, Wizards,
Editors
Database Schema
ADF Business Components
Enterprise JavaBeans
Web Services
Java Classes
41
Drag and Drop Data Binding
Data Binding Palette
Expose any Business Service
Available to any View
Create UI components
Master/Detail
Table
Field, checkbox,
42
ADF Architecture Overview
Business Services
Web and Wireless
Clients
Rich Clients
Model
Controller
43
UI Development
Visual editors
JSP and HTML
JavaServer Faces
ADF UIX
Swing (ADF JClient)
Component palette
Common binding
Property inspector
Structure pane
44
Design and Code Sync
Design View / Code View
Available For All Components
Two-Way Synchronization

45
ADF JClient
Rich Client user interface
(JFC/Swing)
WYSIWYG Editor
Simplified Swing UI Layout
Best Practices Approach
UI Debugging

46
JSP Visual Design
Synchronized JSP Visual Design with
Code Editor
Structure Pane
Property Inspector
Data Control/Component Palette
Integrated with JSTL/EL & Struts
Taglibs on Component Palette
Intuitive tag and EL rendering
Synchronized with Struts Page Flow
Universal ADF Databinding
Java Classes + Toplink
EJB + TopLink
Business Components
Web Services
Drag and Drop UI Components
47
ADF Faces for JSF
JavaServer Faces (JSR-127)
Components
Support Variety of Clients
Web Browsers, Mobile Devices
Rich Components, Layouts,
and Render Kits
Powerful Runtime Features
Partial Page Rendering
Automatic Sorting
Look and Feel "Skinning"


48
ADF Faces Early Access Release
49
50
51
52
53
54
D E M O N S T R A T I O N
Powerful, JSF-Compliant
Visual Components
55
ADF Architecture Overview
Business Services
Web and Wireless
Clients
Rich Clients
Model
Controller
56
Controller
Handles Page Flow
Promotes Page Reuse Through Abstraction
Increase Flexibility And Manageability
Place For Code Execution
Programmatic Interaction With
Model Data and Business Service
Application Support Tasks
Security
Input Validation
State Management
57
Struts Page Flow
Visual Development with the Page Flow Modeler
Draw the Page Flow
Synchronized with Struts Xml
Drilldown to Code & Pages
Declarative
Structure Pane
Property Inspector
ADF Data Action
Handles Model Interaction With Standard Struts Mechanisms
No Coding Required
58
D E M O N S T R A T I O N
Struts Page Flow and Approaches
for Event Handling
and Page Navigation
59
Visual Struts Page Flow
60
Oracle ADF
End-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 Clients Rich Clients
Model
Controller
77
61
Oracle Strategy for J2EE Development
Offer Full-Lifecyle, Visual Development for J2EE
For Model, View, Controller, and Business Services
Add Value Across the Entire Development Spectrum
With tools to make that visual and productive
Productivity with Choice
Use Any Layer of Our Provided Frameworks, or None
Tight Application Server Integration
Best with Oracle, plus Standards-Based Portability
Continue to Expand Open-Source Tools Support
Struts, JUnit, Ant are Ones We Support Already
Shape, Implement, and Drive Standards
Participate in and Implement New Specs (like JSF)
Drive New JSR's to Standardize Other App-Building Interfaces
62
Googling for More Information on
JDeveloper and ADF
oracle jdeveloper adf
adf data binding
adf toy store demo
dive into adf
63
Thank You! For More Information
http://otn.oracle.com/products/jdev
Download the Software
Read "How To" Articles
Get Example Source Code
http://www.oracle.com/forums
Discussion Forums for Informal Tech Support
http://radio.weblogs.com/0118231/
"Dive into BC4J and ADF"
64

Vous aimerez peut-être aussi