Portlets 2.0 JSR 286 Steve Millidge Member of the JSR286 Expert Group Architect of the Open Source iPoint Portal [email_ad...
Agenda <ul><li>Portlet Concepts </li></ul><ul><li>JSR 168 Limitations </li></ul><ul><li>JSR 286 New Features </li></ul><ul...
Caveat This Presentation is based on the Current Draft Specification. Things May Change!
Portlet Concepts
What is a Portal “ A portal is a web based application that commonly provides personalisation, authentication, content agg...
What is a Portal?
What is a Portlet “ A portlet is an application that provides a specific piece of content (information or service) to be i...
What is a Portlet?
The Portlet Container “ A portlet container runs portlets and provides them with the required runtime environment.” The JS...
Architecture Portal Local Portlet Container 2 Remote Portlet Container  Local Portlet Container 1 Portlet API Portlet API ...
JSR 168
JSR 168 <ul><li>Released October 2003 </li></ul><ul><li>Portlet API </li></ul><ul><li>Portlet Taglib </li></ul><ul><li>Por...
Portlet Lifecycle <ul><li>init() </li></ul><ul><ul><li>Called once when enters service </li></ul></ul><ul><li>processActio...
JSR 168 Limitations
JSR168 Portlets are Islands <ul><li>Can not Communicate with other Portlets </li></ul><ul><li>Can not Influence the Portal...
JSR 286 Building Bridges
Shared Session Parameters <ul><li>Available in JSR 168 </li></ul><ul><li>Only works for portlets in the same Web Applicati...
Public Render Parameters <ul><li>Shared Render State Between Portlets </li></ul><ul><ul><li>Parameter Declared in portlet....
Portlet Communication
Portlet Events <ul><li>Major Feature of 286 </li></ul><ul><li>Coordinates Portlets w.r.t. State Changes </li></ul><ul><li>...
Event Definition <ul><li>Event Names Defined in the portlet.xml </li></ul><ul><li>Portlet Declares Support in portlet.xml ...
Possible Usage Product Catalogue Portlet 1) processAction Portal 2) setEvent(EventPayload) Shopping Cart Portlet 3) proces...
Resource Serving <ul><li>Generate non-markup Content </li></ul><ul><ul><li>Images </li></ul></ul><ul><ul><li>PDF </li></ul...
Other “Minor” Improvements <ul><li>Support for Changing Headers </li></ul><ul><ul><li>Cookies, META tags etc. </li></ul></...
Thank you
Upcoming SlideShare
Loading in …5
×

Jsr286 Cmf2007 c2b2 portal portlet

1,071 views

Published on

Presentation on JSR286 given at CMF2007 in Aarhus

2 Comments
0 Likes
Statistics
Notes
  • Be the first to like this

No Downloads
Views
Total views
1,071
On SlideShare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
0
Comments
2
Likes
0
Embeds 0
No embeds

No notes for slide

