Boost PC performance: How more available memory can improve productivity
Wicket Portlet Primer
1. WICKET PORTLET
PRIMER
Ate Douma
Portal Architect @ Hippo
JSR-286 Portlet API 2.0 Expert Group Member
JSR-301 Portlet Bridge Specification for JSF Expert Group Member
Apache Software Foundation Member
Apache Portals Committer and PMC Member
Apache Wicket Committer and PMC Member
a.douma@hippo.nl / ate@apache.org
WICKET MEETUP AMSTERDAM NOV 2007
WICKET PORTLET PRIMER
2. Wicket Portlet Support History
• Started (by me) in 2005 but failed to finish
• Restarted by Janne 2006 -> Wicket 1.2
• Taken out again from Wicket core March 2007
• 3rd attempt (by me) May 2007 -> Wicket 1.3
WICKET PORTLET PRIMER WICKET MEETUP AMSTERDAM NOV 2007
3. Portlets vs Servlets
JSR-168 Portlet API 1.0
• Only generate content fragments
no control over the response type
•
no “page” scope access
•
coexistence with other portlets or servlets in the same page/session
•
• Delegated URL creation and handling
• 2 phase request processing (Action, Render)
• Render state / parameters maintained by the container
• No cookie support
• No servlet dispatching during Action phase
WICKET PORTLET PRIMER WICKET MEETUP AMSTERDAM NOV 2007
4. JSR-286: Portlet API 2.0
• Portlet coordination: events & public render parameters
• Portlet Filters
• New type of URL: ResourceURL
direct access to the portlet
•
full control over the response
•
• Servlet dispatching from action and event phase
• Contributing to page <head>
• Cookies supported
WICKET PORTLET PRIMER WICKET MEETUP AMSTERDAM NOV 2007
5. 3 Ways of providing Portlet Support
• Transparent
Servlet / Portlet differences abstracted away in the framework
•
JSF
•
• Native
requires “parallel” API hierarchies
•
(PortletPaqe vs WebPage, PortletRequestCycle vs WebRequestCycle)
Cannot be (transparently) used as web applications and visa versa
•
Struts/WebWorks 2.0, Spring PortletMVC, Wicket 1.2.x
•
• Bridged
Dispatching to the “servlet world” from one generic portlet
•
Wrapping and translating the “servlet” handling
•
Wicket 1.3
•
WICKET PORTLET PRIMER WICKET MEETUP AMSTERDAM NOV 2007
6. Limitations of the current Portlet Support
• Requires JSR-286 features (not formally available yet)
servlet dispatching during Action request phase
•
serving Resources / AJAX requests (requires full response control)
•
solved through custom Portals Bridges Interfaces
•
require portal specific implementation and support
●
most portals already *can* support this, but need to be provided
●
currently (known to be) working on Jetspeed-2 and Liferay (more or less)
●
• Wicket (core) API and implementation needs to stick to
certain rules (turned out to be rather easy so far)
no direct usage / manipulation of the url both on the server and client
•
WICKET PORTLET PRIMER WICKET MEETUP AMSTERDAM NOV 2007
7. Roadmap
• waiting for JSR-286 (just a few more weeks...)
• providing JSR-286 based WicketPortlet2
requires Java5 => Wicket 1.4.x
•
• Adding support for real JSR-286 features
events
•
public render parameters
•
=> Communication / coordination between Wicket “applications”
•
• Going to be (or already) used for
Jetspeed-2 admin portlets
•
Hippo CMS 7
•
...
•
WICKET PORTLET PRIMER WICKET MEETUP AMSTERDAM NOV 2007
8. Demo
Wicket Examples in Jetspeed-2
WICKET PORTLET PRIMER WICKET MEETUP AMSTERDAM NOV 2007