You are on page 1of 38

Introduction to ADF Faces

in JDeveloper 10g
Is it Oracle Forms
Developer Yet?
Peter Koletzke
Technical Director &
Principal Instructor

Moi

Vous
Forms development
1-2 years?
3-9 years?
More than 9 years?

Java development
1-2 years?
3-11 years?
More than 11 years?

JDeveloper
1-3 years?
More than 3 years?
10.1.3?
3

On the Positive Side


If we do not find
anything pleasant, at least
we shall find something new.
Si nous ne trouvons pas des choses
agrables, nous trouverons du
moins des choses nouvelles.
Voltaire (1694-1778), Candide
4

Agenda
Frameworks and ADF
What is JSF?
How does ADF Faces help?
Is it Oracle Forms yet?
Rumor: There is a really good book
about JDeveloper 10g for Forms
Developers coming out soon.
5

What is a Framework?
Prebuilt architecture for solving a particular
problem
Provides a key service
For example, Struts framework provides
control of page flow in a web application

Code library, development method, tools


An extension of good reusable code strategies
Solve a problem once, use the code again in
multiple projects
Like an API

Allows extensions
To replace or supplement functionality
6

Benefits of a Framework
Promises increased productivity through code
reuse
Prebuilt code supplies functionality you would have to
build yourself
For example, connection layer to the database through JDBC

You write less 3GL code

Simplifies complexity of a high-level architecture


Complexity is hidden in the prebuilt code
Handles infrastructure and communication between
layers
You just hook into it

Provides structure to the myriad number


of technology combinations
The path to a particular goal is predefined
7

Oracle Forms is a Framework


It has key framework components
Code libraries (Forms runtime)
Documented methods (wizards and
editors)
Tools (Form Builder)

Forms is a fast way to build a


sophisticated user interface
You can extend Forms (using Java)

Oracle Application Development


Framework (ADF)
Attempt to meet the J2EE challenges
Lots of technology choices
No integrated tool
Database connectivity is difficult (JDBC)

Available starting in JDeveloper 10g


A wrapper for other frameworks
An architecture with code libraries
Implies a method and a tool

Based on Model-View-Controller
J2EE design pattern
Note: See Aug 2004 NoCOUG
presentation for more about ADF.

ADF Architecture
View
View

Application Client
Swing
model

Web Client

Swing
visual
aspect

Swing
event
handlers

JSP

ADF UIX

ADF JClient

JSF

Controller
Controller
Struts

JSF

Model
Model
ADF Bindings
ADF Data Controls

Business
BusinessServices
Services
EJB Session
Beans

Web Services

ADF Business
Components

Java Classes

Business
BusinessServices
Services
EJB Session
Beans

Web Services

ADF Business
Components

Java Classes

Code layer for accessing data sources


such as a database
Responsibilities:
Persistence
Data storage after the program ends

Object-relational (OR) mapping


Translating database objects to object-oriented
structures

Use this layer to code business logic


11

Model
Model
ADF Bindings
ADF Data Controls

The main innovation of ADF!


Connects Business Services to the View layer
Java local clients (heavy client)
Delivers data from Business Services to the View layer

Web clients (light client)


Receives instructions from the Controller layer as requests
for data retrieval and updates

ADF Data Controls


Interface components pre-bound to Model layer

ADF Bindings
The method for accessing Model objects
12

Controller
Controller
Struts

JSF

For web clients only


Determines what happens when user
submits page
Prepare next page to display
Can apply conditional logic
Can interact with data (Model)

Struts - JDev 10g 9.0.5 and 10.1.2


Jakarta Project open source effort

JavaServer Faces JDev 10.1.3


Replaces Struts in JDev
13

View
View

Application Client
Swing
model

Swing
event
handlers

Swing
visual
aspect

Web Client
ADF UIX

JSP

ADF JClient

JSF

User interface technologies


Application client
Java runtime on the client
Part of J2SE (standard edition)
Uses JClient framework to communicate with Model layer

Web client
JavaServer Pages (JSP) technology
J2EE standard, light-client, tag-based
interface

ADF UIX
Oracle-specific, XML-based interface
used by E-Business Suite applications

JavaServer
Faces (JSF)
Java
community
effort
J2EE 1.5 (soon)
14

Agenda
Frameworks and ADF
What is JSF?
How does ADF Faces help?
Is it Oracle Forms yet?

15

Nothing Like a Good Drill


Man is a tool-using animal. ...
Without tools he is nothing,
with tools he is all.
Thomas Carlyle (17511881),

Sartor Resartus

16

What is JSF?
JavaServer Faces technology
New technology (ratified JCP in 5/2004)
Not part of J2EE yet
Offers reference implementation

Effort to simplify JSP development


Component-ize it
High-level components provide much functionality

Integrate the controller


No Struts needed

Write less HTML


Component handles HTML writing

Development friendlier to Forms developers


Declarative programming
17

JSF Features
Rich component set
Core library for application tasks
HTML library for HTML tags, forms
JSP tag library included
Can be implemented in other languages

Include data binding properties

Event-driven
Events on the component level
Think Forms triggers

18

JSF Code
Can embed JSF in a JSP page (.jsp file)
JSP tags and HTML tags

Alternatively use a JSP document


(.jspx file)
JSF theoretically supports multiple client
devices
Not dependent upon an HTML browser
Same code, different render kit
Current Reference Implementation
is JSP-only

