PrimeFaces. Next Generation Component Suite. Cagatay Civici

Similar documents
ADF. Joe Huang Joe Huang Senior Principal Product Manager, Mobile Development Platform, Oracle Application Development Tools

An introduction to creating JSF applications in Rational Application Developer Version 8.0

Introducing Apache Pivot. Greg Brown, Todd Volkert 6/10/2010

MASTERTAG DEVELOPER GUIDE

Building Rich Internet Applications with PHP and Zend Framework

Modern Web Apps with HTML5 Web Components, Polymer, and Java EE MVC 1.0. Kito Mann Virtua, Inc.

Making Web Application using Tizen Web UI Framework. Koeun Choi

the intro for RPG programmers Making mobile app development easier... of KrengelTech by Aaron Bartell

Visualizing a Neo4j Graph Database with KeyLines

English. Asema.com Portlets Programmers' Manual

<Insert Picture Here> Oracle Mobile Enterprise Application Platform Overview

Cross Platform App Development

This course provides students with the knowledge and skills to develop ASP.NET MVC 4 web applications.

<Insert Picture Here> Betting Big on JavaServer Faces: Components, Tools, and Tricks

AJAX and JSON Lessons Learned. Jim Riecken, Senior Software Engineer, Blackboard Inc.

The Oracle Fusion Development Platform

Sitecore Dashboard User Guide

White Paper INTRODUCTION. In mobile development, there are three different types of applications: PRE-SMARTPHONE MOBILITY NATIVE MOBILE APPLICATIONS

Data Visualization in Ext Js 3.4

How To Write An Ria Application

Building native mobile apps for Digital Factory

SENSE/NET 6.0. Open Source ECMS for the.net platform. 1

Client-side Web Engineering From HTML to AJAX

Developing Native JavaScript Mobile Apps Using Apache Cordova. Hazem Saleh

The Google Web Toolkit (GWT): The Model-View-Presenter (MVP) Architecture Official MVP Framework

Designing for the Mobile Web Lesson 3: HTML5 Web Apps

JavaScript By: A. Mousavi & P. Broomhead SERG, School of Engineering Design, Brunel University, UK

PLAYER DEVELOPER GUIDE

Bayeux Protocol: la nuova frontiera della comunicazione a portata di mano. Relatore Nino Guarnacci

Java with Eclipse: Setup & Getting Started

Programming in HTML5 with JavaScript and CSS3

Whitepaper. Rich Internet Applications. Frameworks Evaluation. Document reference: TSL-SES-WP0001 Januar

Is Liferay Right for Your Organization? Seven Things to Consider When Choosing a Portal Platform

Visualizing an OrientDB Graph Database with KeyLines

Progressive Enhancement With GQuery and GWT. Ray Cromwell

CrownPeak Java Web Hosting. Version 0.20

100% NO CODING NO DEVELOPING IMMEDIATE BUSINESS -25% -70% UNLIMITED SCALABILITY DEVELOPMENT TIME SOFTWARE STABILITY

Building Ajax Applications with GT.M and EWD. Rob Tweed M/Gateway Developments Ltd

Take full advantage of IBM s IDEs for end- to- end mobile development

Google Web Toolkit. Introduction to GWT Development. Ilkka Rinne & Sampo Savolainen / Spatineo Oy

Java (J2SE & J2EE) and Web Development Training Catalog

Example. Represent this as XML

What s New in IBM Web Experience Factory IBM Corporation

SAP NetWeaver Opens SAP ERP world. Amedeo Prodi SAP Italia

QML and JavaScript for Native App Development

Software Development Interactief Centrum voor gerichte Training en Studie Edisonweg 14c, 1821 BN Alkmaar T:

Mobilize workforce using Fiori apps: Graybar Story

Budget Event Management Design Document

How To Develop A Mobile Application On An Android Device

Evaluation of Xamarin Forms for MultiPlatform Mobile Application Development

