170 likes | 182 Views
Dive into the world of portlets with this comprehensive guide covering definitions, comparisons, features, modes, window states, containers, and the process of developing and deploying portlets.
E N D
Portlets Sri Vatsav Konreddy CIS 764 FALL 2007
Contents • What is a Portlet • Comparison of Servlet and Portlet • Portlet Architecture • Portlet Lifecycle • Portlet Features • Portlet Modes • Portlet Window States • Portlet Container • How to develop and deploy a Portlet
What is a Portlet • Web component based on Java Technology. • A small window on a portal page. • Pluggable user interface Components.
Comparison: Servlet and Portlet Similarities: • Both are Java technology based web components • Life-cycle is managed by a specialized container • Both generate dynamic content • Both interact with web client via a request/response paradigm • Request and Response are similar
Comparison (ctd..) Differences: • Servletscan provide complete web pages, whereas Portlets only provide fragments. • Portlets only generate markup fragments, not complete documents. • Portlets are not directly bound to a URL • Web clients interact with portlets through a portal system • Multiple instances of a single portlet can be placed onto the same page
Portlet Features • Persistence • User Profile Attributes • Portal context • Security • Portlet URL
Portlet Modes • View • Help • Edit
Portlet window states • Normal • Maximized • Minimized
Portlet Container Portlets are deployed in a Portlet container. The container can: • Provides runtime environment for Portlets • Manage life cycle of Portlets • Provide persistent storage for storing Portlet preferences • Cache the Portlets • Receive requests from the Portal to execute requests on the Portlet Not responsible for contents aggregation
Developing & Deploying Portlet • Write a Portlet • Implement Portlet Interface • Implement important methods init(), processAction(), doView(), doEdit(), doHelp(),render(), destroy() • Compile
Developing & Deploying Portlet (ctd..) • Configure Portlet Application and add the Portlet(s) to it • Deployment descriptor – portlet.xml • Package the classes and deployment descriptor within a .war • Portal servers: Pluto, Liferay, Jboss Portal, Exo (JSR 168)
References • http://www.javaworld.com/javaworld/jw-08-2003/jw-0801-portlet.html?page=1 • Sun JSR 168 Portlet: http://developers.sun.com/portalserver/reference/techart/jsr168/pb_whitepaper.pdf • Sang Shin article:http://www.javapassion.com/j2eeadvanced/WSRP4.pdf