My brother asked me one simple question,” how are portlets different?”. He has some know how of servlet technology but was completely unaware of the portlets technology. As a portlet programmer, I started with all the architectural features and technical jargons. But realized that it was a bit too heavy for him. From there comes the idea of posting this article explaining and starting with the very basics of Portlets.
I plan to divide this talk in two parts. First let me discuss about the differences of portlets with respect to Presentation Perspective. The second part will deal with more technical part of how this data, which is to be presented, is created in Portlets or in other words how the requests are handled in Portlets.
Presenting Data generated by Portlets
The presentation of data in portlets is different than servlets. The snapshot (ibm portal snapshot -figure 1.) gives us the first idea of portlets presentation.
The whole display is divided into Containers and Pages. Each Page can have many Containers. Page can contain output of more then one portlet. These are put in different containers on the page. One can see the different boxes in figure, each represent different portlet output. These boxes can have the functionality of a window i.e. they can be minimized or maximized. Thus one can visualize it as having multiple windows on the same page. Function wise also it is similar, when minimized the fragment of that portlet is not rendered only the title bar is shown. Similarly when maximized only the content of that portlet is shown and all the other portlets content on the same page is not shown at all.
The output of the portlets are in form of fragments. They should not contain any "html" or "body" tags, nor any "html header" information. Now comes very important questions that how this display is created. Each portal vendor provides with an Interface for configuration. Here one can create new pages. Can add containers to a page and can form a layout of the page. In second step one selects a portlet for these containers or pages. Thus one can anytime change the layout or change the portlet from which the output is coming without writing a single line of codeJ. One can even configure the rights for each page i.e. only a particular user can have the rights to see particular page. That I will discuss in more detail in the second part of talk.
Other then window modes the boxes can have more icons. These are known as portlets modes. JSR168 allows three modes that is view, help and edit. But customs modes are also allowed depending on portal vendors. Generally configure mode is also present. These modes are generally used to set the portlet preferences data. I will talk in detail about the portlet preferences data when I will talk about customization of portlets, in my upcoming articles. Similarly I will be discussing about how one can do action in one portlet like search and the result can be viewed in other. This is called as Inter-Portlet Communication.
But as for time-being the points to be taken from here by a newbie of portals are The portlets display:
- Supports multi-window concept.
- Supports fragments of data and not "html header" and “html” or “body” tags.
- Shows icons for window and portlets modes.
- Over all Page lay out can be configured.
- Portlets from which data is generated can be changed easily.
- Made up of containers and pages.
Post a Comment