Oracel ADF Introduction

Post on 19-Jun-2015

399 views 0 download

Tags:

description

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

Transcript of Oracel ADF Introduction

Copyright © 2006 Oracle Corporation

APPLICATION

DEVELOPMENT

FRAMEWORK

<Insert Picture Here>

Introduction Oracle ADFFUSION MIDDLEWARE

APPLICATION DEVELOPENT FRAMEWORK

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

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

Copyright © 2006 Oracle Corporation

Oracle ADF – Common Binding

Copyright © 2006 Oracle Corporation

Oracle Fusion Architecture

Copyright © 2006 Oracle Corporation

Oracle ADF – The Bigger Picture

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

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

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

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

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

Copyright © 2006 Oracle Corporation

Task Flows – Reusable Page Flows

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

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

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…

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

Copyright © 2006 Oracle Corporation

ADF Security – End-to-end Security

<Insert Picture Here>FUSION MIDDLEWAREAPPLICATION DEVELOPENT

FRAMEWORK ADF Business Component

Copyright © 2006 Oracle Corporation

Oracle ADF Architecture

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

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

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

Copyright © 2006 Oracle Corporation

Artifacts of ADF Business Components

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

Copyright © 2006 Oracle Corporation

Entity Objects – Persist Data

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

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

Copyright © 2006 Oracle Corporation

Using View Objects

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

Copyright © 2006 Oracle Corporation

Creating Entity Objects

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

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

Copyright © 2006 Oracle Corporation

Creating View Objects

1. Define type

2. Define data sources

Copyright © 2006 Oracle Corporation

Creating View Objects: Attributes And Settings

3. Choose attributes4. Set attribute’s properties

Copyright © 2006 Oracle Corporation

Creating View Objects: SQL Statement

Modify Query if needed

Copyright © 2006 Oracle Corporation

View Criteria – Dynamic Where Clause

• Define multiple query conditions

• Apply Selected condition at runtime

• Enables further view object reusability

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

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

Copyright © 2006 Oracle Corporation

Defining Data Model for the Application Module

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

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

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

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

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

<Insert Picture Here>FUSION MIDDLEWAREAPPLICATION DEVELOPENT

FRAMEWORK ADF Faces

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

Copyright © 2006 Oracle Corporation

Oracle ADF – High Level ArchitectMVC – Model View controller

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

Copyright © 2006 Oracle Corporation

Layout Components

• Arrange your page using areas

• Relative positioning

• Advanced layouts

• Change page layout at runtime

Copyright © 2006 Oracle Corporation

Common Components

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

Copyright © 2006 Oracle Corporation

Operation Components

• Instead of writing JavaScript

• Validators

• Convertors

• Behaviors

• Drag and drop

• Listeners

• Export

• Print

• More…

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

Copyright © 2006 Oracle Corporation

Graphs

Copyright © 2006 Oracle Corporation

Graphs

• Dial: standard and threshold

• Status Meter: standard and threshold

• LED

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

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

Copyright © 2006 Oracle Corporation

Gantt Chart

Track tasks and resources on a Time

Gantt Chart types­ Project Gantt

­ Scheduling Gantt

­ Resources Gantt

Copyright © 2006 Oracle Corporation

Hierarchy Viewer

Hierarchical data representation

Expand/collapse/isolate nodes

Zoom in/out

Change layout

Include ADF Faces components in nodes

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

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

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

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

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