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 Building Reusable Business Services Break Building the UI <Insert Picture Here> Fusion: The Big Picture Oracle Fusion – What Is It? Oracle Fusion Applications Oracle’s next generation of enterprise applications Oracle Fusion Middleware Integrated standards-based middleware platform Oracle Fusion Architecture Recommended architecture for your custom applications Oracle Fusion Applications Next generation enterprise applications New set of applications Merge functionality previously in Oracle EBS, Siebel, PeopleSoft into one offering One of the largest software development projects in the world Thousands of developers Several years in the making

 · Oracle JDeveloper and Oracle ADF • The Fusion Development Platform • Building Reusable Business Services • Break • Building the UI

  • Upload
    others

  • View
    37

  • Download
    0

Embed Size (px)

Citation preview

Page 1:  · Oracle JDeveloper and Oracle ADF • The Fusion Development Platform • Building Reusable Business Services • Break • Building the UI

<Insert Picture Here>

Oracle ADF Bootcamp

Grant Ronald

Senior Group Product ManagerAuthor: The Quick Start Guide to Fusion Development:JDeveloper and ADF

Building Fusion Applications with

Oracle JDeveloper and Oracle ADF

• The Fusion Development Platform

• Building Reusable Business Services

• Break

• Building the UI

<Insert Picture Here>

Fusion: The Big Picture

Oracle Fusion – What Is It?

• Oracle Fusion Applications

• Oracle’s next generation of enterprise applications

• Oracle Fusion Middleware

• Integrated standards-based middleware platform

• Oracle Fusion Architecture

• Recommended architecture for your custom applications

Oracle Fusion Applications

• Next generation enterprise applications

• New set of applications

• Merge functionality previously in Oracle EBS, Siebel, PeopleSoft into one offering

• One of the largest software development projects in the world

• Thousands of developers

• Several years in the making

Page 2:  · Oracle JDeveloper and Oracle ADF • The Fusion Development Platform • Building Reusable Business Services • Break • Building the UI

What We Wanted – Business Drivers

• Cutting Edge UI

• Agility

• System Integration

• Standards

• Scalability, Security, Portability

• Time to market

Java EE 5 SOA Web 2.0

The Challenge

• On one side:

• JPA, EJB, Ajax, JavaScript, BPEL, SOAP, WSDL, RMI, JNDI,

JDBC, O/R, HTML, DOM….

• On the other side:

• Thousands of developers

• Most don’t know these technologies

• 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?

<Insert Picture Here>

An introduction to Oracle Application Development

Framework (Oracle ADF)

The Solution - Oracle ADF

• Development framework that simplifies development of Java EE-based SOA applications

• Abstract developers from technology complexities

• Example - UI Components abstract from Ajax, Flash,Javascript, DOM

• 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 ArchitectureMVC – Model View Controller

ViewView

ModelModel

ControllerController

Business ServicesBusiness Services

Oracle ADF Components for Fusion

Apps and what they do

• ADF Faces Rich Client Components

• UI components with built-in Ajax support

• ADF Controller

• Declarative definition of Web-pages and task flows

• ADF Model

• Declarative way to bind UI to business services

• ADF Business Components

• Reusable components to manage DB access and logic

Page 3:  · Oracle JDeveloper and Oracle ADF • The Fusion Development Platform • Building Reusable Business Services • Break • Building the UI

Business Service Goals

• Bridge Object-Relational gap

• Manage CRUD operations

• Queries/DML

• Implement business rules

• Data validation

• Business logic

• Reusable

• Standards-based

ADF Business Components

A framework that simplifies developing Java EE business services for developers familiar with 4GL tools, declarative development, and relational databases

• Simplify data access

• Simplify validation and business logic

• Uses SQL based data views

• Separate data views from business logic

• Implement best practices

• Easy customization

<Insert Picture Here>

An introduction to the view (user interface)

ADF Faces Rich Client Components

• 150+ JSF components

• Drag-and-drop framework

• Dialog and popup framework

• 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

