Presentation is loading. Please wait.

Presentation is loading. Please wait.

JSR 168 Overview Copyright © 2000 – 2007 Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission.

Similar presentations


Presentation on theme: "JSR 168 Overview Copyright © 2000 – 2007 Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission."— Presentation transcript:

1 JSR 168 Overview Copyright © 2000 – 2007 Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission from Liferay, Inc.

2 Overview  This PowerPoint will give you an overview of JSR 168 and explain the benefits of using a JSR 168 compliant portal  It covers the portlet lifecycle and the characteristics of a portlet  The intended audience is Java developers

3 Objectives  What is JSR 168?  What is a Portlet?  Portlet Lifecycle  Portlet Modes  Window States  Portlet Preferences  Benefits of JSR 168  Final Thoughts

4 What is JSR 168?  JSR 168 is the Portlet Specification  It was created out of a need to have a specification for displaying multiple applications on the same page  JSR 168 defines the lifecycle of a portlet as well as its characteristics

5 What is a Portlet?  A portlet is a web component that processes requests and generates dynamic content  The content generated by a portlet is also called a fragment (e.g. HTML, XHTML, WML) and can be aggregated with other fragments to form a complete document Java Portlet Specification, version 1.0. PLT.2.2

6 What is a Portlet?  Portlets are fragments of an html page

7 Portlet Lifecycle  Portlets are different from servlets in that they have a 2 phase commit  With servlets, the service() method processes all requests  With portlets, the processAction() method processes the requests and the render() method draws the contents of the portlet on the page

8 Portlet Lifecycle init()  Initializes the portlet processAction()  Called when the user submits a form render()  Renders the content destroy()  Cleans up the portlet

9 Portlet Characteristics Portlets have additional characteristics that make them different from Servlets  Portlet Modes  Window States  Portlet Preferences Some people advocate the use of IFrames instead of portlets, but IFrames cannot save state They also cannot communicate with the portal or any other components on the page

10 Portlet Modes  Each portlet has a current mode, which indicates the function the portlet is performing  All JSR 168 compliant portals must support the View, Edit and Help modes Introduction to JSR 168—The Java Portlet Specification P3 http://developers.sun.com/portalserver/reference/techart/jsr168/pb_whitepaper.pdf

11 Window States  Window states indicate the amount of portal page space that will be assigned to a portlet  All JSR 168 compliant portals must support the minimized, maximized and normal window states Introduction to JSR 168—The Java Portlet Specification P3 http://developers.sun.com/portalserver/reference/techart/jsr168/pb_whitepaper.pdf

12 Portlet Preferences  Portlets can be configured to provide a custom view or behavior for different users  For example, a weather portlet can show the temperature in Chicago for one user and the temperature in LA for another user  These configurations are represented as a persistent set of name-value pairs and are referred to as portlet preferences Introduction to JSR 168—The Java Portlet Specification P3 http://developers.sun.com/portalserver/reference/techart/jsr168/pb_whitepaper.pdf

13 Why Should I Use a JSR 168 Compliant Portal?  Even though flexibility and the ability to incorporate the latest technology is important, it is equally important to be based on industry standards  You don’t want to re-learn the servlet specification every time you switch servers  Similarly, you shouldn’t have to re-learn the portlet specification if you decide to switch portals

14 Benefits of JSR 168 Core Architecture  The core architecture will be the same across JSR 168 compliant portals  For example, you can rely on the fact that a portlet will call processAction() to process a request and then call render() to draw its contents

15 Benefits of JSR 168 Documentation  The Portlet Specification will not change, and you can always look to it as a source of reliable information Standard Portlet API  Developers can create one set of JSR 168 compliant portlets that can be deployed on any JSR 168 compliant portal

16 Final Thoughts  Portlets are becoming increasingly important as the demand increases for aggregated content  Just as JSR 154 is the de facto standard for servlets, JSR 168 sets the standard for portlets

17 Final Thoughts  All of the major vendors including BEA Weblogic Portal, IBM WebSphere Portal, Oracle Portal and SunOne Portal adhere to the JSR 168 specification  Any knowledge that you gain regarding the JSR 168 specification will be applicable to almost any commercial or open source portal available today

18 References Java Portlet Specification  http://jcp.org/aboutJava/communityproces s/final/jsr168/ Introduction to JSR 168  http://developers.sun.com/prodtech/portals erver/reference/techart/jsr168/pb_whitepa per.pdf

19 Revision History 01/17/07James MinAuthor 03/24/07 Ed ShinCo-Author


Download ppt "JSR 168 Overview Copyright © 2000 – 2007 Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission."

Similar presentations


Ads by Google