Smart and Innovative Web Solutions. Just One Click Away

Rapid Application Development. and Application Generation Tools. Walter Knesel

Mobile Apps, Mobile Web, and Other Cool Tools. Thursday, November 9, :00pm 4:00pm Michael Hostad and Scott Owczarek

Experiences with Open-Source BPM/SOA-based Stack using Java EE Rok Povše, Matjaž B. Jurič

Cloud Omnichannel Contact Center Software

<Insert Picture Here> Building a Complex Web Application Using ADF and Siebel

Instant Chime for IBM Sametime Installation Guide for Apache Tomcat and Microsoft SQL

RESTful web applications with Apache Sling

Agile Development with Groovy and Grails. Christopher M. Judd. President/Consultant Judd Solutions, LLC

Web 2.0 Technology Overview. Lecture 8 GSL Peru 2014

ANDROID APPLICATION DEVELOPER RESUME

HybriDroid: Analysis Framework for Android Hybrid Applications

Lab: Developing Mobile Web Apps. Adage Technologies adagetechnologies.com

Grab Your Tablet, Because You re Gonna Build A Mobile Apex App in One Hour!

SAP Mobile Platform Intro

Mobile App Framework For any Website

Mobile Learning Application Based On Hybrid Mobile Application Technology Running On Android Smartphone and Blackberry

Android Programming: Installation, Setup, and Getting Started

Developing Exceptional Mobile and Multi-Channel Applications using IBM Web Experience Factory IBM Corporation 1

Advanced Java Client API

DevOps Best Practices for Mobile Apps. Sanjeev Sharma IBM Software Group

Knowledge Spaces. v9.1 Feature Review. Bob Peery, Director, Product Management

Ontario Ombudsman. Goals

Version 1.3 OFFICIAL THEME USER GUIDE. Renova. Unique Creative Portfolio - Responsive HTML5

Introduction to PhoneGap

SENIOR WEB DEVELOPER

JavaScript Basics & HTML DOM. Sang Shin Java Technology Architect Sun Microsystems, Inc. sang.shin@sun.com

Web Development 1 A4 Project Description Web Architecture

Spring 3.1 to 3.2 in a Nutshell. Sam Brannen Senior Software Consultant

Yandex.Widgets Quick start

Native, web or hybrid mobile-app development

Introduction to Oracle Mobile Application Framework Raghu Srinivasan, Director Development Mobile and Cloud Development Tools Oracle

Nexawebホワイトペーパー. Developing with Nexaweb ~ Nexaweb to Improve Development Productivity and Maintainability

Syllabus INFO-GB Design and Development of Web and Mobile Applications (Especially for Start Ups)

Slide.Show Quick Start Guide

Petroleum Web Applications to Support your Business. David Jacob & Vanessa Ramirez Esri Natural Resources Team

<Insert Picture Here> Michael Hichwa VP Database Development Tools Stuttgart September 18, 2007 Hamburg September 20, 2007

Transcription:

PrimeFaces Next Generation Component Suite Cagatay Civici

Cagatay Civici JSF Expert Group Member (JSR-314) PrimeFaces Founder and Lead Apache MyFaces PMC Member Atmosphere Ajax Push/Comet Committer Regular Speaker, Author, Technical Reviewer Co-Founder of Prime Technology

Prime Technology Agile and Java EE Consulting JSF, Spring, Seam, JPA Trainings (e.g. PrimeFaces, JSF 2.0) Outsource Development Istanbul/Turkey based 4

What is this talk all about? PrimeFaces Component Suite RIA Ajax Push TouchFaces iphone/android/palm GPS Navigation Mock OS X with JSF Interested? 5

PrimeFaces Next Generation Component Suite Designed with JSF 2.0 in mind 6

History 1+ year old November 2008 - Start January 2009 - First Release 0.8.0 10 releases so far February 2010-1.0.0 and 2.0.0 7