Page 4:  · Oracle JDeveloper and Oracle ADF • The Fusion Development Platform • Building Reusable Business Services • Break • Building the UI

ADF Controller

• Handles page flow

• Visual development with page flow modeler

• Draw the page flow

• ADF Controller extends JSF controllers

• Reuse flows

• Execute code as part of flow

• Exception and transaction management

<Insert Picture Here>

An introduction to Binding

The Binding Problem

How do you connect your power

source

To the consumer

Bindings MetaData Summary

…different sources exposed in a consistent manner

…adaptors adapts to the specifics of the consuming component

Bindings MetaData Summary

Database

Web Services

POJOData controls exposed business services in consistent manner

Bindings ensure consuming component gets information the way it expects it

• Service oriented interface

• Provides abstraction of business service

• Loose coupling between services and application

• Highly productive

• Drag and drop data binding

• More reusability

• Discover and share services

ADF Model – Data Binding

Page 5:  · Oracle JDeveloper and Oracle ADF • The Fusion Development Platform • Building Reusable Business Services • Break • Building the UI

The Fusion ArchitectureBusiness LogicView Data

OrchestrationHuman interaction Policy evaluationMonitoring

RulesEngineAssign

Task

TaskComplete

Human WorkflowService

Mediator /BPEL Process

results

factsBusinessActivity

Monitoring

User InterfaceADF Faces

components

Business ServicesADF Business Components

DataBinding

SDO Services

DatabaseSchema

DatabaseSchema

Events

We

bC

en

ter

<Insert Picture Here>

Demonstration: Building a Fusion Application in 5

minutes!

Building Business Services Agenda

• Introduction to ADF Business Components

• Entity objects

• View objects

• Application modules

• Model driven list of values

• Validation

<Insert Picture Here>

Introduction to ADF Business Components

ADF Business Components – High

Level Overview

• Manages persistence

• O/R Mapping

• Queries

• DML

• Record locking

• Performs validation

• Data validation

• Business logic validation

ADF Business Components – More

Details

• Provides data interaction and business logic execution

• Maps to database tables

• 4GL development

• Wizard-based or visual development

• Implemented in metadata not code

• Simplifies business logic development

• Pre-defined Java methods for events

• Declarative business rules

• Can expose functionality as a service

Page 6:  · Oracle JDeveloper and Oracle ADF • The Fusion Development Platform • Building Reusable Business Services • Break • Building the UI

The Building Blocks of ADF

• Entity object

• Acts as a cache

• View object

• Defines and application specific view of data

• Application module

• Transactional container representing a use case

The Building Blocks of ADF

• Association

• Defines a relationship

beween entity objects

• Manages entity coordination

• View link

• Defines a link between view objects

• Defines master/details

links between views

Start with Your Database Tables

Entity Objects Encapsulate Business Rules, Logic, Defaults in a Consistent Way for a Table

View Objects Encapsulate SQL Queries to Project, Join, Filter,

Order Data for External Client Interaction

Application Module Defines Data Model of View Object Usages for a Complete Application Use Case

Page 7:  · Oracle JDeveloper and Oracle ADF • The Fusion Development Platform • Building Reusable Business Services • Break • Building the UI

User Interfaces Work with the Application Module as Their

Backend Business Service

As You Build New Applications, Underlying Components Are

Reusable

<Insert Picture Here>

Demonstration: Building ADF Business

Components

<Insert Picture Here>

Managing Entity Objects

Creating and Managing Entity Objects

• Generate entity objects from database table

• Attributes

• Type

• Properties

• Updatable, mandatory, etc

• Control hints

• Label, tooltip text, format mask

• Constraints

• Validation

CustomerEO

IdName

StatusEmail

Database table

ID

201

NAME

Steve

STATUS

Gold

Email

[email protected] Mike Silver [email protected]

CUSTOMERS

Defining Attribute Control Hints

• Defines default UI representation

• Label

• Tooltip text

• Format mask

• Control type

Page 8:  · Oracle JDeveloper and Oracle ADF • The Fusion Development Platform • Building Reusable Business Services • Break • Building the UI

