j2ee for oracle technologists

38
Introduction to ADF Faces in JDeveloper 10g Is it Oracle Forms Developer Yet? Peter Koletzke Technical Director & Principal Instructor

Upload: sampetruda

Post on 12-Jan-2015

793 views

Category:

Documents


0 download

DESCRIPTION

 

TRANSCRIPT

Page 1: J2EE for Oracle Technologists

Introduction to ADF Faces in JDeveloper 10g — Is it Oracle Forms

Developer Yet?

Peter KoletzkeTechnical Director & Principal Instructor

Page 2: J2EE for Oracle Technologists

2

Moi

Page 3: J2EE for Oracle Technologists

3

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?

Page 4: J2EE for Oracle Technologists

4

On the Positive Side…

If we do not find anything pleasant, at least

we shall find something new.

—Voltaire (1694-1778), Candide

Si nous ne trouvons pas des choses agréables, nous trouverons

du moins des choses nouvelles.

Page 5: J2EE for Oracle Technologists

5

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.

Page 6: J2EE for Oracle Technologists

6

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

Page 7: J2EE for Oracle Technologists

7

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

Page 8: J2EE for Oracle Technologists

8

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)

Page 9: J2EE for Oracle Technologists

9

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.

Page 10: J2EE for Oracle Technologists

ViewView

ControllerController

ModelModel

Struts

ADF UIX

Swing visual aspect JSP

Swing model

ADF Bindings

ADF Data Controls

Application ClientWeb Client

Swing event

handlers

ADF JClient

ADF Architecture

Business ServicesBusiness Services

ADF Business Components

EJB Session Beans

Web Services Java Classes

JSF

JSF

Page 11: J2EE for Oracle Technologists

11

• 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

Business ServicesBusiness Services

ADF Business Components

EJB Session Beans

Web Services Java Classes

Page 12: J2EE for Oracle Technologists

12

• 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

ModelModelADF Bindings

ADF Data Controls

Page 13: J2EE for Oracle Technologists

13

• 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

ControllerController

Struts JSF

Page 14: J2EE for Oracle Technologists

14

• 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

ViewView

ADF UIX

Swing visual aspect JSP

Swing model

Application ClientWeb Client

Swing event

handlers

ADF JClient JSF

• JavaServer Faces (JSF)– Java

community effort

– J2EE 1.5 (soon)

Page 15: J2EE for Oracle Technologists

15

Agenda

• Frameworks and ADF

• What is JSF?

• How does ADF Faces help?

• Is it Oracle Forms yet?

Page 16: J2EE for Oracle Technologists

16

Nothing Like a Good Drill

Man is a tool-using animal. ...

Without tools he is nothing,

with tools he is all.

—Thomas Carlyle (1751–1881), Sartor Resartus

Page 17: J2EE for Oracle Technologists

17

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

Page 18: J2EE for Oracle Technologists

18

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

Page 19: J2EE for Oracle Technologists

19

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

Page 20: J2EE for Oracle Technologists

20

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>

Page 21: J2EE for Oracle Technologists

21

JSF Calling SequenceWeb Tier JVMBrowser

HTML

URL

JSF Servlet

Deptapp.jsp

HTML/JSP

JSF

Deptapp.class

Translate and compile

Page 22: J2EE for Oracle Technologists

22

Agenda

• Frameworks and ADF

• What is JSF?

• How does ADF Faces help?

• Is it Oracle Forms yet?

Page 23: J2EE for Oracle Technologists

23

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

Page 24: J2EE for Oracle Technologists

24

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

Page 25: J2EE for Oracle Technologists

25

Some ADF Data Input Components

Text input

Tip item

Pulldown item

LOV item Read-only item

Date input with date

picker

Button

• Items include prompts• Bound to data model

object

Page 26: J2EE for Oracle Technologists

26

Some ADF Components

Tree

Shuttle

Tab menu bar with subtabs

Page 27: J2EE for Oracle Technologists

27

ADF Data Controls Using ADF Faces

Editable table

TeethSearch form

Page 28: J2EE for Oracle Technologists

28

Benefits of ADF Faces• “Smart” controls – partial page submit

– AJAX • Asynchronous JavaScript and XML• A.k.a., Partial Page Rendering

– JavaScript effects without JavaScript coding

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

Ajax provides a cleaner

user interface!

Page 29: J2EE for Oracle Technologists

29

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

Page 30: J2EE for Oracle Technologists

30

Agenda

• Frameworks and ADF

• What is JSF?

• How does ADF Faces help?

• Is it Oracle Forms yet?

Page 31: J2EE for Oracle Technologists

31

Short Answer

Page 32: J2EE for Oracle Technologists

32

It’s 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)

Page 33: J2EE for Oracle Technologists

33

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 Oracle’s focus

Page 34: J2EE for Oracle Technologists

34

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?

Page 35: J2EE for Oracle Technologists

35

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”, that’s

enough

– HTML is not really used in ADF Faces• Helps to know what an HTML table is

• ADF development method– ADF Business Components

Page 36: J2EE for Oracle Technologists

36

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

Page 37: J2EE for Oracle Technologists

37

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– It’s J2EE-compliant and you still

need a J2EE architect

Page 38: J2EE for Oracle Technologists

38

DesignerHandbook

DesignerHandbook

DeveloperAdvancedForms & Reports

DeveloperAdvancedForms & Reports

JDeveloper 3HandbookJDeveloper 3Handbook ORACLE9i

JDeveloperHandbook

• 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

http://www.quovera.com

Books co-authored with Dr. Paul Dorsey, Avrom Roy-Faderman, & Duncan Mills

Personal web site:http://ourworld.compuserve.com/ homepages/Peter_Koletzke

ORACLEJDeveloper 10gHandbook

Comingsoon