What are Portlets ?

0 comments



Portlet is a java technology based web component that is managed by and run inside the portlet container, that processes requests and generate dynamic content.
  • Portlet is used by portals as a pluggable user interface component that provides a presentation layer to Information Systems.
  • Content generated by Portlet is called a fragment. A fragment is a piece of markup (HTML, DHTML, WML) adhering to certain rules and can be easily aggregated with other fragments to form a complete document.
  • The content of a portlet is normally aggregated with the content of other portlets to form the portal page.
  • Web clients interact with portlets via a request/response paradigm implemented by the portal.
Portlets
Multiple portlets view on Portal Console
 A portlet shares its space with other portlets
  • The portal aggregates all the produced markup fragment into a single response that is sent to the client.
  • All produced markup fragments must be homogenous.
  • A portlet can be refreshed several times without triggering any side effect like updating a database. Therefore the portal must solve this integration challenge, to achieve this goal the portlet programming model follows a two-step protocol that consists of an action phase and a render phase.
Multiple portlets view on Company's Portal

Different Portlet Perspectives

  • End User: a portlet is a window on a portal site that provides a specific service or information, for example, a calendar or news feed.
  • Content Provider: a means for targeting content to the end user.
  • Portal Administrator: a WAR file.
  • Portal Server: a component rendered and aggregated into one of its pages.
  • Developer: a java application whose lifecycle is managed by the container.
  • Application development: portlets are pluggable modules that are designed to run inside a portlet container of a portal server.

Portlet Phases

Render phase
  • During a request to the portal several render phases are invoked, one for each portlet present on that page sent to the client, there are no guarantees on the order in which the portlets are rendered.
  • The phase is parametrized with a user scoped state called “render parameters”.
  • The portlet produces content having a content type used that must be declared and accepted by the container.
Action phase
  • During a request to the portal only one action phase is invoked.
  • The phase is parametrized with the “action parameters” which are not persistent across requests.
  • The portlet does not produce any content, instead it updates some state and then decides the action following this phase.
  • At render time, however there are no guarantees that the subsequent render phase will be called.
  • Redirects the client to another URL location.

No comments:

Post a Comment

Recent Posts

Popular Posts

© 2011-2019 Web Portal Club