Adfsession

Download as pdf or txt
Download as pdf or txt
You are on page 1of 18

<Insert Picture Here>

Oracle ADF Bootcamp


Grant Ronald
Senior Group Product Manager
Author: The Quick Start Guide to Fusion Development:JDeveloper and ADF

Building Fusion Applications with


Oracle JDeveloper and Oracle ADF
• The Fusion Development Platform <Insert Picture Here>

• Building Reusable Business Services


Fusion: The Big Picture
• Break
• Building the UI

Oracle Fusion – What Is It? Oracle Fusion Applications

• Oracle Fusion Applications • Next generation enterprise applications


• Oracle’s next generation of enterprise applications • New set of applications
• Oracle Fusion Middleware • Merge functionality previously in Oracle EBS, Siebel,
• Integrated standards-based middleware platform PeopleSoft into one offering
• Oracle Fusion Architecture • One of the largest software development projects in
• Recommended architecture for your custom applications the world
• Thousands of developers
• Several years in the making
What We Wanted – Business Drivers The Challenge

• Cutting Edge UI • On one side:


• Agility • JPA, EJB, Ajax, JavaScript, BPEL, SOAP, WSDL, RMI, JNDI,
JDBC, O/R, HTML, DOM….
• System Integration
• On the other side:
• Standards
• Thousands of developers
• Scalability, Security, Portability • Most don’t know these technologies
• Time to market • Most come from 4GL background
• Expecting a visual and declarative approach
• Don’t have time to learn all these new technologies
• Need to focus on their specific application needs
• How do you make it easy and approachable?
Java EE 5 SOA Web 2.0

The Solution - Oracle ADF

<Insert Picture Here> • Development framework that simplifies development


of Java EE-based SOA applications
An introduction to Oracle • Abstract developers from technology complexities
Application Development • Example - UI Components abstract from Ajax, Flash,
Javascript, DOM
Framework (Oracle ADF)
• Provides end-to-end infrastructure solutions…
• O/R Mapping, persistence, caching, controller, binding, UI
framework, security
• …and an easy way to use them
• JDeveloper - Visual editors, Property editors, dialogs etc…

Oracle ADF – High Level Architecture Oracle ADF Components for Fusion
MVC – Model View Controller Apps and what they do
• ADF Faces Rich Client Components
• UI components with built-in Ajax support
View
• ADF Controller
• Declarative definition of Web-pages and task flows
Controller • ADF Model
• Declarative way to bind UI to business services
• ADF Business Components
Model
• Reusable components to manage DB access and logic

Business Services
Business Service Goals ADF Business Components

A framework that simplifies developing Java EE


• Bridge Object-Relational gap business services for developers familiar with 4GL
• Manage CRUD operations tools, declarative development, and relational
databases
• Queries/DML
• Implement business rules
• Data validation
• Simplify data access
• Business logic • Simplify validation and business logic
• Reusable • Uses SQL based data views
• Separate data views from business logic
• Standards-based
• Implement best practices
• Easy customization

ADF Faces Rich Client Components

<Insert Picture Here> • 150+ JSF components


• Drag-and-drop framework
An introduction to the
• Dialog and popup framework
view (user interface) • Navigation menu framework
• Partial page rendering
• Advanced data streaming
• Complete JavaScript API
• Skinning
• Accessibility

As used in Fusion Applications

<Insert Picture Here>

An introduction to the
Controller
ADF Controller

• Handles page flow <Insert Picture Here>

• Visual development with page flow modeler


• Draw the page flow
An introduction to
• ADF Controller extends JSF controllers Binding
• Reuse flows
• Execute code as part of flow
• Exception and transaction management

The Binding Problem Bindings MetaData Summary

How do you To the consumer


connect your power
source

…different sources exposed …adaptors adapts to the specifics of


in a consistent manner the consuming component

Bindings MetaData Summary ADF Model – Data Binding

• Service oriented interface


• Provides abstraction of business service
• Loose coupling between services and application
Database
• Highly productive
• Drag and drop data binding
• More reusability
• Discover and share services
Web Services

POJO Data controls exposed business Bindings ensure consuming component


services in consistent manner gets information the way it expects it
The Fusion Architecture
View Business Logic Data

User Business Services <Insert Picture Here>


Interface ADF Business Components
WebCenter

ADF Faces
Database
components Data
Binding
Database
Schema
Schema Demonstration: Building
SDO Services a Fusion Application in 5
Events
minutes!
Human Workflow Mediator /BPEL Rules
Business
Service Process facts Engine
Activity Assign
Task
Monitoring
Task
results
Complete

Monitoring Human interaction Orchestration Policy evaluation