<Insert Picture Here>

Managing View Objects

Creating and Managing View Objects

• Represent a query that shapes data for an application specific purpose

• 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

variables

Creating and Managing View Objects

AllCustomersVO

CustomersEO

Account ManagerNLS TerritoryCustLastNameCustFirstNameCustId

148AMERICAMacGrawMatthias105

148AMERICASutherlandHarrison104

149JAPAMGodardMarlon344

101GERMANYOlinHal326

101AMERICATaylorManisha103

148ITALYPacinoHarrison102

148AMERICAWellesConstantine101

Account ManagerNLS TerritoryCustLastNameCustFirstNameCustId

148AMERICAMacGrawMatthias105

148AMERICASutherlandHarrison104

149JAPAMGodardMarlon344

101GERMANYOlinHal326

101AMERICATaylorManisha103

148ITALYPacinoHarrison102

148AMERICAWellesConstantine101

Creating and Managing View Objects

USCustomersVO

CustomersEO EmployeesEO

Account ManagerNLS TerritoryCustLastNameCustFirstNameCustId

148AMERICAMacGrawMatthias105

148AMERICASutherlandHarrison104

149JAPAMGodardMarlon344

101GERMANYOlinHal326

101AMERICATaylorManisha103

148ITALYPacinoHarrison102

148AMERICAWellesConstantine101

LastNameFirstNameEmpId

CambraultGerald148

KocherNina101

CambraultMacGrawMatthias105

FirstNameCustLastNameCustFirstNameCustId

CambraultWellesConstantine101

KocherTaylorManisha103

CambraultSutherlandHarrison104

View Links

OrdersView OrderItemsView

OrderItemsOrderIdFkLink

• Link related view objects

• Define a source attribute and destination attribute

• Can be based on associations

• Provide master/detail

Page 9:  · Oracle JDeveloper and Oracle ADF • The Fusion Development Platform • Building Reusable Business Services • Break • Building the UI

View Object Attributes

• Can be based on

• Entity object attribute

• Select statement

• Transient (e.g. calculations)

• Can define default values

• Based on literal values

• Expressions

View Object Attributes

• Transient attributes

• Derived from Groovy expressions

• LineTotal = Quantity * UnitPrice

• adf.CurrentDate

• SQL expressions

• Customers.CUST_GEO_LOCATION.sdo_point.x

View Object List of Values

• Define a list of values for a view object attribute

• Choice list

• Combo box

• Combo box with list of values

• Input text with list of values

• List box

• Radio group

• Correct UI components defaulted

View Object View Criteria

• Named filter criteria

• Augments the where clause of the target view object

• Can be displayed as query panel

• Can include bind variables

<Insert Picture Here>

Managing Application Modules

ADF Application Modules

• Contain instances of view objects to implement a use based

• Control connection to database and transaction boundary (rollback, commit)

• Provide remotely accessible methods

• Easily reusable

Page 10:  · Oracle JDeveloper and Oracle ADF • The Fusion Development Platform • Building Reusable Business Services • Break • Building the UI

Defining the Data Model for the

Application Module

<Insert Picture Here>

Demonstration: Refining your business services

<Insert Picture Here>

Adding validation

Adding Validation

• Entity object provide declarative validation

• Entity or attribute level

• Compare

• List

• Key exists

• Regular expression

• Script

• Java method

• Define when validation fires

• Define error or information messages

• Can be parameterized

Compare Validation

• Compare an attribute against

• A static value

• An expression

• Attribute from another view object

List Validation

• Compare an attribute against

• A static list of values

• A view object

• A database query

Page 11:  · Oracle JDeveloper and Oracle ADF • The Fusion Development Platform • Building Reusable Business Services • Break • Building the UI

Key Exists Validation

• Ensure value exists as a key

• For example, ensure AcctMgr is

valid Employee in Employees table

Regular Expression Validation

• Validate data against a pattern

• For example

