Ajax and JSF: Natural Synergy

Similar documents
Improve and Expand JavaServer Faces Technology with JBoss Seam

JSF 2.0: Insight and Opinion

JavaServer Faces Technology, AJAX, and Portlets: It s Easy if You Know How!

JSF 2.0: Insight and Opinion

An update on the latest strategies for building Ajax applications with JavaServer Faces

Java EE 6: Develop Web Applications with JSF

Oracle Developer Day

Best Practices for JSF Portlet Migration and Development

Contents at a Glance

What is it? What does it do?

Copyright 2013, Oracle and/or its affiliates. All rights reserved.

Developing Applications with Java EE 6 on WebLogic Server 12c

Oracle Fusion Middleware 11g: Build Applications with ADF I

Seam 3. Pete Muir JBoss, a Division of Red Hat

Mastering JavaServer Faces

Oracle Application Development Framework Overview

IBM Rational Application Developer for WebSphere Software, Version 7.0

Tooling for Ajax-Based Development. Craig R. McClanahan Senior Staff Engineer Sun Microsystems, Inc.

Oracle Fusion Middleware 11g: Build Applications with ADF I

Portlets and Ajax: Building More Dynamic Web Apps

<Insert Picture Here> Advanced ADF Faces. Frank Nimphius Principal Product Manager

Case Study: Big Lots Store Inventory Management

Services Interoperability With Java Technology and.net: Technologies for Web 2.0

Oracle Developer Day

Comparing Java Web Frameworks

Contents. 1. JSF overview. 2. JSF example

GWT and jmaki: Expanding the GWT Universe. Carla Mott, Staff Engineer, Sun Microsystems Greg Murray, Ajax Architect, Sun Microsystems

<Insert Picture Here> Accelerated Java EE Development: The Oracle Way

Delivering Rich Internet Applications with Ajax4jsf

Shale and the Java Persistence Architecture. Craig McClanahan Gary Van Matre. ApacheCon US 2006 Austin, TX

"Web Age Speaks!" Webinar Series

1 Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Specialized - Mastering JEE 7 Web Application Development

Oracle Developer Day

Happy Birthday, Ajax4jsf! A Progress Report

Oracle - Developing Applications for the Java EE 7 Platform Ed 1 (Training On Demand)

Oracle ADF: The technology behind project fusion. Lynn Munsinger Principal Product Manager Application Development Tools Oracle Corporation

Introduction to Web Application Development Using JEE, Frameworks, Web Services and AJAX

PGT T3CHNOLOGY SCOUTING. Google Webtoolkit. JSF done right?

What's New in the Servlet and JavaServer Pages Technologies?

JBoss Web Framework Kit 1.0 Release Notes

Java EE 6 - Update Harpreet Singh GlassFish Portfolio Product Manager

1 Markus Eisele, Insurance - Strategic IT-Architecture

At present we use several collaboration (web) tools, like SuperB website Wiki SVN Document management system etc.

Migrating traditional Java EE applications to mobile

Proposal for dynamic configuration

Oracle Fusion Middleware 11g: Build Applications with ADF Accel

Seam & Web Beans. Pete Muir JBoss, a division of Red Hat.

Overview. Principal Product Manager Oracle JDeveloper & Oracle ADF

If you wish to make an improved product, you must already be engaged in making an inferior one.

Jakarta Struts: An MVC Framework

AJAX in Apache MyFaces A New Approach To Web Applications

Metawidget UI Generation done right

Building the Enterprise

A Red Hat Perspective

Etanova Enterprise Solutions

What s new in Spring Web Flow 2.0

Oracle Corporation

Rails powered by GlassFish & jmaki

Hands-on Development of Web Applications with Java EE 6

Java- EE Web Application Development with Enterprise JavaBeans and Web Services

Courses For Event Java Advanced Summer Training 2018

SOFTWARE DEVELOPMENT SERVICES WEB APPLICATION PORTAL (WAP) TRAINING. Intuit 2007

Building JavaServer Faces Applications

A Closer Look at XPages in IBM Lotus Domino Designer 8.5 Ray Chan Advisory I/T Specialist Lotus, IBM Software Group

Breaking Apart the Monolith with Modularity and Microservices CON3127

Entando Technology Drill Down

Getting Started Guide. Version 1.7

COURSE 9 DESIGN PATTERNS

Tools to Develop New Linux Applications

IBM Rational Developer for System z Version 7.5

Enterprise Java Unit 1-Chapter 2 Prof. Sujata Rizal Java EE 6 Architecture, Server and Containers

Java Community Process Program: State of the Community State of the Community December 2003

1 Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Portlet Standard JSR 168 / JSR 286

Distributed Multitiered Application

Spring Web Flow: Enabling High Level, Low Effort Web Conversations

