Portlets 2.0 JSR 286 Steve Millidge Member of the JSR286 Expert Group Architect of the Open Source iPoint Portal [email_ad...
What is a Portlet “ A portlet is an application that provides a specific piece of content (information or service) to be i...
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 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
C2B2 Shameless Plug! <ul><li>Niche Java Consultancy </li></ul><ul><ul><li>Specialising in Java Infrastructure </li></ul></...
Upcoming SlideShare
Loading in...5
×

Jsr286 Uor Portlet Workshop

1,112

Published on

Presentation given at a Portal Workshop at the University of Reading

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,112
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Transcript of "Jsr286 Uor Portlet Workshop"

  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.c2b2.co.uk
  2. 2. 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
  3. 3. The Portlet Container “ A portlet container runs portlets and provides them with the required runtime environment.” The JSR 286 Spec
  4. 4. Architecture Portal Local Portlet Container 2 Remote Portlet Container Local Portlet Container 1 Portlet API Portlet API Portlet Portlet Portlet Portlet Portlet
  5. 5. JSR 168 Limitations
  6. 6. 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>
  7. 7. JSR 286 Building Bridges
  8. 8. 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>
  9. 9. 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>
  10. 10. Portlet Communication
  11. 11. 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>
  12. 12. 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>
  13. 13. Possible Usage Product Catalogue Portlet 1) processAction Portal 2) setEvent(EventPayload) Shopping Cart Portlet 3) processEvent() 4) render() 5) render()
  14. 14. 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>
  15. 15. 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>
  16. 16. Thank you
  17. 17. C2B2 Shameless Plug! <ul><li>Niche Java Consultancy </li></ul><ul><ul><li>Specialising in Java Infrastructure </li></ul></ul><ul><li>Experts in Non-functional Requirements </li></ul><ul><ul><li>Scalability, Availability, Performance etc. </li></ul></ul><ul><li>Services </li></ul><ul><ul><li>Consulting, Training </li></ul></ul><ul><li>Technologies </li></ul><ul><ul><li>Core JEE, ESB, Portals, ORM </li></ul></ul><ul><li>Vendors </li></ul><ul><ul><li>BEA, Red Hat (JBoss), Sun, IBM </li></ul></ul><ul><ul><li>Terracotta, Hyperic, Liferay, eXo, Mule </li></ul></ul>

×