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

Similar documents
Copyright 2012, Oracle and/or its affiliates. All rights reserved.

Java EE 6: Develop Web Applications with JSF

Best Practices for JSF Portlet Migration and Development

JAVA EE 7 FROM AN HTML5 PERSPECTIVE. Ed and Oliver

Developing Applications with Java EE 6 on WebLogic Server 12c

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

JSF 2.0: Insight and Opinion

Improve and Expand JavaServer Faces Technology with JBoss Seam

Oracle Developer Day

JSF 2.0: Insight and Opinion

Ajax and JSF: Natural Synergy

Java EE 7 is ready What to do next? Peter Doschkinow Senior Java Architect

Liferay Faces. Reference Documentation ga4

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

Liferay Faces. Reference Documentation ga2

Specialized - Mastering JEE 7 Web Application Development

Oracle Developer Day

Oracle Fusion Middleware 11g: Build Applications with ADF I

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

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

<Insert Picture Here> The Oracle Fusion Development Platform: Oracle JDeveloper and Oracle ADF Overview

Building the Enterprise

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

Oracle Fusion Middleware 11g: Build Applications with ADF Accel

JavaEE.Next(): Java EE 7, 8, and Beyond

Developing Cross Device Mobile Applications

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

Oracle Fusion Middleware 11g: Build Applications with ADF I

Contents. 1. JSF overview. 2. JSF example

Courses For Event Java Advanced Summer Training 2018

Overview. Principal Product Manager Oracle JDeveloper & Oracle ADF

Advanced Web Systems 4- PORTLET API specifications (JSR 286) A. Venturini

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

Contents at a Glance

JavaServer Faces 2.0. Sangeetha S E-Commerce Research Labs, Infosys Technologies Ltd

A Red Hat Perspective

JSF. What is JSF (Java Server Faces)?

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

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

Spring Web Flow Reference Guide

Apache MyFaces CODI. Mark Struberg, INSO TU-Vienna

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

Exam Questions 1Z0-419

JSR-286: Portlet Specification 2.0

Distributed Multitiered Application

WSRP Web Services for Remote Portlets

<Insert Picture Here>

Oracle Corporation

Spring Web Flow Reference Guide

Jakarta Struts: An MVC Framework

Oracle Applications Unlimited and Web 2.0: You Can Have It Now!

Introduction to MVC 1.0

Breaking Apart the Monolith with Modularity and Microservices CON3127

"Web Age Speaks!" Webinar Series

JSF: Introduction, Installation, and Setup

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

Example jsf-cdi-and-ejb can be browsed at

Building Web Applications With The Struts Framework

Safe Harbor Statement

Oracle Middleware 12c: Build Rich Client Applications with ADF Ed 1 LVC

Building Real-time Data in Web Applications with Node.js

UX400. OpenUI5 Development Foundations COURSE OUTLINE. Course Version: 02 Course Duration: 5 Day(s)

112-WL. Introduction to JSP with WebLogic

Enabling Web 2.0 User Experience for E-Business Suite. Padmaprabodh Ambale, Gustavo Jimenez Development Managers, Applications Technology Group

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

Mastering JavaServer Faces

open source community experience distilled

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

Essentials on Performant JavaServer Faces Apps. Client Versus Server Side

Standards and the Portals Project

Rapid Application Development with APEX 5.0

<Insert Picture Here> Exploring Java EE 6 The Programming Model Explained

Oracle Application Development Framework Overview

The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into

Red Hat JBoss Enterprise Application Platform 7.2

Understanding Oracle ADF and its role in the Oracle Fusion Platform

JBoss Web Framework Kit 1.0 Release Notes

JakartaEE and the road ahead An ASF View. Mark Struberg, RISE GmbH, Apache Software Foundation, INSO TU Wien

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

More reading: A series about real world projects that use JavaServer Faces:

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

Java SE7 Fundamentals

EBS goes social - The triumvirate Liferay, Application Express and EBS