19

JSF Code Snippet


<f:facet name="footer">
<af:panelButtonBar
binding="#{backing_Deptapp.panelButtonBar1}">
<af:commandButton
actionListener="#{bindings.First.invoke}"
action="First" text="First"
disabled="#{!bindings.First.enabled}"
binding="#{backing_Deptapp.commandButton1}"/>
<af:commandButton
actionListener="#{bindings.Previous.invoke}"
action="Previous" text="Previous"
disabled="#{!bindings.Previous.enabled}"
binding="#{backing_Deptapp.commandButton2}"/>
</af:panelButtonBar>
</f:facet>
20

JSF Calling Sequence


Browser
URL

Web Tier JVM


Deptapp.jsp
HTML/JSP
JSF
Translate and compile

JSF Servlet
HTML

Deptapp.class

21

Agenda
Frameworks and ADF
What is JSF?
How does ADF Faces help?
Is it Oracle Forms yet?

22

ADF Faces
Oracle tag libraries
Released to MyFaces open source project in Jan.
Available in JDeveloper 10.1.3

Implements components available in UIX


UIX (User-Interface XML) is used in Oracle
Applications

Adds even more functionality to JSF


Supports multiple platforms through render
kits
JSP document or page
Telnet
Wireless
23

ADF Faces Features


Lots of Prebuilt stuff
UI components
Master-detail
Form-table, table-table, table-form, form-form

Data navigation controls


Color picker
Button and link
Tab menu bar
Progress meter
Editable table, tree

Layout objects page, form, header


No need to manage images
24

Some ADF Data Input Components


Text input

LOV item

Read-only
item

Button
Tip item

Date input with


date picker

Pulldown item

Items include prompts


Bound to data model
object
25

Some ADF Components


Tab menu bar with subtabs

Shuttle
Tree
26

ADF Data Controls Using ADF Faces

Editable table

Search form

Teeth
27

Benefits of ADF Faces


Smart controls partial page submit
AJAX
Asynchronous JavaScript and XML
A.k.a., Partial Page Rendering
Ajax provides

JavaScript effects without


JavaScript coding

a cleaner user
interface!

Support in JDeveloper
Drag and drop automatic binding
Property settings
Expression builders
28

Development Method
1. Create application workspace
2. Create Business Services and Model
project
3. Create View and Controller project
4. Test and debug
Use the same tools for
development regardless of
technology choices
Demo
29

Agenda
Frameworks and ADF
What is JSF?
How does ADF Faces help?
Is it Oracle Forms yet?

30

Short Answer

31

Its a Close Second


RAD for standard operations a tie
RAD for complex functions Forms slightly
ahead
Ease of extensions ADF Faces
3GL is always present
Forms needs Java (PJCs)

Highly interactive UI Forms


Apples and oranges (light client vs. heavy client)
ADF Faces is much better than plain vanilla HTML,
though

Prebuilt components ADF Faces


Forms has 22 (8 of which are drawing shapes)
ADF Faces has nearly 100 (some are not visual)
32

Other Comparisons
Development experience
Forms = declarative and visual with some PL/SQL
ADF Faces = declarative and visual with some
Java (and Expression Language)

Future
Forms future is solid support to 2012
Functionally stable, no new features
Still part of Oracle Applications (E-Business Suite)

ADF Faces very new technology


Likely to change much in short term
Nothing in J2EE lasts very long
J2EE is Oracles focus
33

It is a Suggested Path
JDeveloper is a J2EE tool
Supports any style of J2EE code
Less need to think about plumbing

Before ADF Faces, little guidance for


suggested path
Productivity with
Choice
The myth for Forms
developers

How to choose?
34

What Do You Need to Start?


Language skills needed
Java is omnipresent
But only at a scripting level
Still need a Java architect on the project

XML is a handy skill


If you know elements and attributes, thats
enough

HTML is not really used in ADF Faces


Helps to know what an HTML table is

ADF development method


ADF Business Components
35

Can ADF Faces Help You?


It can help shops that have J2EE experts
J2EE experts will be more productive
They need to learn the ADF process

It can also help shops who have traditional


non-J2EE Oracle developers
Forms and PL/SQL developers will be
productive with the declarative tools
With training, they can write Java extensions
Much of the complexity is hidden

They need a J2EE expert to guide them


and code the internal, complex stuff

36

Summary
Frameworks help development
Forms is a framework
Usually, not so easy for J2EE applications

ADF is a framework and it also helps


ADF Faces comes close to Forms

Nearly-equal productivity
Extremely rich component set
Support for declarative and visual programming
Requires a bit of ramp up time
Its J2EE-compliant and you still
need a J2EE architect
37

Designer
Handbook

JDeveloper 3
Handbook

Developer
Advanced
Forms & Reports

ORACLE9i
JDeveloper
Handbook
Coming
soon

ORACLE
JDeveloper 10g
Handbook

Books co-authored with Dr. Paul Dorsey,


Avrom Roy-Faderman, & Duncan Mills
Personal web site:

http://ourworld.compuserve.com/
homepages/Peter_Koletzke

http://www.quovera.com
Founded in 1995 as Millennia Vision
Corp.
Profitable for 7+ years without outside
funding
Consultants each have 10+ years
industry experience
Strong High-Tech industry background
200+ clients/300+ projects
JDeveloper Partner
More technical white papers and
presentations on the web site
38

You might also like