New Face of z/os Communications Server: V2R1 Configuration Assistant

Web Application Development Using Spring, Hibernate and JPA

Seam. Pete Muir JBoss, a Division of Red Hat.

Eclipse Java Ejb 3.0 Tutorial For Beginners With Examples Pdf

JSF: Introduction, Installation, and Setup

jmaki Overview Sang Shin Java Technology Architect Sun Microsystems, Inc.

DESIGN AND IMPLEMENTATION OF SAGE DISPLAY CONTROLLER PROJECT

Java EE 5 Development for WebSphere Application Server V7

JSF Tools Reference Guide. Version: beta1

Peter Norrhall. Callista Enterprise AB.

JSR-286: Portlet Specification 2.0

The JSF Tools Project

Performance evaluation of J2EE

Socket attaches to a Ratchet. 2) Bridge Decouple an abstraction from its implementation so that the two can vary independently.

J2EE Interview Questions

Introduction to Java Server Faces(JSF)

In the most general sense, a server is a program that provides information

JavaEE Interview Prep

Adobe ColdFusion (2016 release)

Introduction to Seam. Pete Muir. JBoss, a division of Red Hat

JVA-163. Enterprise JavaBeans

Adding Telephony to Java Technology-Based Enterprise Applications

Red Hat Developer Studio 12.0

Transcription:

Ajax and JSF: Natural Synergy Kito D. Mann, Principal Consultant TS-6482

Learn how JSF transparently supports Ajax development. 2008 JavaOne SM Conference java.sun.com/javaone 2

Kito D. Mann Virtua, Inc Training, consulting, architecture, mentoring, JSF product development Author, JavaServer Faces in Action Founder, JSF Central http://www.jsfcentral.com Internationally recognized speaker JavaOne, JavaZone, Javapolis, NFJS, etc. JCP Member JSF 2.0, WebBeans, Design-Time API for JavaBeans, Design-Time Metadata for JavaServer Faces Components, Portlets 2.0 2008 JavaOne SM Conference java.sun.com/javaone 3

Agenda JavaServer Faces from 1,000 feet Ajaxian Faces Sprinkling on some Ajax Ajax inside Ajax on the outside Which one? Rolling your own Future directions Summary Q&A 2008 JavaOne SM Conference java.sun.com/javaone 4 4

Agenda JavaServer Faces from 1,000 feet Ajaxian Faces Sprinkling on some Ajax Ajax inside Ajax on the outside Which one? Rolling your own Future directions Summary Q&A 2008 JavaOne SM Conference java.sun.com/javaone 5

What is JavaServer Faces? Standard web user interface (UI) framework for Java JSF 1.0/1.1: Standardized through Java Community Process (JCP) in 2004 (JSR 127) JSF 1.2: Standardized through JCP in 2006 (JSR 252) Part of Java EE 5.0 2008 JavaOne SM Conference java.sun.com/javaone 6

What is JavaServer Faces? Specification consists of: Server side UI component and event model Set of basic UI components Basic application infrastructure Can automatically synchronize UI components with application objects Includes basic Dependency Injection container 2008 JavaOne SM Conference java.sun.com/javaone 7

What is JavaServer Faces? Extensive tool support Sun, Oracle, IBM, BEA, Exadel, Borland, JetBrains, Genuitec, others Enables RAD-style approach to Java web development Facilitates third-party UI component market Built on top of Servlet API Works with JSP, but does not require it 2008 JavaOne SM Conference java.sun.com/javaone 8

JSF and Struts 2008 JavaOne SM Conference java.sun.com/javaone 9

What is Java Server Faces? JSF Application Architecture 2008 JavaOne SM Conference java.sun.com/javaone 10

The IDE Effect Designed to facilitate easy-to-use IDE integration Since JSF is a standard, vendors more likely to create tools All major IDE vendors support JSF Level and style varies Caveat: Generated artifacts Does not require tools 2008 JavaOne SM Conference java.sun.com/javaone 11

JSF Programming Model 2008 JavaOne SM Conference java.sun.com/javaone 12

The Request Processing Lifecycle 2008 JavaOne SM Conference java.sun.com/javaone 13

Pluggable Extension Points ELResolver ViewHandler NavigationHandler ActionListener StateManager RenderKits 2008 JavaOne SM Conference java.sun.com/javaone 14

Agenda JavaServer Faces from 1,000 feet Ajaxian Faces Sprinkling on some Ajax Ajax inside Ajax on the outside Which one? Rolling your own Future directions Summary Q&A 2008 JavaOne SM Conference java.sun.com/javaone 15