Vision of J2EE. Why J2EE? Need for. J2EE Suite. J2EE Based Distributed Application Architecture Overview. Umair Javed 1

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

Portlet Standard JSR 168 / JSR 286

"Charting the Course... WebSphere Portal 8 Development using Rational Application Developer 8.5. Course Summary

Copyright 2013, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 13

What is it? What does it do?

CPET 581 E-Commerce & Business Technologies. Topics

This presentation is for informational purposes only and may not be incorporated into a contract or agreement.

Hands-on Development of Web Applications with Java EE 6

Integrating Seam and GWT

The Next Generation. Prabhat Jha Principal Engineer

Oracle WebCenter Interaction: Roadmap for BEA AquaLogic User Interaction. Ajay Gandhi Sr. Director of Product Management Enterprise 2.

PATTERNS & BEST PRACTICES FOR CDI

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

Mobile Application Development: Introducing ADF Mobile Native Client Framework

AJAX in Apache MyFaces A New Approach To Web Applications

Type of Classes Nested Classes Inner Classes Local and Anonymous Inner Classes

Transcription:

1

What s New in Portlet 3.0 and JSF 2.2 Ed Burns @edburns Software Stylist, Oracle Corporation Presenting with

The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle s products remains at the sole discretion of Oracle. 3

Speaker Qualifications Involved with JSF since 2002 Spec lead since 2003 Most fun part of the job: cleanly integrating other people s great ideas into JSF (and hopefully improving on them in the process) Not an expert at applying JSF in practice Author of four books for McGraw-Hill 4

My Plan for Your Time Investment Portlet Technology Portlet Bridges The Standard JSF Portlet Bridges for Portlet 2.0 Some Examples CDI Portlet Bridges for Portlet 2.0 The Lifecycle Inter-Portlet Communication Portlet 3.0 Features CDI Scopes and the Portlet Lifecycle Sharing Resources between Portlets Simplified Parameter Handling Support for JSR-356 WebSocket JSF 2.2 Portlets Today CDI Integration HTML5 Friendly Markup Faces Flows Resource Library Contracts Stateless Views Ajax Push IPC 5 Copyright 2013 Liferay

Portlet Standard The Portlet Specification is a JCP standard that defines requirements for portlet containers and behavior of portlet applications JSR 168 Portlet 1.0 JSR 286 Portlet 2.0 JSR 362 Portlet 3.0 6 Copyright 2013 Liferay

Portlet Examples 7 Copyright 2013 Liferay

Servlet Lifecycle Single phase associated with HTTP GET/POST/PUT/DELETE operations: 8 Copyright 2013 Liferay

Portlet Lifecycle Multiple phases associated with HTTP GET/POST operations: 9 Copyright 2013 Liferay

Portlet Lifecycle 10 Copyright 2013 Liferay

Inter-Portlet Communication Inter-Portlet Communication (IPC) is a way of sharing data between two or more portlets Standard Mechanisms: Events IPC Public Render Parameters IPC demo 11 Copyright 2013 Liferay

Portlet 3.0 Features CDI Scopes and the Portlet Lifecycle Client-Side API Sharing resources between portlets Simplify API usage for handling parameters Support for JSR 356: Java API for WebSocket Improve support for mobile devices 12 Copyright 2013 Liferay

JSR-362 Expert Group Convened in March 2013 http://www.jcp.org/en/jsr/detail?id=362 Project Page (with Mailing List Signup) https://java.net/projects/portletspec3 Weekly teleconference meeting minutes: https://java.net/projects/portletspec3/pages/meetingminutes Portlet 3.0 API JavaDocs at GitHub: https://github.com/msnicklous/portletspec3 13 Copyright 2013 Liferay

Portlet 3.0 CDI Scopes EG is considering adding two CDI Scopes: @PortletLifecycleScoped For HTTP GET, exists for the duration of the RENDER_PHASE or RESOURCE_PHASE of the portlet lifecycle For HTTP POST, begins in the ACTION_PHASE and continues through to the RENDER_PHASE @PortletRedisplayScoped ACTION_PHASE to ACTION_PHASE Requirements first defined in JSR 329 PortletBridge Spec, known as the ìbridge Request Scopeî 14 Copyright 2013 Liferay

