44
Multi-Client Development with JSF and ADF Faces Jonas Jacobi Oracle JDeveloper - JSF & ADF Faces

Multi-Client Development with JSF and ADF - NYOUG Home

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Multi-Client Development with JSF and ADF - NYOUG Home

Multi-Client Development with JSF and ADF Faces

Jonas JacobiOracle JDeveloper - JSF & ADF Faces

Page 2: Multi-Client Development with JSF and ADF - NYOUG Home

Agenda

JSF Introduction– Why JSF– Architecture– JSF Technology

JSF and Oracle– JDeveloper– ADF Faces– Future

Page 3: Multi-Client Development with JSF and ADF - NYOUG Home

What is JavaServer Faces?

Standard J2EE Web UI frameworkDeveloped through Java Community Process (JCP) as JSR-127, JSR-252Nickname: FacesStarted: May 2001First release: March 2004Oracle is a primary contributor

Page 4: Multi-Client Development with JSF and ADF - NYOUG Home

Role of Faces

Focus on components, not markupAutomatic event and state handlingDesigned to be leveraged by tools

Goal is to simplify J2EE web application development

Page 5: Multi-Client Development with JSF and ADF - NYOUG Home

Evolution of J2EE web tier

Servlets JSP JSF

Each is built on the previous layerProgressive levels of abstractionHigher level programming

Page 6: Multi-Client Development with JSF and ADF - NYOUG Home

JSF Architecture

Abstracts away from HTTP– Developers don’t need to understand request-

response cycleAbstracts away from HTML

– Developers work with components, not markup– Developers don’t need to decode requests

Page 7: Multi-Client Development with JSF and ADF - NYOUG Home

JSF Architecture

HTMLrender kit

Front Controller

Front Controller

WMLrender kit

WMLrender kit

BackendBackendCodeCode

Page 8: Multi-Client Development with JSF and ADF - NYOUG Home

Formal Phases – Initial Request

JSF LIFECYCLE

Restore ViewRestore View

Client / BrowserClient / Browser

RenderRenderResponseResponse

Page 9: Multi-Client Development with JSF and ADF - NYOUG Home

Formal Phases - Postback

JSF LIFECYCLE

Restore ViewRestore View

Client / BrowserClient / Browser

ApplyApplyRequestRequestValuesValues

UpdateUpdateModelModel

InvokeInvokeApplicationApplication

RenderRenderResponseResponse

ProcessProcessValidationValidation

Page 10: Multi-Client Development with JSF and ADF - NYOUG Home

Formal Phases (cont.) - JSP

JSP LIFECYCLE

Servlet Servlet URL parsingURL parsing

Client / BrowserClient / Browser

RenderRenderJSP ResponseJSP Response

Product codeProduct code(state management, (state management,

events, etc.)events, etc.)

Page 11: Multi-Client Development with JSF and ADF - NYOUG Home

JavaServer Faces and JSP

JSF is specified to support JSPBut need not always utilize itCan build your own ViewHandler

JSF JSP support comes with a set of Base UI Component libraries

Core – For application tasksValidation, Datatype conversion

HTML – For rendering basic HTMLInput fields, menus, tables button

Page 12: Multi-Client Development with JSF and ADF - NYOUG Home

JSF vs. Traditional JSP

ApplicationsPages

UI ComponentsMarkup

JavaHttp Requests

Ease of DevelopmentLower Level

Product

UI

Events

Developer

JSFJSFJSPJSP

Page 13: Multi-Client Development with JSF and ADF - NYOUG Home

JSF Components

Basic building blocks of a JSF applicationSimple to complex UI components from a button to a complete pageUses Value Binding to associate Model objectsFully ExtendableComponents include “Helper objects”

– Validators, Converters, PhaseListeners…

Page 14: Multi-Client Development with JSF and ADF - NYOUG Home

JSF Components

The term “JSF Component” generally consists of:UIComponent

– Functionality, definition, or behaviorRenderer

– Handle client side markup– Bundled in RenderKit

UI Component Tag Handler (for JSP)– Allows usage of JSF component in JSP– Associates Renderer with UI Component