Building Business Services Agenda

• Introduction to ADF Business Components <Insert Picture Here>

• Entity objects
• View objects Introduction to ADF
• Application modules Business Components
• Model driven list of values
• Validation

ADF Business Components – High ADF Business Components – More


Level Overview Details
• Manages persistence • Provides data interaction and business logic
• O/R Mapping execution
• Queries • Maps to database tables
• DML
• 4GL development
• Record locking
• Wizard-based or visual development
• Performs validation • Implemented in metadata not code
• Data validation
• Simplifies business logic development
• Business logic validation
• Pre-defined Java methods for events
• Declarative business rules
• Can expose functionality as a service
The Building Blocks of ADF The Building Blocks of ADF

• Entity object • Association


• Acts as a cache • Defines a relationship
• View object beween entity objects
• Manages entity
• Defines and application
coordination
specific view of data
• Application module • View link
• Defines a link between
• Transactional container
view objects
representing a use case
• Defines master/details
links between views

Start with Your Database Entity Objects Encapsulate


Tables Business Rules, Logic, Defaults
in a Consistent Way for a Table

View Objects Encapsulate SQL Application Module Defines Data


Queries to Project, Join, Filter, Model of View Object Usages for
Order Data for External Client a Complete Application Use Case
Interaction
User Interfaces Work with the As You Build New Applications,
Application Module as Their Underlying Components Are
Backend Business Service Reusable

<Insert Picture Here> <Insert Picture Here>

Demonstration: Building Managing Entity Objects


ADF Business
Components

Creating and Managing Entity Objects Defining Attribute Control Hints

• Generate entity objects from database table • Defines default UI representation


• Attributes • Label
CustomerEO
• Type • Tooltip text
• Properties Id • Format mask
Name • Control type
• Updatable, mandatory, etc
Status
• Control hints Email
• Label, tooltip text, format mask
• Constraints Database table
• Validation CUSTOMERS
ID NAME STATUS Email
201 Steve Gold [email protected]
202 Mike Silver [email protected]
Creating and Managing View Objects

<Insert Picture Here> • Represent a query that shapes data for an application
specific purpose
Managing View Objects • Join, filter, and sort business data
• Enables you to have an application specific view of
data
• Constructed from SQL statement, static values or
populated programmatically
• Can be based on any number of entity objects
• Facilitates lookup

Conditional queries with named bind Creating and Managing View Objects
variables AllCustomersVO
CustId CustFirstName CustLastName NLS Territory Account Manager

101 Constantine Welles AMERICA 148

102 Harrison Pacino ITALY 148

103 Manisha Taylor AMERICA 101

326 Hal Olin GERMANY 101

344 Marlon Godard JAPAM 149

105 Matthias MacGraw AMERICA 148

104 Harrison Sutherland AMERICA 148

CustomersEO
CustId CustFirstName CustLastName NLS Territory Account Manager

101 Constantine Welles AMERICA 148

102 Harrison Pacino ITALY 148

103 Manisha Taylor AMERICA 101

326 Hal Olin GERMANY 101

344 Marlon Godard JAPAM 149

105 Matthias MacGraw AMERICA 148

104 Harrison Sutherland AMERICA 148

Creating and Managing View Objects View Links


USCustomersVO
CustId

105
CustFirstName

Matthias
CustLastName

MacGraw
FirstName

Cambrault
• Link related view objects
104 Harrison Sutherland Cambrault • Define a source attribute and destination attribute
103 Manisha Taylor Kocher

101 Constantine Welles Cambrault • Can be based on associations


• Provide master/detail
CustomersEO EmployeesEO
CustId CustFirstName CustLastName NLS Territory Account Manager EmpId FirstName LastName

101 Constantine Welles AMERICA 148 101 Nina Kocher

102 Harrison Pacino ITALY 148 148 Gerald Cambrault

103 Manisha Taylor AMERICA 101

326 Hal Olin GERMANY 101

344 Marlon Godard JAPAM 149


OrderItemsOrderIdFkLink
105 Matthias MacGraw AMERICA 148

104 Harrison Sutherland AMERICA 148


OrdersView OrderItemsView
View Object Attributes View Object Attributes

• Can be based on • Transient attributes


• Entity object attribute • Derived from Groovy expressions
• Select statement • LineTotal = Quantity * UnitPrice
• Transient (e.g. calculations) • adf.CurrentDate
• Can define default values • SQL expressions
• Based on literal values • Customers.CUST_GEO_LOCATION.sdo_point.x
• Expressions

View Object List of Values View Object View Criteria

