• Nem Talált Eredményt

Web Application Development Using ADF Faces

N/A
N/A
Protected

Academic year: 2023

Ossza meg "Web Application Development Using ADF Faces"

Copied!
36
0
0

Teljes szövegt

(1)

Karsten Schulz

Senior Principal Consultant Oracle Denmark

Web Application Development Using

ADF Faces

(2)

Agenda

 Application Developer Framework (ADF) introduction

 Java Server Faces (JSF) introduction

 Short on ADF Faces

 Using JSF/ADF Faces in a development case

 Q/A

(3)

Challenges Faced when

Building J2EE Applications

Building J2EE applications can be complex.

Development time can be extensive.

Choosing and implementing appropriate design patterns can be overwhelming.

“Do it yourself” applications often repeat existing application code.

A large portion of “do it yourself” code is dedicated to common tasks.

The more code you write, the greater the chance of errors.

An application framework is needed.

(4)

Oracle Application

Development Framework

Reduces the complexity of J2EE development by providing visual and declarative development

Increases development productivity

Less coding, more reuse

Focus on the application, not the “plumbing”

Provides a flexible and extensible environment by allowing multiple technology choices and development styles

Encourages J2EE best practices by implementing standard J2EE design patterns

(5)

Oracle ADF

End-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 Business Services

Web and Wireless Clients Web and Wireless Clients Rich Clients

Rich Clients

Model Model

Controller Controller

(6)

Oracle ADF

Visual and Declarative Development

End-to-end Application Development

J2EE & Services

Visual

WYSIWYG editors

UML modelers

Structure pane

Declarative

Structure pane

Property inspector

Code View/Design View Synchronization

No separate generation step - always synchronized

Underlying code always accessible

(7)

J2EE Architecture (Simplified)

Enterprise JavaBeans ADF Business

Components

Web Services

Business Services Clients

Java Objects

Database

(8)

No Standard API for Client Binding

Enterprise JavaBeans ADF Business

Components

Web Services

Business Services Clients

Java Objects

Database

?

JDBC

(9)

ADF Model

Data Controls

Data Binding

JSR-227: “A Standard Data Binding & Data Access Facility for J2EE”

ServiceWeb

TopLink EJB ClassJava Business Component

Model Model

(10)

ADF Model Architecture

Data control: describes the values and actions defined by the business service

Client Client Bindings Bindings Data Control Data Control Business Service Business Service

Bindings: define how UI components use the

values and actions in the data model

(11)

ADF Model Architecture

Decouples client and business service layers

Client code contains no references to the business service

Better design practice

Code is more maintainable

Architecture can be extended to add more types of business services

(12)

Drag-and-Drop Binding

Data Control Palette

Expose any business service

Available to any client

(13)

ADF – Productivity With Choice

ADF UIX

ADF Bindings ADF Data Control

ADF Business Components Service Object

ADF Business Components Query Object

ADF Business Components Entity Object Swing / JClient

ADF Metadata Services

View Controller

Model Business

Services

Swing / JClient JSP ADF UIX JSF/ADF

FACES

Rich Client Web / Wireless

Struts/JSF

ADF Bindings ADF Data Control

Java Classes

EJB Session

Beans

Web Services ADF Business

Components Service Object

JDBC EJB

Finders TopLink

Queries

ADF Business Components Query Object

Data Access

ADF Business Components Entity Object Java Classes EJB Entity Beans

TopLink Mapping

Persistent Business

Objects

ADF Metadata Services

(14)

JavaServer Faces (JSF)

Overview

Developed through Java Community Process as JSR 127

Nickname : Faces

Goal: Simplify creation of Java Server GUIs

Started: May 2001

First relase: March 2004

Oracle is a primary contributor

(15)

JavaServer Faces (JSF)

Overview - Why JSF?

 So what’s all the fuss about?

 What makes JSF so compelling?

 Why are IBM, Sun and Oracle devoting serious resources to JSF?

 Why another framework?

(16)

JavaServer Faces (JSF)

Overview - Here is why!

JSF brings backing of a standard

specification – JSR 127

(17)

JavaServer Faces (JSF)

Overview

 JSF is a natural evolution of J2EE Web development

Servlet API

JavaServer Pages

Custom Tag Libraries

JSTL

Too low level…

Easier but…scriptlets Not standard…

Again, too low level…

JavaServer Faces

Finally, a comprehensive, standard API for J2EE

Web applications!

JavaServer Faces

(18)

JSF Architecture

HTML render kit

Front ControllerFront Controller

WML render kit

WML render kit

Backend Backend

CodeCode

(19)

JSF Architecture

UIComponent is rendered through Renderer class

Expression Language Value Binding is used to access

managed bean also know as a

"backing bean"

Managed bean accesses J2EE persistence layer

Renderer

UI Component Expr. Language

Managed bean JSF Page

RDBMS

J2EE Persistence Layer / JDBC

(20)

JavaServer Faces (JSF)

Oracle ADF Faces

Built on top of JSF APIs

A large component set >100 different components

Far more advanced and interesting components

Partial-page rendering, etc.

ADF model support out-of-the-box

ADF Faces skins (Look and Feel)

ADF Databinding (JSR 227)

Open Source per January 2006

http://www.oracle.com/technology/products/jdev/ht docs/faq_adffaces_apache.html

(21)

JavaServer Faces (JSF)

Oracle ADF Faces

(22)

JavaServer Faces (JSF)

Oracle ADF Faces

ADF Faces also includes many of the framework features most needed by JSF developers today:

File upload support is integrated at a component level

Client-side validation is automatically derived from Validators and Converters for an improved user experience

A pageFlow scope makes it easier to pass values from one page to another

A new hybrid state saving strategy gives developers the best of both client and server-side state saving

(23)

JSF Architecture with ADF

EL accesses “bindings” object to value bind UI components

ADF “bindings” object is set through ADF Filter in web.xml

Bindings object accesses ADF Binding container, which then accesses DataControl

Business Services provide

access to various data sources

ADF “bindings” Object

ADF Binding

Renderer

UI Component Expr. Language

JSF Page

RDBMS

ADF DataControl

Business Service 1

Business Service 2

Business Service 3

XML URL WS

(24)

JavaServer Faces (JSF)

Oracle ADF Faces – Extend the JSF life cycle

Happens through a registered phase- listener

Hivatkozások

KAPCSOLÓDÓ DOKUMENTUMOK

Income sustainability has been negatively affected by: (1) the cyclical nature of client business, (2) fragmented markets, (3) intense competition among market players,

The electronic control circuit is the element that transposes the signals generated by the data acquisition board and modelled by the virtual application in useful signal, able

- (...) Fourth, where the undertaking which is to discharge public service obligations, in a specific case, is not chosen pursuant to a public procurement procedure which would

The values written to the PWMCHA, PWMCHB and PWMCHC registers (in conjunction with the other PWM registers such as the PWMDT, PWMPD, PWMSEG, PWMGATE registers) define the PWM

Stream Control Transmission Protocol was defined by the Signal Transport (SIGTRAN) work- ing group of the Internet Engineering Task Force (IETF) and besides user data

During flight, the control column and pedal positions manipulated by the pilot are recorded using a video camera and with post processing, data is converted to control surface

Within the scope of the statistical business process and data access services, data protection is a key element, which means the protection of the individual data of data

The links between the control processor and the routing switches of the data network are not used by application processes; there- fore, running application