Portlet 3.0 Client Side API The JSR 362 EG will be considering: Client-side JavaScript API for portlets (portlet.js) Client-side mechanism for handling partial-page update (Similar in concept to JSF partial-response updates) Ability for the RESOURCE_PHASE to send IPC events or share public render parameters 15

Portlet 3.0 Additional Topics Sharing resources between portlets Simplify API usage for handling parameters Support for JSR 356: Java API for WebSocket Improve support for mobile devices 16 Copyright 2013 Liferay

Portlet Bridges JSF Portlet Bridges for Portlet 2.0 CDI Portlet Bridges for Portlet 2.0 17 Copyright 2013 Liferay

JSF Portlet Bridges for Portlet 2.0 Liferay Faces Bridge JBoss Portlet Bridge Apache MyFaces Portlet Bridge JSR 329 Reference Implementation 18 Copyright 2013 Liferay

CDI Portlet Bridges for Portlet 2.0 Liferay CDI Portlet Bridge <dependency> <groupid>com.liferay.cdi</groupid> <artifactid>cdi-portlet-bridge-shared</artifactid> <version>6.2.0.1</version> </dependency> JBoss CDI Portlet Integration <dependency> <groupid>org.gatein</groupid> <artifactid>cdi-portlet-integration</artifactid> <version>1.0.2.final</version> </dependency>" 19 Copyright 2013 Liferay

JSF 2.2 Portlets Today CDI Integration HTML5 Friendly Markup Support Faces Flows Resource Library Contracts Stateless Views Component Suites Ajax Push IPC 20 Copyright 2013 Liferay

JSF 2.2 CDI Integration New @ViewScoped annotation javax.faces.view.viewscoped instead of javax.faces.bean.viewscoped" New @FlowScoped annotation Like CDI @ConversationScoped with automatic begin and end 21

JSF 2.2 HTML5 Friendly Markup This is a JSF page <!DOCTYPE html>" <html xmlns="http://www.w3.org/1999/xhtml"" xmlns:myns="http://xmlns.jcp.org/jsf >" <form myns:id="form">" <input name="textfield" type="text" myns:value="#{bean.text1}" />" <input type="submit" myns:id="submitbutton" value="submit" /> " <p>submitted text: #{bean.text1}.</p>" </form>" </html>" " 22

JSF 2.2 HTML5 Friendly Markup Let s get back to basics JSF Views are written in a View Declaration Language (VDL). The standard Facelet VDL is an XML application with two kinds of elements HTML Markup JSF Components HTML Markup is passed through straight to the browser JSF Components take some action on the server, during the lifecycle 23

JSF 2.2 HTML5 Friendly Markup Let the elegance of HTML shine through Before JSF 2.2 JSF tags hide complexity of underlying HTML+script+css+images JSF Renderer : encode: markup to browser decode: name=value from browser <html> <my:colorpicker value= #{colorbean.color2} /> <my:calendar value= #{calendarbean.date1} /> </html> Context: Missing feature in browser? Write a JSF component. 24

JSF 2.2 HTML5 Friendly Markup Let the elegance of HTML shine through With JSF 2.2 Pure HTML+script+css+images in the JSF page JSF Renderer handles decode from browser Leverage the strength of the JSF lifecycle Leverage the expressiveness of HTML5 <html> <input type= color jsf:value= #{colorbean.color2} /> <input type= date jsf:value= #{calendarbean.date1} /> </html> Context: New feature in browser? Use pass through elements 25

Code Sample: TagDecorator Extension Came to JSF with Facelets 26

JSF 2.2 Faces Flows Standardized mechanism for connecting related JSF views Flows can be made reusable by packaging in a JAR Lessons learned from ADF Task Flow, Spring Web Flow, and Apache MyFaces CODI and standardizes 27