• Define a list of values for a view object attribute • Named filter criteria
• Choice list • Augments the where clause of the target view object
• Combo box
• Can be displayed as query panel
• Combo box with list of values
• Can include bind variables
• Input text with list of values
• List box
• Radio group
• Correct UI components defaulted

ADF Application Modules

<Insert Picture Here> • Contain instances of view objects to implement a use


based
Managing Application • Control connection to database and transaction
Modules boundary (rollback, commit)
• Provide remotely accessible methods
• Easily reusable
Defining the Data Model for the
Application Module
<Insert Picture Here>

Demonstration: Refining
your business services

Adding Validation

<Insert Picture Here> • Entity object provide declarative validation


• Entity or attribute level
Adding validation • Compare
• List
• Key exists
• Regular expression
• Script
• Java method
• Define when validation fires
• Define error or information messages
• Can be parameterized

Compare Validation List Validation

• Compare an attribute against • Compare an attribute against


• A static value • A static list of values
• An expression • A view object
• Attribute from another view object • A database query
Key Exists Validation Regular Expression Validation

• Ensure value exists as a key • Validate data against a pattern


• For example, ensure AcctMgr is • For example
valid Employee in Employees table • [A-Z][a-z]{0,10}
• [A-Z0-9._%+-]+@[A-Z0-9.-
]+\.[A-Z]{2,4}
• Built in patterns
• Email address
• US phone number

Script Expression Validation Java Method Validation

• Validate against a Groovy • Validate against a Java


expression method
• Java like syntax • Gives you the full power of
• Allows quick development of Java for your validation rules
conditional rules

Summary

<Insert Picture Here> • Entity objects act as data cache <Insert Picture Here>

• Validation rules placed on entity objects


Demonstration: Adding • Associations define relationships between
Business Service entity objects
• Views shape application data
Validation • Model driven list of values
• Calculated transient attributes
• View criteria
• View links allow view objects to define
master/detail
• Application module uses view object instances
to implement use cases
Building ADF Faces Pages Agenda JSF Key Concepts

• Introduction to UI technologies • UI Component


• Introduction to ADF Faces Rich Client • JSF is component based
• ADF Faces components • Managed Beans & Backing Beans
• Encapsulates Application Logic, Data and Component
• ADF Model Properties
• Binding business service to UI items • Expression Language
• ADF Controller • Binding data to the UI
• Bounded task flow • Navigation Case
• Unbounded task flow • The rules that govern page flow
• Lifecycle
• Cycle of creation, validation, data-binding and business
service interactions of a page

How Oracle Improves JSF ADF Faces Rich Client

• ADF Faces Components <Insert Picture Here> • 150+ AJAX enabled JavaServer Faces components
• More components • Dialog and popup framework
• Better components
• Drag-and-drop framework
• Templating • Navigation menu framework
• ADF Task Flow • Partial page rendering
• Extended JSF controller
• Active data framework
• Page fragments
• Advanced data streaming – push to client
• Page regions
• Complete JavaScript API
• Reusable flows
• Templating
• Skinning

ADF Faces Components Examples Templates

• A template is a reusable ADF Faces page that


contains place holders for custom page content
• Templates are interpreted at runtime
• Templates may accept parameters for passing
information from the inheriting page to the template
• Templates can be based on quick start layouts
Creating a Page Template

Header (with Title)


<Insert Picture Here>

A Demonstration: Building
Menu Regions
Named Facets
a Page Template

B
News Portlet

Layout Components

<Insert Picture Here> • panelTabbed


• Container of panels with tabs
Introduction to ADF • panelBox
Faces Rich Client • Box with title area
Components • panelAccordion
• Container of collapsable panels
• panelFormLayout
• Lays out children in tabular form
• panelSplitter
• Resizable split panels

Common Components Using ADF Faces Input Components

• Regular components • inputNumberSlider


• Text items, buttons, check boxes, radio buttons • Input numerical data via a slider
• List selection components • inputNumberSpinbox
• Single select, multiple select, combo box, shuttle • Use can type or step through numbers
• Data layout components • inputRangeSlider
• Table, tree, tree table • Input a range of values via a slider
• Choosers • chooseDate
• Choose date, choose color • Select a date from calendar
• Menus • richTextEditor
• Others • Editor with formating
• Progress bar, bread crumbs …
Operation Components ADF Faces Popup Dialogs, Menus,
Windows
• Instead of writing • dialog
JavaScript • Lays out children in dialog window
• Validators • menu
• Convertors • Traditional menu

• Drag and drop • panelWindow


• Like a dialog but without the buttons
• Pop up
• noteWindow
• Poll
• Read only note often used to show help or extra information
• Listeners
• Export
• Print