Page 15: Multi-Client Development with JSF and ADF - NYOUG Home

JSF Application

A typical JSF application consists of:JSP pages

– With JSF components wrapped as JSP tagsNavigation Model

– Defined in the Faces configuration fileManaged Beans

– Application logicFaces configuration - faces-config.xml

Page 16: Multi-Client Development with JSF and ADF - NYOUG Home

JavaServer Faces - Key Points

Framework for both Corporate Developers and Component Developers

– Simple yet fully extendableFundamental unit is the ComponentBuilt in event and state managementComponent sets can be provided by any vendorCloser to Swing or ASP.Net developmentChoice of UI technology

– Scale up (rich clients)– Scale down (mobile devices)

Page 17: Multi-Client Development with JSF and ADF - NYOUG Home

The Top Three

Component Based model – Markup vs. Components

Consistent Programming Model– JSP & Java

Clear separation of Presentation and Behavior on components

Page 18: Multi-Client Development with JSF and ADF - NYOUG Home

Consistent Programming Model IndustrialIndustrial

J2EEJ2EE Bus. LogicBus. Logic

HTMLHTML RIARIA MobileMobile TelnetTelnet

XMLXML XMLXML

HTMLHTML

Phone/PDAPhone/PDABrowserBrowser

Java Server Faces / JSPJava Server Faces / JSP

Faces RIFaces RI Custom JSF componentsCustom JSF componentsPortalPortal

ASKASK

GatewayGateway

SkinsSkins

Render KitsRender Kits

ComponentsComponents

InterfaceInterface

Page 19: Multi-Client Development with JSF and ADF - NYOUG Home

Demo: JSF potential

Page 20: Multi-Client Development with JSF and ADF - NYOUG Home

Agenda

JSF Introduction– Why JSF– Architecture– JSF Technology

JSF and Oracle– JDeveloper– ADF Faces– Rich Web Clients

Page 21: Multi-Client Development with JSF and ADF - NYOUG Home

Oracle and JSF

JSF Development in JDeveloper 10.1.3– Complete visual development environment

for JSF

Oracle ADF Faces – Oracle’s complementary library of JSF

Components

Page 22: Multi-Client Development with JSF and ADF - NYOUG Home

JSF and JDeveloper 10.1.3JSF Visual Editing

– JSF UI Component visual editing– Provides backend code generation

(double-click)– Mobile WYSIWYG

Page 23: Multi-Client Development with JSF and ADF - NYOUG Home

JSF and JDeveloper 10.1.3

Faces Config Editing Console– Console for productive editing of faces-config.xml

Page 24: Multi-Client Development with JSF and ADF - NYOUG Home

JSF and JDeveloper 10.1.3

JSF Page Flow– Visually design Faces navigation model

Page 25: Multi-Client Development with JSF and ADF - NYOUG Home

JSF and JDeveloper 10.1.3

Declarative data binding – JSR 227– Drag and drop data binding support

Page 26: Multi-Client Development with JSF and ADF - NYOUG Home

ADF Faces - Consistent Programming Model

J2EEJ2EE

HTMLHTML RIARIA MobileMobile TelnetTelnet

IndustrialIndustrial

XMLXML XMLXML

HTMLHTML

ITSITS

Phone/PDAPhone/PDABrowserBrowser

SkinsSkins

Render KitsRender Kits

ComponentsComponents

Java Server Faces / JSPJava Server Faces / JSP

Faces RIFaces RI ADF FacesADF FacesPortalPortal

ASKASK

ASAS

InterfaceInterface

Bus. LogicBus. Logic

Page 27: Multi-Client Development with JSF and ADF - NYOUG Home

Oracle ADF Faces

A set of standard JSF 1.1 componentsRuns on any compliant implementation of JSFOver 100 types of componentsPPR, scrollable and sortable table etc…Rich feature set for customizing applicationsADF model support out-of-the-boxLook and Feel Customization

Page 28: Multi-Client Development with JSF and ADF - NYOUG Home

ADF Faces Components

Accessibility and internationalization support across the boardFramework features e.g. Dialog framework and support for processes

Page 29: Multi-Client Development with JSF and ADF - NYOUG Home

Client-side validation