Ajaxian Faces JSF s architecture makes it easy to add Ajax support Components and renderers can be separate PhaseListeners can modify request processing Can also use either a Filter or a separate Servlet Pluggable classes can be used to change behavior Enables transparent Ajax support Same programming model with or without Ajax 2008 JavaOne SM Conference java.sun.com/javaone 16

Ajaxian Faces JavaScript Bridge sends request PhaseListener sends changes JavaScript Bridge updates page 2008 JavaOne SM Conference java.sun.com/javaone 17

Ajaxian Faces Ajax-enabled UI components may not be compatible with each other No standard for: JavaScript Bridge Determining which components to update Resource resolution 2008 JavaOne SM Conference java.sun.com/javaone 18

Agenda JavaServer Faces from 1,000 feet Ajaxian Faces Sprinkling on some Ajax Ajax inside Ajax on the outside Which one? Rolling your own Future directions Summary Q&A 2008 JavaOne SM Conference java.sun.com/javaone 19

Sprinkling on some Ajax Add Ajax to ordinary JSF components Specify specific zones or components that need to be refreshed JSF event listeners executed asynchronously Examples: JBoss RichFaces (formerly Ajax4jsf) AjaxAnywhere DynaFaces Ajax support in MyFaces Sandbox 2008 JavaOne SM Conference java.sun.com/javaone 20

JBoss RichFaces (Ajax4Jsf) Adds Ajax support to any JSF view Features: Can add Ajax support to any JSF component with JavaScript events Can define regions of the page (or entire page) that can be updated via Ajax ActionListeners and ValueChangeListeners invoked via Ajax Also features AjaxListeners Also has a suite of components 2008 JavaOne SM Conference java.sun.com/javaone 21

RichFaces 2008 JavaOne SM Conference java.sun.com/javaone 22

Demo Ajax4Jsf 2008 JavaOne SM Conference java.sun.com/javaone 23

Ajax Inside Most JSF UI component libraries integrate Ajax support Have their own JavaScript and server layers Examples: Simplica ECruiser Ajax Suite for JSF Infragistics NetAdvantage for JSF JBoss RichFaces ICEsoft ICEfaces TeamDev QuipuKit Backbase Java Edition Sun Project Woodstock Apache MyFaces Trinidad 2008 JavaOne SM Conference java.sun.com/javaone 24

ECruiser Ajax Suite for JSF Suite of basic JSF components DataTable, GridTable, Tree, Tab, Menu, etc. Integrated Ajax support Lazy loading of data sets Full set of Ajax-aware basic input components Ability to execute any backing bean method for JavaScript events 2008 JavaOne SM Conference java.sun.com/javaone 25

Demo ECruiser Ajax Suite for JSF 2008 JavaOne SM Conference java.sun.com/javaone 26

ICEsoft ICEfaces Innovative take on Ajax browser/server integration Direct-to-DOM: maintains copy of DOM on server which is synchronized with DOM on the client Sends only changes when the page changes Requires a persistent connection between client and server Supports Ajax Push/Comet 2008 JavaOne SM Conference java.sun.com/javaone 27

ICEsoft ICEfaces Three elements: Framework Custom ViewHandler, ResponseWriter, and RenderKit Custom Servlet for blocking requests Client-side JavaScript Ajax bridge Component suite Chart, Data Table, DynamicImage, Collapsable Panel, Modal Popups, Tabs, TreeTable, Input controls 2008 JavaOne SM Conference java.sun.com/javaone 28

ICEsoft ICEfaces 2008 JavaOne SM Conference java.sun.com/javaone 29

Demo ICEsoft ICEfaces 2008 JavaOne SM Conference java.sun.com/javaone 30

Infragistics NetAdvantage for JSF Suite of bread-and-butter components: Tree, Table, Menu, Tabs, MenuBar, Input controls Full Ajax support Dynamic loading of data sets Updating part of the page with a selection All components can send Ajax requests and update other components dynamically 2008 JavaOne SM Conference java.sun.com/javaone 31

Demo NetAdvantage for JSF 2008 JavaOne SM Conference java.sun.com/javaone 32

Agenda JavaServer Faces from 1,000 feet Ajaxian Faces Sprinkling on some Ajax Ajax inside Ajax on the outside Which one? Rolling your own Future directions Summary Q&A 2008 JavaOne SM Conference java.sun.com/javaone 33

Ajax on the outside What about all of those great pure Ajax widgets? Wrap them with JSF components Examples: jmaki YUI4JSF DojoFaces Mojarra Scales 2008 JavaOne SM Conference java.sun.com/javaone 34

jmaki Provides wrappers for popular Ajax widgets Common interface and data model for different libraries Supports widgets from: Dojo, Yahoo!, Flickr, Google Not as tightly integrated with JSF as other solutions 2008 JavaOne SM Conference java.sun.com/javaone 35

jmaki Easy to create new widgets 2008 JavaOne SM Conference java.sun.com/javaone 36