ADF Faces Carousel ADF Faces Hierarchy Viewer

• Display images in a revolving carousel • Visualize relationships


• ADF Faces components can be used on carousel • Expand/collapse nodes
pages • Include ADF Faces components in nodes
• Zoom in/out
• Flash based

ADF Faces Data Visualization - Graphs ADF Faces Data Visualization - Gauges

• 50 graph types • Dial: standard and


• Flash or PNG rendering threshold
• Interactive: • Status Meter: standard
• Zoom and threshold
• Scroll • LED
• Time selector window
• Line and legend
highlighting/fading
• Dynamic reference lines
and areas
• Animation
ADF Data Visualization - Geographic ADF Data Visualization - Pivot Table
Map
• Represents business data • Multiple layers of data labels on a row
on a geographic map
or a column edge
• Supports superimposing
multiple layers of • Automatic calculation of subtotals and
information on a single map totals
• Available Map types are:
• Thematic
• Drag and drop pivoting
• Pie
• Bar
• Point

ADF Data Visualization - Gantt Chart

• Track tasks and resources against a timeline <Insert Picture Here>

• Gantt Chart types


• Project Gantt
Demonstration: Building
• Scheduling Gantt the Customers Page
• Resources Gantt

ADF Controller Task Flows

<Insert Picture Here> • An extension to the JSF standard page flow engine
that adds:
ADF Controller • Page and flows re-use
• Executing code in a flow (hence task flow not page
flow)
• Security
• Flow control
• Exception and transaction management
• Declarative back button control
ADF Controller Task Flows ADF Bounded Task Flow : Trains

• Bounded task flow • Bounded task flows can define a train


• Reuable portion of an • The framework Maintains knowledge of where you
application are
• Single entry point
• Train control and navigation buttons automatically
• May accept parameters
managed
• Own memory scope
• Unbounded task flow
• Top level task flow
• Multiple entry points

ADF Bounded Task Flow : Region Additional Reusability Features in ADF

• Bounded task flows can be made up of page • Page Fragments


fragments • Develop reusable areas
• Such flows can then be embedded into pages as • Page Regions
“regions” • Construct a page from fragments
• This is a very common pattern allowing the creation of • Declarative Components
complex pages made up of a series of re-usable • Bundle components together to create a new component
components (ie. Task Flows)
• Just drag and drop the flow into the page

Summary

<Insert Picture Here> • ADF Faces provides a rich set up UI <Insert Picture Here>

components
Demonstration: Building • Layout components
Task Flows • Input components
• Data visualization graphs
• ADF Model provides abstraction of binding
• ADF Controller
• Extends JSF controller
• Reuse of application flows
How Do You Prefer to Learn?

<Insert Picture Here> • http://download.oracle.com/otn_hosted_doc/jdeveloper/11


gdemos/ADFTour/ADFTour.html
Learning ADF • Live Course
• Online Course
• Books
• Online resources
• Learn while doing

Official Oracle University Courses Books

• Oracle Fusion Middleware 11g: Java Programming


• Oracle Fusion Middleware 11g: Build Applications with
ADF I
• Oracle Fusion Middleware 11g: Build Applications with
ADF II
• Oracle Fusion Middleware 11g: ADF Desktop Integration
• Oracle Fusion Middleware 11g: Build Java EE
Applications

Books Online Documentation

• Quick Start Guide to Oracle Fusion Development


• Oracle JDeveloper 11g Handbook
• Oracle Fusion Developer Guide
• Oracle ADF Enterprise Application Development-Made
Simple
• Oracle JDeveloper 11gR2 Cookbook
ADF Insider OTN Resources

• ADF Insider Basics • Tutorials


• ADF Insider Advanced • How-To’s
• ADF Insider Essentials • Sample Applications - FOD & Summit
• ADF Insider Essentials Tasks • ADF Code Corner
• OTN Harvest

Community Resources The Step By Step Guide


POC

• Blogs Code Corner

• ADF Enterprise Methodology Group Blogs/OTN/Twitter/ADF Community


ADF Insider

• JDeveloper Discussion Forum Fusion Developer Guide


Documentation/Developer Guides

Online resources/tutorials/videos
Events/User Groups/Community
• http://www.connotea.org/user/jdeveloper/ ADF Insider Essentials Tasks

• Searchable blogs/how-to’s repository


Go through ADF tutorials

Read JDeveloper Handbook

OU Build Applications With ADF

Watch ADF Insider Basics Videos

Read QuickStart Guide to ADF

Get at least the basics of the Java language

Q U E S T I O N S
&
ANSWERS

You might also like