4.1 Portlet container
This section details the Portlet life cycle, Portlet API and deployment concerns. Keep on the look out for ways to portalize existing applications and services.
IBM portlets are Web applications that run as servlets, inheriting from the javax.servlet.http.HttpServlet class, inside Web containers managed by an application server. In the IBM Portlet API, these Web containers are referred to as Portlet containers.
A portlet is visible on a portal page as a single small window, of which each portal page may have many. The portlet is the content inside the window, not the window itself. The window is defined by the selected skin.
4.2 IBM portlet application
A portlet application is a group of logically associated portlets. At a minimum, a portlet application defines a single portlet, such as in weather portlet application. In practice, the application may contain several portlets such as the exchange2000 portlet application which contains five portlets as illustrated in Figure 4-1.
Portlets defined in the same application may share configuration parameters set in the deployment descriptor or by the administrator at runtime. They also have the ability to communicate with each other with custom messages.
Portlet Applications are defined in the deployment descriptors at development time and cannot be created dynamically by the administrator. From an administrative perspective, portlet applications allow repetitive administrative tasks to be completed on a group of portlets instead of on individual portlets.
From a development perspective, portlet applications allow developers to provide for deployment all the portlets needed to achieve a business requirement and to ensure, at a minimum, that all these components are installed into the Portal Server.
4.3 Servlets versus portlets
Standalone servlets are the only presentation resource returned to the client at any given time. Portlets, on the other hand, render resources that are aggregated into a larger resource returned to the client. As a result, portlets are forced to consider constraints such as screen real estate, portlet interactivity, and events as well as overall performance.
4.4 Portlet modes
The following portlet modes are supported in the IBM Portlet API:
Mode Description View When a user is simply viewing the portlet. Edit Used to edit parameters. Users only have access to the Edit mode if they have been granted edit access by the administrator. Configure Conceptually similar to Edit mode in that it is used to adjust the configuration of the portlet. However, only users with manage permissions on a portlet have access to the Configure mode. In practice, the average user may have edit permissions on a portlet to change certain personal settings such as user IDs and passwords. Typically, only administrators would have manage permissions on a portlet in order to adjust non-user specific settings such as server names, etc. The actual implementation of the Edit and Configure modes, however, is entirely up to the portlet developer. Help The Help mode is used to present help information.