Oracel ADF Introduction

66
Copyright © 2006 Oracle Corporation

description

Introduction to Oracle ADF, ADF BC, ADF Faces; From Hafiz Technology Systems(http://hafiz-co.ir);

Transcript of Oracel ADF Introduction

Page 1: Oracel ADF Introduction
Page 2: Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

APPLICATION

DEVELOPMENT

FRAMEWORK

Page 3: Oracel ADF Introduction

<Insert Picture Here>

Introduction Oracle ADFFUSION MIDDLEWARE

APPLICATION DEVELOPENT FRAMEWORK

Page 4: Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

Oracle Application Development Framework

Increase productivity & ease-of-use­ Visual and declarative development

­ Takes care of the “plumbing” code

­ Implements best practices

Promote service oriented development­ Re-usable business services

­ Composite applications development

Standards-based­ Java EE, SOA SDO/SCA

End-to-end coverage­ MVC, security, customization

Page 5: Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

Oracle’s Strategic Framework

ADF is used at Oracle for all “next generation” Web User interface­ Fusion Application (CRM, HCM etc.)

­ Middleware components (Enterprise Manager, administration consoles etc)

­ Vertical applications (Insurance, telco, pharma…)

­ WebCenter Spaces and Services

Anyone can use this­ Available to customers and partners as part of the platform

Page 6: Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

Oracle ADF – Common Binding

Page 7: Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

Oracle Fusion Architecture

Page 8: Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

Oracle ADF – The Bigger Picture

Page 9: Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

ADF Faces Rich Client Components

Over 150 components

Ajax enabled

Pluggable look and feel

Accessibility & internationalization

The usual components plus:­ Charts, gantt, geo-map, pivot, calendars, coverflow

Build in advanced functionality:­ Drag and drop framework

­ Dialog and pop-up framework

­ “Active Data” – Dashboards / push updates (comet)

­ Templating and declarative components

Page 10: Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

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 view from business logic

Implement best practices

Easy customization

Page 11: Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

ADF Model – Data Binding

ADF Model­ JSR-227 Data Controls

Service Oriented Interface­ Abstract implementation from clients

­ Loose coupling between services and application

More Reusability­ Discover and share services

More Productivity­ Drag and drop data binding

­ Declarative validation

­ Control hints

Page 12: Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

ADF 11g Build-in Data Controls

• ADF Business Components

• JAVA Class

• EJB

• Web Services

• URL (XML or CSV)

• BAM

• UCM

• BPM TaskList

• Essbase

• Place Holder

• Add your own

Page 13: Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

ADF Controller

An extension to the JSF page flow engine

Define flows of pages and methods

Diagram your process

Build reusable task flows­ In other flows, inside other pages

Advance functionality in a declarative way­ Transaction, initialization, Back button

Page 14: Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

Task Flows – Reusable Page Flows

Page 15: Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

Oracle ADF Mobile

Two approaches:­ ADF Mobile Browser

­ ADF Mobile Client

Extend your existing application

Reuse business services

Same development concepts

Page 16: Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

Excel Spreadsheets connected to Java Business services through ADF binding

Familiar working environment

Connected or disconnected

Leverage business service and security from your application

Oracle Desktop Integration

Page 17: Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

MDS – Layered CustomizationsKey Capabilities:

Common metadata store

Set up personalized content and services for users

Stored as layers on top of base application

Benefits:

Insulates users from updates and patches

Used throughout Oracle stack business processes, business intelligence and applications

1.Base application deployed

2.Onsite branding

3.LOB branding

4.User personalization and more…

Page 18: Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

Authentication and authorization

End to end security­ Business service operations

­ Task flows

­ UI components

Externalized security administration

Sits on top of Oracle Platform Security Services­ Pluggable providers

­ Adaptive access management

ADF Security

Page 19: Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

ADF Security – End-to-end Security

Page 20: Oracel ADF Introduction

<Insert Picture Here>FUSION MIDDLEWAREAPPLICATION DEVELOPENT

FRAMEWORK ADF Business Component

Page 21: Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

Oracle ADF Architecture

Page 22: Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

The Business Service Layer

Manages Persistence­ O/R mapping

­ Queries/DML

Performs Validation­ Data validation

­ Business logic

Choices of implementation­ ADF Business Components, JPA Entities, Web

Services, Java classes

Page 23: Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

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 view from business logic

Implement best practices

Easy customization

Page 24: Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

ADF Business Components Characteristics

Provides data interaction & business logic execution

Maps to a data source

Enable 4GL development­ Declarative and visual development

­ Implemented in metadata

Enables business logic development­ Declarative business rules

­ Pre-defined Java methods for events

Can expose application modules as services

Based on Java and XML

Page 25: Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

Artifacts of ADF Business Components

Page 26: Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

Entity Objects

• Maps to a row in a database table

• Handles insert, update, delete operation

• Define behaviors for attributes

• Can continue validation and business logic

Page 27: Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

Entity Objects – Persist Data

Page 28: Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

Associations

Define a relationship between Eos

Facilitate access to data in related entity objects

May be based on database constrains

May be independent of database constraints

Are used in defining validation and LOV

Consist of a source (master) and a destination (detail) entity

Page 29: Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

View Objects

Represent a query

Are used for joining, filtering, projecting, and sorting business data

Enable you to have a view of data that is specific to one part of your application

Can be constructed from a SQL statement, static values, or populated programmatically

Can also be based on any number of entity objects

Page 30: Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

Using View Objects

Page 31: Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

Using View Objects

Application Modules:

• Contain an active data model that the client uses to interact with view object instances

• Control the connection to the database and keep track of all changes that affect data in the database

• Provide remotely accessible methods to implement application module behavior

• Are easily reused

Page 32: Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

Creating Entity Objects

1. Map to Table 2. Choose/add attributes 3. Set attribute properties

Page 33: Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

Defining Attribute’s Properties Control functionality and

behavior­ Mandatory

­ Default value

­ Refresh on update

­ More

UI Hints – default UI representation­ Label

­ Tooltip

­ Format mask

­ Control type

Page 34: Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

Creating View Objects

1. Define type

2. Define data sources

Page 35: Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

Creating View Objects: Attributes And Settings

3. Choose attributes4. Set attribute’s properties

Page 36: Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

Creating View Objects: SQL Statement

Modify Query if needed

Page 37: Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

View Criteria – Dynamic Where Clause

• Define multiple query conditions

• Apply Selected condition at runtime

• Enables further view object reusability

Page 38: Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

Linking View Objects

Join query­ Define at view object query

­ Can be updatable

Master/Detail­ Define with view links

­ The detail item belongs to the master

Page 39: Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

List of Values

• Define at the attribute level

• Gets list from another view object

• Define type of list and list behavior

Page 40: Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

Defining Data Model for the Application Module

Page 41: Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

ADF Business Components – XML and Java

• ADF BC uses XML metadata to describe the objects

• By default there are no Java files created

• In many cases you don’t need java files

• However if you want more complex logic you’ll put that in a Java file overriding default behavior

• You can create Java files for EO, VO and AM

Page 42: Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

Adding Logic to your Entity Object

• The *Impl file is the one you’ll mostly use

• Then choose which default method to create

• You only need to create the one you want to override

Page 43: Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

Finding Hook-Points

Use Source -> Override Methods to locate an event you want to inject code into

You have access to:­ Set/get for attributes

­ Transaction events

­ Creation/remove events

­ DML events

Similar to Oracle Forms Triggers

Page 44: Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

Access Your Application Module

• AM exposes view Objects, links and default operations on the views

• You can add methods to the AM

• AM is exposed to UI developers in the Data Control Palette

• Drag and drop AM content into your page to build the UI

Page 45: Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

Exposing Your Business Service to Other System

Create SCA/SDO interface to business services declaratively

Automates creation of:­ Java interface – defines the service

­ EJB 3.0 session bean – implements the Java interface

­ WSDL file – describes the service’s operations

­ XML Schema Document (XSD) – defines the service’s data structures

Integration with Oracle’s SOA Suite

Page 46: Oracel ADF Introduction

<Insert Picture Here>FUSION MIDDLEWAREAPPLICATION DEVELOPENT

FRAMEWORK ADF Faces

Page 47: Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

Web User Interface in Oracle ADF

MVC approach to web UI development

Based on JSF – the Java EE Standard MVC framework

Extended capabilities provided by Oracle ADF­ ADF Faces – richer set of JSF components

­ ADF Controller – extended controller with reusable task flows

­ ADF Binding – simpler binding of view and controller to business services

Page 48: Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

Oracle ADF – High Level ArchitectMVC – Model View controller

Page 49: Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

ADF Faces Rich Client Components

Over 150 components

Ajax enabled

Pluggable look and feel

Accessibility & internationalization

The usual components plus:­ Charts, gantt, geo-map, pivot, calendars, coverflow

Build in advanced functionality:­ Drag and drop framework

­ Dialog and pop-up framework

­ “Active Data” – Dashboards / push updates (comet)

­ Templating and declarative components

Page 50: Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

Layout Components

• Arrange your page using areas

• Relative positioning

• Advanced layouts

• Change page layout at runtime

Page 51: Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

Common Components

Page 52: Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

Common Components

Input and output components­ Fields, sliders, selectors

Navigation components­ Links, buttons, menus

List selection components­ Dropdown, LOV, shuttle

Data collection components­ Table, tree, carousel

Others­ Progress bar, calendar

Page 53: Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

Operation Components

• Instead of writing JavaScript

• Validators

• Convertors

• Behaviors

• Drag and drop

• Listeners

• Export

• Print

• More…

Page 54: Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

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

Page 55: Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

Graphs

Page 56: Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

Graphs

• Dial: standard and threshold

• Status Meter: standard and threshold

• LED

Page 57: Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

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

Page 58: Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

Pivot Table

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

• Automatic calculation of subtotals and totals

• Drag and drop pivoting

Page 59: Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

Gantt Chart

Track tasks and resources on a Time

Gantt Chart types­ Project Gantt

­ Scheduling Gantt

­ Resources Gantt

Page 60: Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

Hierarchy Viewer

Hierarchical data representation

Expand/collapse/isolate nodes

Zoom in/out

Change layout

Include ADF Faces components in nodes

Page 61: Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

Declarative Partial Page Rendering (PPR)

Partial Page Rendering:

• Enables redrawing only a portion of a page

• Can be enabled declaratively or programmatically

Page 62: Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

JavaScript API

• Interact with ADF Faces components from client side JavaScript

• Allows you to have a client representation of the component

• Catch events and react on the client side

• Invoke server side events from client side JavaScript code

• As a rule – try to minimize the usage of this feature

Page 63: Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

Templates

• Reusable ADF Faces page that contains place holder for custom page content

• Templates are interpreted at runtime

• Authors can change the template for an existing application without opening the application itself

• Templates can have their own ADF binding file

• Templates may accept parameters for passing information from the inheriting page to the template

Page 64: Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

Declarative Components

• Construct composite components from other components

• Can customize behavior using attributes, methods, and facets

• Package components for reuse in other applications

Page 65: Oracel ADF Introduction

AQ&Q U E S T I O N SA N S W E R S

Page 66: Oracel ADF Introduction