JSF 2.2 Resource Library Contracts Provides the ability for Facelet templates to be packaged in a JAR Including the JAR in a project makes it possible to apply the template in a reusable manner to an entire application 28

Resource Library Contracts Facelets Review The Facelets Gazette _template.html Site Navigation <ui:define name="headline"> Today's News </ui:define> Events Docs Forums <ui:define name="story"> Facelets is now a part of JSF 2.0... </ui:define> template client greeting.html About Contact Site Map 29

Resource Library Contracts Facelets Review The Facelets Gazette Template File name _template.html Site Navigation Insertion points Events Docs Forums About Contact Site Map Resources css classes, scripts, images 30

Resource Library Contracts A Contract is Born contracta Declared Templates Declared Resources 31

Resource Library Contracts Loading Conventions <web-app-root>/contracts contracta Declared contractb Templates Declared Declared contractc Resources Templates Declared Declared Resources Templates Declared Resources 32

Resource Library Contracts Loading Conventions <web-app-root>/contracts contracta Declared contractb Templates Declared Declared contractc Resources Templates Declared Declared Resources Templates Declared Resources JAR files in WEB-INF/lib contractd Declared contracte Templates Declared Declared contractf Resources Templates Declared Declared Resources Templates Declared Resources 33

Resource Library Contracts Loading Conventions <web-app-root>/contracts JAR files in WEB-INF/lib contracta Declared contractb Templates Declared Declared contractc Resources Templates Declared Declared Resources Templates Declared Resources contractd Set of available contracts Declared contracte Templates Declared Declared contractf Resources Templates Declared Declared Resources Templates Declared Resources 34

Resource Library Contracts Loading Conventions <web-app-root>/contracts JAR files in WEB-INF/lib contracta Declared contractb Templates Declared Declared contractc Resources Templates Declared Declared Resources Templates Declared Resources contractd Set of available contracts Declared contracte Templates Declared Declared contractf Resources Templates Declared Declared Resources Templates Declared Resources Facelet 1 Facelet 2 Facelet 3 35

Resource Library Contracts Loading Configuration <web-app-root>/contracts JAR files in WEB-INF/lib contracta Declared contractb Templates Declared Declared contractc Resources Templates Declared Declared Resources Templates Declared Resources contractd Set of available contracts Declared contracte Templates Declared Declared contractf Resources Templates Declared Declared Resources Templates Declared Resources faces-config.xml Facelet 1 Facelet 2 Facelet 3 36

Resource Library Contracts Loading Configuration <web-app-root>/contracts JAR files in WEB-INF/lib contracta contractb Declared Templates Declared contractc Templates Declared Resources Declared Declared Resources Templates Declared Resources contractd Set of available contracts contracte Declared Templates Declared contractf Templates Declared Resources Declared Declared Resources Templates Declared Resources faces-config.xml Facelet 1 <f:view contracts="contracta">... Facelet 2 Facelet 3 37

JSF 2.2 Stateless Views Informs the JSF StateManager that state is not to be applied to the view Consequence: Managed beans annotated with @ViewScoped essentially become like @RequestScoped <f:view transient= true > </f:view> 38

JSF 2.2 Component Suites Liferay Faces Alloy 4.x ICEfaces 3.3 PrimeFaces 4.0 RichFaces 5.0 (future) 39 Copyright 2013 Liferay

Ajax Push IPC Ajax Push IPC can be accomplished today using: ICEPush and ICEfaces PrimePush and PrimeFaces 40

Thank You Liferay is a registered trademark of Liferay, Inc. ICEfaces and ICEpush are trademarks of ICEsoft Technologies, Inc. RichFaces and JBoss Portlet Bridge are trademarks of Red Hat Inc. Oracle, Java, Java EE, and JavaServer are trademarks or registered trademarks of Oracle Corporation in the United States and in other countries Images of the Duke mascot are licensed under the new BSD 2-Clause License All other trademarks mentioned herein are the property of their respective owners 41

42

The preceding was intended to outline our general product direction. It was intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle s products remains at the sole discretion of Oracle. 43