A major missing feature of JSFADF Faces supports

– Server- and client-side validation/conversion from the same code

– Use standard JSF converters and validators– (But you have to use our input components)

Page 30: Multi-Client Development with JSF and ADF - NYOUG Home

ADF Faces RIA

RIA – Rich Internet ApplicationA Rich Client combining:

– Deployment benefits of a Thin Client application

– Rich interaction of a desktop application

Page 31: Multi-Client Development with JSF and ADF - NYOUG Home

ADF Faces RIA

Rich Internet JSF componentsLeveraging “Ajax” technologiesJSF components with live updates in the BrowserPopup menus,Trees, Splitters etc…

Page 32: Multi-Client Development with JSF and ADF - NYOUG Home

ADF Faces Mobile: Supported Devices• Currently certified platforms

– Windows Mobile 2003 (Pocket PC)– Palm Web Browser 3.0– Access NetFront 3.0/3.1

• Minimum browser requirements for other platforms

– HTML 4.0– JavaScript 1.1– CSS Level 2

Page 33: Multi-Client Development with JSF and ADF - NYOUG Home

PDA Support- Future Direction

• Certification of more device platforms• Opera browser• Blazer• Blackberry• iMode

• Mobile Rich Client renderers• Device Peripheral Integration Framework

• Magnetic Swipe Cards• Barcode readers• RFID readers/writers

Page 34: Multi-Client Development with JSF and ADF - NYOUG Home

J2EE Container

ADF Faces Mobile Architecture

ADF FacesADF FacesApplicationsApplications

IndustrialTelnet Server

(ResourceAdapter)

Ask Server (Resource Adapter)

SMS, IM, Pager, Email

telnet

Request

Request

HTTP

ADF RuntimeADF Runtime

Wireless Renderer Kits

Agent Detection

Device Repository

HTTP

View Handler Impl

Page 35: Multi-Client Development with JSF and ADF - NYOUG Home

ADF Faces Mobile - Telnet Support

ADF Telnet Render Kit provides:– ~ 35 core ADF Faces components

Configuration– ITS configured with an “entry point” URI of the first

page of the JSF application.

Page 36: Multi-Client Development with JSF and ADF - NYOUG Home

What is Ask – Ask information

1. Send Request1. Send Request

2. Receive Information2. Receive Information

3. Send Request3. Send Request

4. Receive Information4. Receive Information

EnterpriseApplications

To: [email protected]: parts

AS0543 Qty: 40AS0922 Qty: 5AS3982 Qty: 29AS9284 Qty: 0

Interact with your application through e-mail interface, pager, SMS or Instant MessagingAsynchronous access not dependent on persistent wireless connectivity

Page 37: Multi-Client Development with JSF and ADF - NYOUG Home

Multi-client development

Page 38: Multi-Client Development with JSF and ADF - NYOUG Home

Mobile development in JDeveloper

WYSIWYG editing for PDA and telnet applicationsComponent filtering based on device classesDevice-specific view portCapability-based content filtering wizardMobile simulator registration and integrationDeployment packaging wizardASK design-time support in future release

Page 39: Multi-Client Development with JSF and ADF - NYOUG Home

JDeveloper Differentiators

We are the only J2EE tools vendor with JSF Wireless design time support.

Page 40: Multi-Client Development with JSF and ADF - NYOUG Home

JDeveloper Mobile: Telnet Design-Time Support

Page 41: Multi-Client Development with JSF and ADF - NYOUG Home

Documentation

Page 42: Multi-Client Development with JSF and ADF - NYOUG Home

JSF Web Resources

Oracle Technology Network JSF Resourceshttp://otn.oracle.com/jsf

JSF Reference Implementationhttp://java.sun.com/j2ee/javaserverfaces/

JSF Central – Most Popular Online JSF Community

http://jsfcentral.com

Page 43: Multi-Client Development with JSF and ADF - NYOUG Home

Summary

Think components, not markupNot just for HTMLPlenty of opportunities for all skill levels

Page 44: Multi-Client Development with JSF and ADF - NYOUG Home

Q U E S T I O N SQ U E S T I O N SA N S W E R SA N S W E R S