Jsr286 Cmf2007 c2b2 portal portlet

  1. 1. Portlets 2.0 JSR 286 Steve Millidge Member of the JSR286 Expert Group Architect of the Open Source iPoint Portal [email_address] www.ipointportal.com
  2. 2. Agenda <ul><li>Portlet Concepts </li></ul><ul><li>JSR 168 Limitations </li></ul><ul><li>JSR 286 New Features </li></ul><ul><li>Questions </li></ul>
  3. 3. Caveat This Presentation is based on the Current Draft Specification. Things May Change!
  4. 4. Portlet Concepts
  5. 5. What is a Portal “ A portal is a web based application that commonly provides personalisation, authentication, content aggregation, from different sources and hosts the presentation layer of information systems.” The JSR 286 Spec
  6. 6. What is a Portal?
  7. 7. What is a Portlet “ A portlet is an application that provides a specific piece of content (information or service) to be included as part of a portal page.” The JSR 286 Spec
  8. 8. What is a Portlet?
  9. 9. The Portlet Container “ A portlet container runs portlets and provides them with the required runtime environment.” The JSR 286 Spec
  10. 10. Architecture Portal Local Portlet Container 2 Remote Portlet Container Local Portlet Container 1 Portlet API Portlet API Portlet Portlet Portlet Portlet Portlet
  11. 11. JSR 168
  12. 12. JSR 168 <ul><li>Released October 2003 </li></ul><ul><li>Portlet API </li></ul><ul><li>Portlet Taglib </li></ul><ul><li>Portlet Lifecycle </li></ul><ul><li>Window States </li></ul><ul><li>Views </li></ul><ul><li>Preferences </li></ul><ul><li>Packaging </li></ul>
  13. 13. Portlet Lifecycle <ul><li>init() </li></ul><ul><ul><li>Called once when enters service </li></ul></ul><ul><li>processAction() </li></ul><ul><ul><li>Called in response to an Action Request </li></ul></ul><ul><li>render() </li></ul><ul><ul><li>Called to generate the markup fragment </li></ul></ul><ul><li>destroy() </li></ul><ul><ul><li>Called once when taken out of service </li></ul></ul>
  14. 14. JSR 168 Limitations
  15. 15. JSR168 Portlets are Islands <ul><li>Can not Communicate with other Portlets </li></ul><ul><li>Can not Influence the Portal Page </li></ul><ul><li>Can not generate non markup content </li></ul><ul><li>Don’t support Web Frameworks well </li></ul>
  16. 16. JSR 286 Building Bridges
  17. 17. Shared Session Parameters <ul><li>Available in JSR 168 </li></ul><ul><li>Only works for portlets in the same Web Application </li></ul><ul><li>Limited Use </li></ul>
  18. 18. Public Render Parameters <ul><li>Shared Render State Between Portlets </li></ul><ul><ul><li>Parameter Declared in portlet.xml </li></ul></ul><ul><ul><li>Portlet Declares Support for it in portlet.xml </li></ul></ul><public-render-parameter> <identifier>zipcode</identifier> <qname xmlns:x=“http://www.foo.com/params”>zipcode</qname> </public-render-parameter> … <portlet> <portlet-name>gazeteer</portlet-name> <supported-public-render-parameter>zipcode</supported-public-render-parameter> </portlet>
  19. 19. Portlet Communication
  20. 20. Portlet Events <ul><li>Major Feature of 286 </li></ul><ul><li>Coordinates Portlets w.r.t. State Changes </li></ul><ul><li>Events Raised in processAction </li></ul><ul><li>New Processing Phase before Render </li></ul><ul><ul><li>processEvents </li></ul></ul><ul><ul><li>Events can be raised in processEvents </li></ul></ul>
  21. 21. Event Definition <ul><li>Event Names Defined in the portlet.xml </li></ul><ul><li>Portlet Declares Support in portlet.xml </li></ul><ul><li>Event Content must have JAXB Binding </li></ul>< event-definition> <name>ProductSelectedForPurchase</name> <value-type>com.example.Product</value-type> </event-definition> … <portlet> <portlet-name>Shopping Cart</portlet-name> <supported-processing-event> <name>ProductSelectedForPurchase</name> </supported-processing-event> </portlet>
  22. 22. Possible Usage Product Catalogue Portlet 1) processAction Portal 2) setEvent(EventPayload) Shopping Cart Portlet 3) processEvent() 4) render() 5) render()
  23. 23. Resource Serving <ul><li>Generate non-markup Content </li></ul><ul><ul><li>Images </li></ul></ul><ul><ul><li>PDF </li></ul></ul><ul><li>Supports Simple AJAX </li></ul><ul><li>New Lifecycle Method </li></ul><ul><ul><li>serveResource </li></ul></ul><ul><li>New URL Type </li></ul><ul><ul><li>ResourceURL </li></ul></ul><ul><li>No Interportlet Coordination in serveResource </li></ul>
  24. 24. Other “Minor” Improvements <ul><li>Support for Changing Headers </li></ul><ul><ul><li>Cookies, META tags etc. </li></ul></ul><ul><li>Better Web Framework Integration </li></ul><ul><li>Annotations Support in Generic Portlet </li></ul><ul><li>Portlet Managed Modes </li></ul><ul><li>Portlet Filters similar to Servlet Filters </li></ul><ul><li>Access to Portlet Window ID </li></ul><ul><li>URL Generation Listeners </li></ul>
  25. 25. Thank you

×