javazone_adf

download javazone_adf

of 64

Transcript of javazone_adf

  • 8/11/2019 javazone_adf

    1/64

    1

  • 8/11/2019 javazone_adf

    2/64

    2

    Oracle ADF: Drag and DropData Binding for J2EE Business Services

    Steve Muench

    Technical Evangelist, Product Manager,Developer, Author

    Oracle Corporation

  • 8/11/2019 javazone_adf

    3/64

    3

    Model / View / Controller Architecture

    Business Service

    Collectionsof ValueObjects

    User Input / Page Flow

    Handling Logic

    Business

    Data

    BusinessObjectsController Layer

    Business Services Layer

    View Layer

    Query Results

    Code

    ModelLayer

    BusinessService

    Interface

  • 8/11/2019 javazone_adf

    4/64

    4

    Data Binding Ties M, V, and C Together

    Business Service

    Collectionsof ValueObjects

    BusinessService

    Interface

    User Input / Page Flow

    Handling Logic

    Business

    Data

    BusinessObjectsController Layer

    Business Services Layer

    View Layer

    Query Results

    Code

    ModelLayer

  • 8/11/2019 javazone_adf

    5/64

    5

    JSR 227: Bindings & Data Controls

    5008,00

    salary

    employeesIter

    UI Control

    Control

    Binding

    IteratorBinding

    BusinessServiceyourDC

    Data

    Control

    Model Layer

  • 8/11/2019 javazone_adf

    6/64

    6

    Control Binding Types

    Value

    Binding

    Action

    Binding

    Range

    Binding

    Attributes

    Binding

    List

    Binding

    Tree

    Binding

    Control

    Binding

  • 8/11/2019 javazone_adf

    7/647

    JSR 227: Bindings & Data Controls

    What is the Model Layer?

    View, Controller, Business Services "Glue"

    Why a Declarative, Standard Approach?

    Saves Repetive Coding

    Enables Visual Design Tools

    JSR 277

    DataBinding

    Layer

    Swing

    UIX/JSF

    JSP

    WebServices

    Toplink

    EJB

    JavaClasses

    BusinessComponents

  • 8/11/2019 javazone_adf

    8/648

    D E M O N S T R A T I O N

    Quick Example of

    Declarative Data Binding

    For JSP and Swing

  • 8/11/2019 javazone_adf

    9/649

    JSR 227 Design Time Environment

  • 8/11/2019 javazone_adf

    10/6410

    D E M O N S T R A T I O N

    Quick Example of

    Data Binding Using

    POJO's Mapped with Toplink

  • 8/11/2019 javazone_adf

    11/6411

    How Does Data Binding Fit IntoYour End-to-End Application Architecture?

    J2EE is Warehouse of Technology Ingredients

    JMS, JDBC, JAXP, SAX, JSP, EJB, Servlets,JAAS, JavaMail, JNDI, JTA, JCA

    J2EE Does Not Prescribe anyEnd-to-End Application Architecture

    What is the Recipe that's Right for Your App?

    When Should You Use Which Technologies?

    Hint: Your Choices Affect Application Performance!

    Each DevelopmentTeamMust:

    Combine Ingredients into a Custom Architecture

    Enforce Use of the Architecture Across Team

  • 8/11/2019 javazone_adf

    12/6412

    J2EE Design Patterns to the Rescue

    Best Practice Techniques

    Improve Performance

    Increase Maintainability

    Avoid Typical Problems

    Application Architecture Ideas

    What To Do In Which Tier

    Which J2EE Technology When?

    Paragraphs Of Text, Diagrams

    Not Ready-to-use Code

  • 8/11/2019 javazone_adf

    13/6413

    J2EE DesignPatterns

    Required for AnyReal-World Application

    Implementing Them Is:

    Time Consuming

    Tedious, Error Prone

    Ongoing Testing,Debuging,Maintenance

    Don't You Have AnApplicationto Finish?

  • 8/11/2019 javazone_adf

    14/64

    14

    J2EE Experts Advice

    Many common problems(beyond those addressed byJ2EE application servers) havebeen solved well by open

    source or commercial packagesand frameworks.

    By adopting an existingsolution, we are free to devoteall our effort to meetingbusiness requirements.

    Page 166

  • 8/11/2019 javazone_adf

    15/64

    15

    Write Your Own, or Off-the-Shelf ?

    Most teams end up

    developing and supportingtheir own app-specific

    frameworks

    Others make the

    investment to learn anduse one or more

    off-the-shelf frameworks

  • 8/11/2019 javazone_adf

    16/64

    16

    Popular Framework-Based Techniques

    Business Service

    Collectionsof ValueObjects

    BusinessService

    Interface

    User Input / Page Flow

    Handling Logic

    Business

    Data

    BusinessObjectsController Layer

    Business Services Layer

    View Layer

    Query Results

    Code

    ModelLayer

    Struts

    JSP + Taglibs

  • 8/11/2019 javazone_adf

    17/64

    17

    Model, Services, Data Access, BusinessObjects Often Hand-Coded

    Business Service

    Collectionsof ValueObjects

    BusinessService

    Interface

    User Input / Page Flow

    Handling Logic

    Business

    Data

    BusinessObjectsController Layer

    Business Services Layer

    View Layer

    Query Results

    Code

    ModelLayer

    Struts

    JSP + Taglibs

    ???

  • 8/11/2019 javazone_adf

    18/64

    18

    Frameworks Can Simplify

    Business Objects

    Persistence

    Queries

    Transaction Management

    Data Access Objects

    Business Services

    Web and Wireless ClientsRich Clients

    Model

    Controller

    Transactional Service Faades

    Business Rules Enforcement

    Client "Data Shaping"

    Coordinating DAO's with BO's

    State Management

    Layered Customization

  • 8/11/2019 javazone_adf

    19/64

    19

    Frameworks Can Simplify

    Interacting with Business Service Methods

    Exposing Business Data to View/Controller Layers Handling Updates Made to Business Data

    Business Services

    Web and Wireless ClientsRich Clients

    Model

    Controller

  • 8/11/2019 javazone_adf

    20/64

    20

    Frameworks Can Simplify

    Business Service Location/Lookup and Pooling

    Handling User Events and Request "Lifecycle"

    Presenting/Internationalizing Messages & Errors

    Page Navigation/Flow

    Business Services

    Web and Wireless ClientsRich Clients

    Model

    Controller

  • 8/11/2019 javazone_adf

    21/64

    21

    Frameworks Can Simplify

    Swing Data Binding

    Efficient 3-Tier Client/Server Communication

    Business Services

    Web and Wireless ClientsRich Clients

    Model

    Controller

  • 8/11/2019 javazone_adf

    22/64

    22

    Over 2000 In-House Application DevelopersGives Us Significant In-House Expertise

    Oracle E-Business Suite Developers are Building

    Complex, Scalable J2EE Business Applications

    With Web, Swing, and Web Services Interfaces Targeting Intranet and Internet Deployment on J2EE

    Using J2EE Design Patterns Frameworks

    To Accelerate Implementation and Save on Testing

  • 8/11/2019 javazone_adf

    23/64

    23

    J2EE Experts Advice for Strong FoundationGiving Most Flexibility, Best Performance

    Lightweight "Inversion of Control" Container

    JavaBean Based Components

    Extending from Framework

    Configured From XML Metadata

    Constructed Using Factories

    Solves Common Problems Once

    Easier to Test Outside theJ2EE Container Environment

    Can Be Repurposed in BothJ2EE Web Tier and EJB Solutions

    O l A li i D l

  • 8/11/2019 javazone_adf

    24/64

    24

    Implements Standard J2EE Best Practices Modular, Lightweight "Inversion of Control" Container

    Model-View-Controller (MVC) Design Pattern

    Focus on The Application, Not The Plumbing

    Consolidation and Evolution of Proven Frameworks

    Oracle Application DevelopmentFramework (ADF)

    Business Services

    Web and Wireless ClientsRich Clients

    Model

    Controller

  • 8/11/2019 javazone_adf

    25/64

    25

    Oracle ADF Design Extensions

    Visual

    WYSIWYG Editors

    UML Modelers

    Structure Pane

    Declarative

    Property Inspector

    XML Metadata

    Synchronized

    Code View & Design View Always Synchronized

    No Separate Generation Step

    Underlying Code Always Accessible

  • 8/11/2019 javazone_adf

    26/64

    26

    ADF Architecture Overview

    Business Services

    Web and Wireless

    ClientsRich Clients

    Model

    Controller

    ADF M d l L E bl Fl ibilit

  • 8/11/2019 javazone_adf

    27/64

    27

    ADF Model Layer Enables Flexibility

    View

    Controller

    Model

    BusinessServices

    Swing / JClient JSP ADF UIX JSF

    Rich Client Web / Wireless

    Struts ADF Controller

    ADF Bindings

    ADF Data Control

    Java

    Classes

    EJBSession

    Beans

    Web

    ServicesADF

    Application Module

    JDBCEJB

    FindersTopLink

    Queries

    ADF

    View ObjectData

    Access

    ADF

    Entity ObjectJava Classes EJB Entity Beans

    TopLink Mapping

    Persistent

    Business

    Objects

    ADFMetadataS

    ervices

  • 8/11/2019 javazone_adf

    28/64

    28

    New Approach to Development

    Select Your Development Approach UML Modeling, Coding, Declarative

    Development

    Select Your Deployment Platform

    Any J2EE Application Server

    Any SQL92 Database

    Select Your Technology Combination

    "My JDeveloper" Technology Scopes

  • 8/11/2019 javazone_adf

    29/64

    29

    Adding, Yet Simplifying Choices

    My JDeveloper

    UML

    HTML

    JSF

    Apache Struts

    EJBs

    ToplinkAnt, JUnit

    CVS

    Oracle 9iAS

    Profiling

    Audit/Metrics

    JSP

    Struts

    UI Project

    Toplink

    Model Project

    TechnologyScopes

    Visual &Declarative

    UML

    Swing, HTML JSP

    JSF

    Apache Struts

    ADF BusinessComponents

    EJBs

    Toplink

    Ant, JUnit

    CVS

    Clearcase

    Oracle SCM

    Oracle 9iAS

    JBoss, WLS

    Profiling

    Audit/Metrics

    ExtensionManager

    CHOICES

  • 8/11/2019 javazone_adf

    30/64

    30

    D E M O N S T R A T I O N

    Quick Example of

    Extension Manager,

    Technology Scopes, andApplication Templates

  • 8/11/2019 javazone_adf

    31/64

    31

    ADF Architecture Overview

    Business Services

    Web and Wireless

    ClientsRich Clients

    Model

    Controller

  • 8/11/2019 javazone_adf

    32/64

    32

    Business Services Layer

    Manages Persistence

    O/R Mapping

    Provides Filtered Views of Data

    Custom Queries

    Encapsulates Business Rules Data Validation

    Business Logic

    Choices of Implementation EJB, ADF Business Components,

    Web Services, Java Classes, TopLink

    Pl i J Cl

  • 8/11/2019 javazone_adf

    33/64

    33

    Plain Java ClassesMapped with Oracle TopLink

    TopLink Provides Architecturefor Object/Relational Persistence

    Sophisticated Out-of-Box Optionsto Map Java Classes to Any Kindsof Tables or XML

    Integrated Mapping Editor

    T Li k D fi C t

  • 8/11/2019 javazone_adf

    34/64

    34

    TopLink: Define CustomFinder Queries

  • 8/11/2019 javazone_adf

    35/64

    35

    Enterprise JavaBeans (EJB)

    Services are EJB Session Beans

    Business Objects are Entity Beans

    Leverage Toplink Mapping for CMP

    Integrated Environment toModel, Code, Test, Debug EJBs

    Productively Develop EJBs

    EJB Module Editor

    Basic Design Patterns Support

    Data Transfer Object

    Session Faade

    EJB Verifier

  • 8/11/2019 javazone_adf

    36/64

    36

    J2EE Web Services

    Web Services UML Modeling TCP Packet Monitor PL/SQL Web Service wizard

    WS-I Compliance tester ADF Data Control Binding Interoperability with .NET

  • 8/11/2019 javazone_adf

    37/64

    37

    ADF Business Components

    Prescriptive Building Blocks for Service-Oriented Apps Transactional Service Faades (ApplicationModule)

    Task-Specific "Data Shaping" Components (ViewObject)

    Business Objects with Rules Enforcement (EntityObject)

    Used by Over 2000 Developers in Oracle Applications For Corporate Developers, VAR's, and ISV's Looking

    to Avoid Writing Their Own J2EE Application Framework for theBusiness Services Layer

    EntityObject

    ViewObject

    ApplicationModule

  • 8/11/2019 javazone_adf

    38/64

    38

    ADF Business Components

    Best-Practice App-Building Infrastructure For:

    Coordinating Data Access Objects with BO's

    Component Metadata (Prompts, Fmt Masks, Properties)

    State Management

    Efficient Remote Client Communication

    Layered Customization

    Use/Test Services as Lightweight Java Classes

    Scalable & Performant with Optimized DB Interaction

    Option to Deploy as EJB Session Beans, Web Services

    Building Business Services with ADF BC

  • 8/11/2019 javazone_adf

    39/64

    39

    Building Business Services with ADF BC

    View

    Controller

    Model

    BusinessServices

    Swing / JClient JSP ADF UIX JSF

    Rich Client Web / Wireless

    Struts ADF Controller

    ADF Bindings

    ADF Data Control

    Data

    Access

    Persistent

    Business

    ObjectsEntityObject

    ViewObject

    ApplicationModule

    PaymentPlanMgmtService

    SlowPayingCustomers

    LatePayments

    Bill PaymentCustomer

  • 8/11/2019 javazone_adf

    40/64

    40

    Business Services Design Time

    UML Modelers, Wizards,Editors

    Database Schema

    ADF Business Components

    Enterprise JavaBeans

    Web Services

    Java Classes

  • 8/11/2019 javazone_adf

    41/64

    41

    Drag and Drop Data Binding

    Data Binding Palette

    Expose any Business Service

    Available to any View

    Create UI components Master/Detail

    Table

    Field, checkbox,

  • 8/11/2019 javazone_adf

    42/64

    42

    ADF Architecture Overview

    Business Services

    Web and Wireless

    ClientsRich Clients

    Model

    Controller

  • 8/11/2019 javazone_adf

    43/64

    43

    UI Development

    Visual editors JSP and HTML

    JavaServer Faces

    ADF UIX

    Swing (ADF JClient)

    Component palette

    Common binding

    Property inspector Structure pane

  • 8/11/2019 javazone_adf

    44/64

    44

    Design and Code Sync

    Design View / Code View Available For All Components

    Two-Way Synchronization

  • 8/11/2019 javazone_adf

    45/64

    45

    ADF JClient

    Rich Client user interface(JFC/Swing)

    WYSIWYG Editor

    Simplified Swing UI Layout

    Best Practices Approach

    UI Debugging

  • 8/11/2019 javazone_adf

    46/64

    46

    JSP Visual Design

    Synchronized JSP Visual Design with

    Code Editor Structure Pane

    Property Inspector

    Data Control/Component Palette

    Integrated with JSTL/EL & Struts

    Taglibs on Component Palette Intuitive tag and EL rendering

    Synchronized with Struts Page Flow

    Universal ADF Databinding

    Java Classes + Toplink

    EJB + TopLink

    Business Components

    Web Services

    Drag and Drop UI Components

  • 8/11/2019 javazone_adf

    47/64

    47

    ADF Faces for JSF

    JavaServer Faces (JSR-127)

    Components Support Variety of Clients

    Web Browsers, Mobile Devices

    Rich Components, Layouts,

    and Render Kits Powerful Runtime Features

    Partial Page Rendering

    Automatic Sorting

    Look and Feel "Skinning"

  • 8/11/2019 javazone_adf

    48/64

    48

    ADF Faces Early Access Release

  • 8/11/2019 javazone_adf

    49/64

    49

  • 8/11/2019 javazone_adf

    50/64

    50

  • 8/11/2019 javazone_adf

    51/64

    51

  • 8/11/2019 javazone_adf

    52/64

    52

  • 8/11/2019 javazone_adf

    53/64

    53

  • 8/11/2019 javazone_adf

    54/64

    54

    D E M O N S T R A T I O N

    Powerful, JSF-CompliantVisual Components

  • 8/11/2019 javazone_adf

    55/64

    55

    ADF Architecture Overview

    Business Services

    Web and Wireless

    ClientsRich Clients

    Model

    Controller

    C t ll

  • 8/11/2019 javazone_adf

    56/64

    56

    Controller

    Handles Page Flow

    Promotes Page Reuse Through Abstraction

    Increase Flexibility And Manageability

    Place For Code Execution

    Programmatic Interaction WithModel Data and Business Service

    Application Support Tasks

    Security

    Input Validation

    State Management

    St t P Fl

  • 8/11/2019 javazone_adf

    57/64

    57

    Struts Page Flow

    Visual Development with the Page Flow Modeler

    Draw the Page Flow

    Synchronized with Struts Xml

    Drilldown to Code & Pages

    Declarative Structure Pane

    Property Inspector

    ADF Data Action

    Handles Model Interaction With Standard Struts Mechanisms

    No Coding Required

  • 8/11/2019 javazone_adf

    58/64

    58

    D E M O N S T R A T I O N

    Struts Page Flow and Approaches

    for Event Handling

    and Page Navigation

    Visual Struts Page Flow

  • 8/11/2019 javazone_adf

    59/64

    59

    Visual Struts Page Flow

    Oracle ADF

  • 8/11/2019 javazone_adf

    60/64

    60

    Oracle ADFEnd-to-End J2EE Framework

    Implements standard J2EE best practices

    Model-View-Controller (MVC) design pattern

    Focus on the application, not the plumbing Consolidation and evolution of previous frameworks

    Business Services

    Web and Wireless ClientsRich Clients

    Model

    Controller

    77

    Oracle Strategy for J2EE Development

  • 8/11/2019 javazone_adf

    61/64

    61

    Oracle Strategy for J2EE Development

    Offer Full-Lifecyle, Visual Development for J2EE

    For Model, View, Controller, and Business Services Add Value Across the Entire Development Spectrum

    With tools to make that visual and productive

    Productivity with Choice

    Use Any Layer of Our Provided Frameworks, or None Tight Application Server Integration

    Best with Oracle, plus Standards-Based Portability

    Continue to Expand Open-Source Tools Support

    Struts, JUnit, Ant are Ones We Support Already Shape, Implement, and Drive Standards

    Participate in and Implement New Specs (like JSF)

    Drive New JSR's to Standardize Other App-Building Interfaces

    Googling for More Information on

  • 8/11/2019 javazone_adf

    62/64

    62

    Googling for More Information onJDeveloper and ADF

    oracle jdeveloper adf

    adf data binding

    adf toy store demo

    dive into adf

    Thank You! For More Information

  • 8/11/2019 javazone_adf

    63/64

    63

    Thank You! For More Information

    http://otn.oracle.com/products/jdev Download the Software

    Read "How To" Articles

    Get Example Source Code

    http://www.oracle.com/forums

    Discussion Forums for Informal Tech Support

    http://radio.weblogs.com/0118231/

    "Dive into BC4J and ADF"

  • 8/11/2019 javazone_adf

    64/64