An Oracle ADF Introduction

41
Powerful Enterprise Rich Internet Application Development with ADF An Oracle Application Development Framework Introduction

Transcript of An Oracle ADF Introduction

Page 1: An Oracle ADF Introduction

Powerful Enterprise Rich Internet Application

Development with ADFAn Oracle Application Development Framework Introduction

Page 2: An Oracle ADF Introduction

Jean-Marc DesvauxHead of Information Systems

GENERAL CONSTRUCTION CO.LTD

@jmdesvaux

Page 3: An Oracle ADF Introduction

What is Oracle ADF ?

Page 4: An Oracle ADF Introduction

Common Enterprise Web App

Architecture

CLIENT(Browser or Mobile App or

Web Service consumer)

Web Tier(HTTP Server/SSO Agent/.. )

Business Tier / App Server(JEE server/ASP.NET server/..)

Data Store/Data services Tier(RDBMS/NoSQL Databases/Web Services/..)

ADF technology footprint on both theServer side (App server) and on the Client side

Page 5: An Oracle ADF Introduction

ADF is a Java EE Framework implementing an MVC architectural pattern with the support of an Integrated Development

Environment (IDE)

Page 6: An Oracle ADF Introduction

A Framework is a structure intended to serve as a support or guide for the building of something that expands the structure into something useful.

Use those blocks, don’t redesign and rebuild them each time

Page 7: An Oracle ADF Introduction

The MVC Pattern (Model View Controller) separates the implementation of the :

-UI (View)Interface, Adaptive Rendering, Skinning/Look&Feel

-Application Flow & business logicbetween UI and Data (Controller)

Event handling, page navigation/flow

-Data (Model)ORM, Operations, Validation

There are many frameworks out therefor each layer to help implement them

Typically

JavaScriptHTML

---------

ControllerServlet

----------

Java(EJB,JPA,Hibernate,Spring)

Page 8: An Oracle ADF Introduction

MVC Architecture can be complex and requires heavy background work to :

- Standardize design and coding- Design for Reusability- Control code quality to prevent anti-patterns (not compliant

with pattern, coding in wrong place)- Master each MVC layer sub-frameworks

Page 9: An Oracle ADF Introduction

The ADF value :

Coupled with an IDE (Jdeveloper or Eclipse+OEPE), It brings together for you a number of standards & sub-frameworks which it extends to provide an end-to-end, metadata-driven frameworkto help you build Business Applications with more productivity,

quality and ease of maintenance.

It is sometimes qualified as a meta-framework

Page 10: An Oracle ADF Introduction

The MVC Pattern the ADF way:

View: ADF FacesBased on JSF Standard. JavaScript & Ajax based components, latest components set known as Alta UI

Controller : ADF Faces ControllerExtending JSF (2.0) to improve capabilities,Task flows concepts to go beyond pages flow controls.

Model : ADF BC (Business Services)Defines objects that map to database tables (ORM), manage data & business logic validation, coordinates M/D,provides default operations (commit, delete, insert, update)

ADF Model (Bindings)Abstract the Business service attributes and actions implementation to the View layer. The Glue between the View and the Business services

ADF Faces

---------

ADF Controller

----------ADF Model----------

ADFBC

Page 11: An Oracle ADF Introduction

ADF BC(Business Components)

Page 12: An Oracle ADF Introduction

ADF BC

APPLICATION MODULE(S)View Objects Instances & Transaction Container

(Each defines the Transaction boundary for committing or rollback)

SERVICEApplicationModuleImpl class (access & manage VOs, custom method/oper)

VIEW OBJECTS & View LinksApplication-specific view of records queried into Entity Objects,

View Links define relationships between View Objects

EO EXPOSUREViewObjectImpl (execute query,..), ViewRowImpl classes (set attrib.)

ENTITY OBJECTS & AssociationsMapped Database Data Model (Object-Relational Mapping), data types mapping

Associations define relationships between Entities Objects, Act as DB records Cache

CACHEEntityImpl class (create(), remove(), do_DML(),..)

One runtime instance for each EO, VO or AM; You can hook into these classes to add custom code

Page 13: An Oracle ADF Introduction

Adding Business components to a new Application (choosing to create from Tables)

You will be prompted to enter a database connection configuration &

once connected you will be driven by a wizard to quickly create your

business components.

Once completed, you will create an Application Module by selecting the Business components to be used by

your Application

Page 14: An Oracle ADF Introduction

ADF Model

Page 15: An Oracle ADF Introduction

BINDINGSCreated on Drag and drop from Data Control Panel onto a Page.

Types (Depending on UI Component) : Attribute, Tree, Action, Method, List BindingsUI components reference the binding using Expression Language (EL)

DATA CONTROLSAbstraction of Business Service (XML definitions of the Service)

DC created automatically when you create Business Components in ADFExposed in the IDE via the Data Control Panel

ADF MODELThe “glue” between the View Layer and the Business services

Business Services exposed consistently and UI components capable of binding to this Business Service Abstraction.