1.0.0 and 2.0.0 8

PrimeFaces Design Principles A good UI component should hide complexity but must keep flexibility Page author must be in full control Do not overuse JSF extensions Avoid extensions that can cause race conditions Avoid bringing overhead, keep it clean! 9

UI Components 70+ Rich set of components Ajax powered or Client side YUI, jquery and PrimeFaces widgets Unobstrusive Javascript Customizable and Easy to Use Compatible with others Skinning 10

Extreme UI with PrimeFaces 11

Simple Setup JSF 1.2 JSF 2.0 ResourceServlet <p:resources /> Taglib Ready! ResourceServlet (Optional) Taglib Ready! 12

ResourceServlet Streaming and Caching (js, css, images) Auto-Registered in Servlet 3.0 Environment <servlet> <servlet-name>resource Servlet</servlet-name> <servlet-class>org.primefaces.resource.resourceservlet</servlet> </servlet> <servlet-mapping> <servlet-name>resource Servlet</servlet-name> <url-pattern>/primefaces_resource/*</url-pattern> </servlet-mapping> 13

p:resources for JSF 1.2 Renders <link />, <script /> No hacks to head Not required in JSF 2.0 -> <h:head /> <head> <p:resources /> </head> 14

Ready! <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:p="http://primefaces.prime.com.tr/ui"> <h:head> </h:head> <h:body> <p:editor /> <h:body> </html> 15

Unobstrusive UI JSF Markup <p:schedule id= calendar value= #{bean.value} editable= true /> <div id= calendar ></div> HTML Markup <script type= text/javascript > new PrimeFaces.widget.Schedule( calendar, {editable:true}); </script> 16

Output 17

Easy Ajax Ajax without complexity Partial Page Rendering Flexible with Callbacks (e.g. onstart, oncomplete) Ajax components (e.g. autocomplete) Lightweight, No overhead 18

PPR - Hello World public class GreetingBean { private String name; //... } <h:form> <h:inputtext value= #{greetingbean.name} /> <h:outputtext id= name value= Hi: #{greetingbean.name} /> <p:commandbutton value= Ajax Submit update= name /> </h:form> 19

p:ajax f:ajax extension <h:inputtext value= #{greetingbean.name} > <p:ajax event= blur update= name /> </h:inputtext> <h:outputtext id= name value= Hi: #{greetingbean.name} /> 20

Defining Ids Server id Client id Comma separated White space separated Mix Keywords update= text update= form:text update= text, panel update= text panel update= form:text grid update= @form 21

Keywords @this @parent @form @all @none update= @parent 22

Partial Processing Decide what to process process attribute Ajax requests Non-ajax requests process= @this 23

Partial Processing - Case 1 <h:form> <h:inputtext id= iamrequired required= true /> <h:selectonemenu id= cities > <p:ajax update= cities process= @this /> </h:selectonemenu> <h:selectonemenu id= suburbs /> </h:form> 24

Partial Processing - Case 2 <h:form> <h:inputtext id= iamrequired required= true /> <h:outputtext id= selected /> <p:datatable id= table > <p:column> <p:commandlink update= selected process= table /> </p:column> </p:datatable> </h:form> 25

Partial Processing - Case 3 Making immediate obsolete <h:form> <h:inputtext id= iamrequired required= true /> <h:commandbutton action= navigate immediate= true /> </h:form> <h:form> <h:inputtext id= iamrequired required= true /> <p:commandbutton action= navigate process= @this /> </h:form> 26

Process vs Update Restore View Apply Request Process Validations Model Update Invoke App Update Render Response 27

Notifying Users Declarative <p:ajaxstatus> <f:facet name="start"> <p:graphicimage value="fancyanimation.gif" /> </f:facet> <f:facet name="complete"> <h:outputtext value="request Completed" /> </f:facet> </p:ajaxstatus> Programmatic <p:ajaxstatus onstart= alert( Started ) oncomplete= alert( done ) /> 28

Global vs Non-Global To trigger p:ajaxstatus or not <p:ajaxstatus> <f:facet name="start"> <p:graphicimage value="fancyanimation.gif" /> </f:facet> <f:facet name="complete"> <h:outputtext value="request Completed" /> </f:facet> </p:ajaxstatus> Global (Default) Silent <p:commandbutton value= Submit /> <p:commandbutton value= Submit global= false /> 29

Component specific callbacks onstart onsuccess oncomplete onerror <p:commandbutton onstart= return confirm( Sure ) oncomplete= alert( Done ); /> 30

Callback Arguments From backing bean to ajax callbacks with JSON <p:commandbutton value= Submit action= #{bean.save} oncomplete= handlecomplete(xhr, status, args) /> public void save() { RequestContext context = RequestContext.getCurrentInstance(); context.addcallbackparam( item, item); } <script type= text/javascript > function handlecomplete(xhr, status, args) { alert(args.item.name); } </script> 31

Ajax Remoting p:remotecommand public class GreetingBean { private String name; //... public void touppercase() { name = name.touppercase(); } } <p:remotecommand name= uppercase actionlistener=#{greetingbean.toupptercase} /> <script type= text/javascript > uppercase(); </script> 32

PPR Summary Simple Easy to Use Flexible Responsive Lightweight Keep it clean No Need For Ajax Servlet Filter HTML Parser Ajax ViewHandler Ajax StateManager Ajax Regions Ajax * 33

Component Suite Demo 34

TouchFaces Mobile UI Kit WebKit Browsers IPhone, Android, Palm Native IPhone UI Integrated Ajax Regular JSF Powered by jqtouch 35

TouchFaces UI <i:application /> <i:view /> <i:tableview /> <i:rowgroup /> <i:rowitem /> <i:switch /> 36

TouchFaces in Action Translate Chat - Ajax Push PathFinder - GPS TwitFaces Weather Notes News 37

TouchFaces Demo 38

Ajax Push/Comet Built on top of Atmosphere <p:push /> CometContext.publish(...) 39

Atmosphere Framework Portable Comet Framework Write Once, Deploy Anywhere Rest support Servlet 3.0 support JSF Integration: PrimeFaces 40

Ajax Push/Comet 41

Chat App in a Minute public class ChatController { private String message; } public void send(actionevent event) { CometContext.publish( chat, message); } //getters setters <h:form> <h:inputtext value= #{chatcontroller.message} /> <p:commandbutton value= Send actionlistener= #{chatcontroller.send} /> </h:form> <p:outputpanel id= display /> <p:push channel= chat onpublish= handlepublish /> <script type= text/javascript > function handlepublish(pushed) {! $('#display').append(pushed.data); } </script> 42

Pushing as JSON Player player = new Player(); player.setname( Messi ); player.setage(22); CometContext.publish(player); function handlepublish(pushed) { //pushed.data.name; //pushed.data.age; } 43

Extensions: FacesTrace Trace/Debug tool Lifecycle visualizer Performance Tracker Visual component tree 44

FacesTrace Demo 45

Integrate With Spring Spring Webflow Seam CDI Portlets See svn/examples 46

Documentation User s Guide - 350 pages Wiki Screencasts API & TLD Docs Third party articles/blogs 47

Community Support http://primefaces.prime.com.tr/forum 48

Enterprise Support 2/4 hour average response time Priority forum access Ticket based portal IM support over skype JSF specific help Special Case Support 49

Community Strong community feedback 500 posts per week in forum Join us! 50

Coming Soon TreeTable ContextMenu ProgressBar and more... 51

Finale cagatay.civici@prime.com.tr Twitter: @cagataycivici, @primefaces Facebook Group: 206606616332 Blog: http://cagataycivici.wordpress.com HomePage: http://www.primefaces.org Atmosphere: http://atmosphere.dev.java.net 52

Questions 53