jmaki 37 Virtua, Inc 2005-2007. Unauthorized 2008 JavaOne SM Conference java.sun.com/javaone 37

Demo jmaki 2008 JavaOne SM Conference java.sun.com/javaone 38

Agenda JavaServer Faces from 1,000 feet Ajaxian Faces Sprinkling on some Ajax Ajax inside Ajax on the outside Which one? Rolling your own Future directions Summary Q&A 2008 JavaOne SM Conference java.sun.com/javaone 39

Which one? Pick a component suite Tight integration with JSF No incompatibility problems within the same suite Well documented and supported Choose as few as possible (preferably just one) How much Ajax do you need? Other suites (such as WebGalileo Faces and Apache MyFaces Tomahawk have some Ajax support as well) 2008 JavaOne SM Conference java.sun.com/javaone 40

Which one? To add support to existing JSF components Use RichFaces/Ajax4Jsf Works well with Apache MyFaces Tomahawk If you need Ajax push, choose ICEfaces Well documented Open Source Enterprise addition provides support and enhanced scalability Use jmaki for eye candy or Web 2.0 components Don t forget tools support! 2008 JavaOne SM Conference java.sun.com/javaone 41

Agenda JavaServer Faces from 1,000 feet Ajaxian Faces Sprinkling on some Ajax Ajax inside Ajax on the outside Which one? Rolling your own Future directions Summary Q&A 2008 JavaOne SM Conference java.sun.com/javaone 42

Rolling Your Own Loose integration with client-side JavaScript Apache Shale Remoting Seam Remoting Apache MyFaces Trinidad Custom Ajax components Use existing toolkit: JBoss RichFaces CDK Apache Trinidad Maven Plugins JSF Toolkit 2008 JavaOne SM Conference java.sun.com/javaone 43

Agenda JavaServer Faces from 1,000 feet Ajaxian Faces Sprinkling on some Ajax Ajax inside Ajax on the outside Which one? Rolling your own Future directions Summary Q&A 2008 JavaOne SM Conference java.sun.com/javaone 44

JSF 1.2 One problem with JSF 1.1 Ajax support: The request processing lifecycle JSF 1.2 improves Ajax support Support for additional Lifecycle instance invokeoncomponent method 2008 JavaOne SM Conference java.sun.com/javaone 45

JSF 2.0 Targeted for late 2008 Part of Java EE 6 Will incorporate features from: DynaFaces Single, integrated API for Ajax component developers Will include JavaScript bindings Apache Shale JBoss Seam Facelets 2008 JavaOne SM Conference java.sun.com/javaone 46

JSF 2.0 Key features Standardized support for Ajax Resource resolution and versioning Simplified component development Bookmarkable pages Page description language (PDL) a la Facelets Better UI component interoperability New scopes Less configuration (annotations) 2008 JavaOne SM Conference java.sun.com/javaone 47

Agenda JavaServer Faces from 1,000 feet Ajaxian Faces Sprinkling on some Ajax Ajax inside Ajax on the outside Which one? Rolling your own Future directions Summary Q&A 2008 JavaOne SM Conference java.sun.com/javaone 48

Summary JavaServer Faces is the standard Java EE web framework Component-based framework Simple, cohesive programming model JSF s architecture lends itself to Ajax development Ajax development with JSF doesn t require JavaScript! Same programming model with or without Ajax 2008 JavaOne SM Conference java.sun.com/javaone 49

Summary Ajaxian Faces JavaScript layer JSF integration Partial rendering Three approaches: Adding Ajax to existing components Integrating Ajax into components Wrapping JavaScript widgets 2008 JavaOne SM Conference java.sun.com/javaone 50

Summary Many different component suites and solutions exist currently JSF 1.2 makes Ajax integration easier for component developers JSF 2.0 will provide an Ajax integration platform for component vendors 2008 JavaOne SM Conference java.sun.com/javaone 51

Agenda JavaServer Faces from 1,000 feet Ajaxian Faces Sprinkling on some Ajax Ajax inside Ajax on the outside Which one? Rolling your own Future directions Summary Q&A 2008 JavaOne SM Conference java.sun.com/javaone 52

For More Information Official JSF site http://java.sun.com/javaee/javaserverfaces/ JSF Central product directory http://www.jsfcentral.com/products Ajax component suite comparison http://www.theserverside.com/tt/articles/article.tss?l=jsfcomparison Ajax-JSF Comparison Matrix http://www.ajaxjsf.net/ 2008 JavaOne SM Conference java.sun.com/javaone 53

Speaker Name, Speaker Title, 24 pt. ID#, Misc., 16 pt. Speaker s logo here (optional) 2008 JavaOne SM Conference java.sun.com/javaone 54