• [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

• Validate against a Groovy expression

• Java like syntax

• Allows quick development of conditional rules

Java Method Validation

• Validate against a Java method

• Gives you the full power of

Java for your validation rules

<Insert Picture Here>

Demonstration: Adding Business Service

Validation

<Insert Picture Here>

Summary

• Entity objects act as data cache• Validation rules placed on entity objects

• Associations define relationships between entity objects

• Views shape application data• 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

Page 12:  · Oracle JDeveloper and Oracle ADF • The Fusion Development Platform • Building Reusable Business Services • Break • Building the UI

Building ADF Faces Pages Agenda

• Introduction to UI technologies

• Introduction to ADF Faces Rich Client

• ADF Faces components

• ADF Model

• Binding business service to UI items

• ADF Controller

• Bounded task flow

• Unbounded task flow

JSF Key Concepts

• UI Component • JSF is component based

• Managed Beans & Backing Beans• Encapsulates Application Logic, Data and Component

Properties

• Expression Language• Binding data to the UI

• Navigation Case• The rules that govern page flow

• Lifecycle• Cycle of creation, validation, data-binding and business

service interactions of a page

<Insert Picture Here>

How Oracle Improves JSF

• ADF Faces Components

• More components

• Better components

• Templating

• ADF Task Flow

• Extended JSF controller

• Page fragments

• Page regions

• Reusable flows

ADF Faces Rich Client

• 150+ AJAX enabled JavaServer Faces components

• Dialog and popup framework

• Drag-and-drop framework

• Navigation menu framework

• Partial page rendering

• Active data framework

• Advanced data streaming – push to client

• Complete JavaScript API

• 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

Page 13:  · Oracle JDeveloper and Oracle ADF • The Fusion Development Platform • Building Reusable Business Services • Break • Building the UI

Creating a Page Template

Header (with Title)

A

B

Menu Regions

News Portlet

Named Facets

<Insert Picture Here>

Demonstration: Building a Page Template

<Insert Picture Here>

Introduction to ADF Faces Rich Client

Components

Layout Components

• panelTabbed

• Container of panels with tabs

• panelBox

• Box with title area

• panelAccordion

• Container of collapsable panels

• panelFormLayout

• Lays out children in tabular form

• panelSplitter

• Resizable split panels

Common Components

• Regular components

• Text items, buttons, check boxes, radio buttons

• List selection components

• Single select, multiple select, combo box, shuttle

• Data layout components

• Table, tree, tree table

• Choosers

• Choose date, choose color

• Menus

• Others

• Progress bar, bread crumbs …

Using ADF Faces Input Components

• inputNumberSlider

• Input numerical data via a slider

• inputNumberSpinbox

• Use can type or step through numbers

• inputRangeSlider

• Input a range of values via a slider

• chooseDate

• Select a date from calendar

• richTextEditor

• Editor with formating

Page 14:  · Oracle JDeveloper and Oracle ADF • The Fusion Development Platform • Building Reusable Business Services • Break • Building the UI

Operation Components

• Instead of writing JavaScript

• Validators

• Convertors

• Drag and drop

• Pop up

• Poll

• Listeners

• Export

• Print

ADF Faces Popup Dialogs, Menus,

Windows

• dialog

• Lays out children in dialog window

• menu

• Traditional menu

• panelWindow

• Like a dialog but without the buttons

• noteWindow

• Read only note often used to show help or extra information

ADF Faces Carousel

• Display images in a revolving carousel

• ADF Faces components can be used on carousel pages

ADF Faces Hierarchy Viewer

• Visualize relationships

• Expand/collapse nodes

• Include ADF Faces components in nodes

• Zoom in/out

• Flash based

ADF Faces Data Visualization - Graphs

• 50 graph types

• Flash or PNG rendering

• Interactive:

• Zoom

• Scroll

• Time selector window

• Line and legend highlighting/fading

• Dynamic reference lines

and areas

• Animation

ADF Faces Data Visualization - Gauges

• Dial: standard and threshold

• Status Meter: standard and threshold

• LED

Page 15:  · Oracle JDeveloper and Oracle ADF • The Fusion Development Platform • Building Reusable Business Services • Break • Building the UI

ADF Data Visualization - Geographic

Map

• Represents business data on a geographic map

• Supports superimposing multiple layers of information on a single map

• Available Map types are:

• Thematic

• Pie

• Bar

• Point

ADF Data Visualization - Pivot Table

• Multiple layers of data labels on a row or a column edge

• Automatic calculation of subtotals and totals

• Drag and drop pivoting

ADF Data Visualization - Gantt Chart

• Track tasks and resources against a timeline

• Gantt Chart types

• Project Gantt

• Scheduling Gantt

• Resources Gantt

<Insert Picture Here>

Demonstration: Building the Customers Page

<Insert Picture Here>

ADF Controller

ADF Controller Task Flows

• An extension to the JSF standard page flow engine that adds:

• 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

Page 16:  · Oracle JDeveloper and Oracle ADF • The Fusion Development Platform • Building Reusable Business Services • Break • Building the UI

ADF Controller Task Flows

• Bounded task flow

• Reuable portion of an

application

• Single entry point

• May accept parameters

• Own memory scope

• Unbounded task flow

• Top level task flow

• Multiple entry points

ADF Bounded Task Flow : Trains

• Bounded task flows can define a train

• The framework Maintains knowledge of where you are

• Train control and navigation buttons automatically managed

ADF Bounded Task Flow : Region

• Bounded task flows can be made up of page fragments

• Such flows can then be embedded into pages as “regions”

• This is a very common pattern allowing the creation of complex pages made up of a series of re-usable components (ie. Task Flows)

• Just drag and drop the flow into the page

Additional Reusability Features in ADF

• Page Fragments

• Develop reusable areas

• Page Regions

• Construct a page from fragments

• Declarative Components

• Bundle components together to create a new component

<Insert Picture Here>

Demonstration: Building Task Flows

<Insert Picture Here>

Summary

• ADF Faces provides a rich set up UI components

• Layout components

• Input components

• Data visualization graphs

• ADF Model provides abstraction of binding

• ADF Controller

• Extends JSF controller

• Reuse of application flows

Page 17:  · Oracle JDeveloper and Oracle ADF • The Fusion Development Platform • Building Reusable Business Services • Break • Building the UI

<Insert Picture Here>

Learning ADF

How Do You Prefer to Learn?

• http://download.oracle.com/otn_hosted_doc/jdeveloper/11gdemos/ADFTour/ADFTour.html

• Live Course

• Online Course

• Books

• Online resources

• Learn while doing

Official Oracle University Courses

• 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

Books

• 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

Online Documentation

Page 18:  · Oracle JDeveloper and Oracle ADF • The Fusion Development Platform • Building Reusable Business Services • Break • Building the UI

ADF Insider

• ADF Insider Basics

• ADF Insider Advanced

• ADF Insider Essentials

• ADF Insider Essentials Tasks

OTN Resources

• Tutorials

• How-To’s

• Sample Applications - FOD & Summit

• ADF Code Corner

• OTN Harvest

Community Resources

• Blogs

• ADF Enterprise Methodology Group

• JDeveloper Discussion Forum

• http://www.connotea.org/user/jdeveloper/

• Searchable blogs/how-to’s repository

The Step By Step Guide

Get at least the basics of the Java language

Read QuickStart Guide to ADF

Watch ADF Insider Basics Videos

Go through ADF tutorials

Read JDeveloper Handbook

OU Build Applications With ADF

ADF Insider Essentials Tasks

ADF Insider

Fusion Developer Guide

POCD

oc

um

en

tati

on

/Dev

elo

per

Gu

ides

Blo

gs/O

TN

/Tw

itte

r/A

DF

Co

mm

un

ity

Ev

en

ts/U

ser

Gro

up

s/C

om

mu

nit

y

Code Corner

On

lin

e r

eso

urc

es/t

uto

ria

ls/v

ideo

s

Q U E S T I O N S

A N S W E R S&