By manishkg on Feb 28, 2007
If you are familiar with Portlet 1.0 and wants to know what is new in Portlet 2.0, here is a summary of new features. This information is based on first draft available here and may change in final draft.
1. Portlet eventing or Inter Portlet Communication (IPC) - Portlet 1.0 have very limited capability of eventing within same portlet application using application session scope. JSR 286 will allow coordination between different portlets across different portlet applications deployed in same portlet container. A new lifecycle phase called processEvent() has been introduced between processAction() and render() phase. New classes such as EventRequest and EventResponse has been added for this purpose.
2. Shared Render Parameters - This is another addition to enhance coordination among portlets within same portlet application.
3. Shared Session Attributes - to share user data among different portlets in different portlet applications (in other words, sharing of data on portal level for a given user)
4. Portlet Filter - Similar to servlet filters, this will allow dynamic interception of requests and responses to transform or use the information contained in the portlet requests or portlet responses. While servlet has only one "Filter" interface, portlet have one "\*Filter" interface corresponding to each lifecycle method of portlet.
5. Resource Serving - Provides the ability for a portlet to serve a resource. A new called RESOURCE_SERVING_PHASE has been added for this purpose.
6. Support for Ajax - Similar to IPC and web framework bridges, the support for Ajax in different implementation of Portlet 1.0 is vendor specific. Portlet 2.0 is trying to make a standard for Ajax support.
7. Serving markup fragements - Portlet 2.0 is trying to provide support for an usecase where a fragement of the markup will be returned by the portlet. This will be helpful in providing support for technologies like AJAX.
8. Alignment with WSRP 2.0 - Web Services for Remote Portlet (WSRP) 2.0 specification from OASIS is also in the draft stage and Porltet 2.0 EG is trying to align these 2 specification.
9. Better support for web frameworks - Portlet 2.0 is trying to provide additional means for creating bridge for web frameworks such as JSF, struts, spring etc. Currently these bridges are proprietary for different portal vendors and Portlet 2.0 is trying to make these bridges portable.