Sunday, April 29, 2012

JSR 168 VS JSR 286


Simple format
The major improvements from JSR 168, (as noted in the JSR 286 document)
  • Events – enabling a portlet to send and receive events and perform state changes or send further events as a result of processing an event.
  • Public render parameters – allowing portlets to share parameters with other portlets.
  • Resource serving – provides the ability for a portlet to serve a resource.
  • Portlet filter – allowing on -the -fly transformations of information in both the request to and the response from a portlet.
Apart for these major differences,there are many minor changes like
  • getNamespace() – this method gives unique value for the portlet window
  • getWindowsID()- this method returns portlet window ID
  • Portlet Cookies- Can beset  on particular phase and retrieved on the subsequest phase
  • Additions to PortletRequestDispatcher
  • Portlet container runtime options
  • New CSS classess

JSR168 vs JSR 286

JSR-168 – What is missing? 
• inter-portlet communication 
• serving non-html resources (pdf, doc, images etc.) 
• contributing javascript or css to , using cookies 
• proper support for common web frameworks 
• portlet filters 
Inter-portlet communication 
• only supported within the same portlet application 
using session attributes 
• target portlets will only “see” messages during next 
render request 
• portlets cannot (should not) update their state during a 
render request: “event” handling not really possible 
Serving non-html resources 
• A portlet can only render html fragments 
• Have to fallback/delegate to the servlet container 
• Requires coordination between portlet and servlet 
Contributing to , setting cookies 
• javascript or css can only be embedded withing the 
content markup; no body onLoad handling hooks 
• API forbids adding cookies: only client side setting of 
cookies using javascript is possible 
Proper support for common web frameworks 
• Most web frameworks are Servlet API only 
• Servlet dispatching not supported from processAction 
• Needs Portals Bridges or similar solutions 
• JSTL support very limited: 
ut value=”<%= ((FooBean)renderRequest.getSession() 
.getAttribute("fooBean",PortletSession.PORTLET_SCOPE)) 
.getBeanValue() %>"/> 


JSR-286 - Coming up 

• Portlet Specification 2.0 
• Expert Group started January 2006 
• 1st Early Public Draft released August 2006 
covering most, but not yet all, planned features 
• 2nd Early Public Draft November 2006 
covering all features 
• 1st Public Draft December 2006 
• Final Release May 2007 
• RI will be done under Apache Pluto umbrella with help 
from a group at University of Jena 
• Binary compatible with JSR-168 
• Alignment with J2EE 1.4, WSRP 2.0 
• Portlet coordination 
• Public render parameters 
• Shared session state across applications (maybe) 
• Portlet events 
• Resource serving 
• AJAX support 
• Portlet filters 
• Extended cache support 
• Improved support for common web frameworks 
• ... and more