UI does not depend on how the Business Service is implemented.

Page 16: An Oracle ADF Introduction

Drag &Drop

ADF Bindings creation thru drag & drop

Page 17: An Oracle ADF Introduction

ADF Bindings View in JDeveloperthru the page editor bindings tab.

An Executable is an Iterator (pointer) to the current data object, basically bindings using the same iterator will refer to the same row of the data control exposed in a

Collection Object (Table).You can also add, delete or edit the bindings

Page 18: An Oracle ADF Introduction

Recapitulationso far

Page 19: An Oracle ADF Introduction

Business ServicesADF Page

#{Binding Expression}for a page component (text

item, button,..) referencing a value or action or Iterator

binding using EL (Expression Language)

ADF Model(Binding Context)

Binding Container

Action bindings

Value bindings

iterator bindings

Data Control

Data Control

ADF BC Application

Module

EJBSession

Bean

Page 20: An Oracle ADF Introduction

ADF View

Page 21: An Oracle ADF Introduction

ADF FACES

- Oracle’s offering of JSF components- Provides Visual UI components (Input Text, button,..)- Provides Layout components (to organize application page real-

estate utilisation)- Provides Drag & drop, popup dialogs, page templates,…

- Developer works with components & is protected from components implementation details=> future-proofing of the component used :

>New display devices, evolution of markup languages

Page 22: An Oracle ADF Introduction

ADF FACES

- UI specific code in managed beans (java classes managed by JSF)- EL (Expression Language) allowing UI component to

refer to a java bean associated with the applicationEx : #{mybean.myValue} for managed bean mybean & a

call to getMyValue() accessor in the bean.- EL is mainly to hook up UI components to the framework

class that implements the binding to the business service

Page 23: An Oracle ADF Introduction

ADF FACESJDeveloper Editor UI

Page 24: An Oracle ADF Introduction

ADF FACES

Page 25: An Oracle ADF Introduction

ADF FACES – Alta UI components

Page 26: An Oracle ADF Introduction

ADF Controller

Page 27: An Oracle ADF Introduction

ADF Controller

- Navigation Cases (Application Flow)- Page Life Cycle enriched- Task Flows- Regions- Page fragments- Popups- Partial Page Rendering

Page 28: An Oracle ADF Introduction

ADF Task Flows

- Unbounded Task FlowAny page in the TF can be accessed directly

- Bounded Task FlowReusable flow that can be referenced by

any other Task Flow, bounded or not. Can receive and return Parameters.

Task Flow are a set of Activities with a defined flowbetween each Activity, called a control flow

Activities can be a View (Page), a Method Call, a Router activity (conditional flow routing), a Task Flow Call.

Instead of pages, we can create TF with page fragments which can be displayed in a page Region

Page 29: An Oracle ADF Introduction

ADF IN ACTION

Page 30: An Oracle ADF Introduction

Creating a simple ADF application in 10mns

Data exposed in this sample is not real and is for test purpose only

Page 31: An Oracle ADF Introduction

GCC WEB APPS

Page 32: An Oracle ADF Introduction

SINGLE ORACLE DATABASE INSTANCE

GCC Information Eco-systemAcross Project or for a specific Project only

Page 33: An Oracle ADF Introduction

Requirements

• Ensure continuous Development to keep adding value to the business

• Growth intention : more modules as we go• Foundation for sustainable App development• Be able to move slowly from one version to another and

have in transition periods coexistence of different Framework versions

• Grasp Framework enhancements in new versions to add value globally to all Apps with minimum impact and with progressive updates of our Apps

• Protect Development Investment

Page 34: An Oracle ADF Introduction

Requirements

• Be able to enable Apps services to any new Project as from day one.

• Frequent Access Control reviews as and when new Projects are allocated to GCC and resources are reallocated from one project to another with different Job roles/functions.

• Be able to achieve fine-grained security for who can do what on each specific Project.

• Drive Security declaratively thru a specific App

Page 35: An Oracle ADF Introduction

GCC Apps Infrastructure

Page 36: An Oracle ADF Introduction

GCC Apps Main Menufor Project-Centric Applications

Module Access and fine-grained security driven by Project & App User

Page 37: An Oracle ADF Introduction

GCC Apps Navigation Panel & Page Templatefor Project-Centric Applications

Page 38: An Oracle ADF Introduction

App with Alta skin Modernizing with new skins and new Components

Page 39: An Oracle ADF Introduction

GCC Apps Responsiveness Sample

Data exposed in this sample is not real and is for test purpose only

Page 40: An Oracle ADF Introduction

It was maybe a bit condensed but it was hard to give you a good insight without going through

this minimum information.

Hope you’ve managed to grab something & that you enjoyed it…

Page 41: An Oracle ADF Introduction

Resources to start with ADF

https://www.youtube.com/user/ADFInsiderEssentials

https://www.youtube.com/user/adfarchtv

http://www.oracle.com/technetwork/developer-tools/adf/overview/index.html

Insider Essentials & Architecture TV YouTube channels

Oracle Technology Network ADF section