Framework for Portlets

Portlets, like model-I JSPs, need some framework to keep code manageable. While saying framework, initially we are more concerned with the basic structure of the portlets. Though it can be argued that portlets are based on MVC pattern and less prone to code management problems. But due to single controller architecture, soon the controller codes start zooming and becomes highly unmanageable. At this stage we need some framework with some best practices to avoid code management problems. There are various methodologies available like State Pattern by IBM. Here in this article authors has suggested that portlets have three major functions -

1. Validate
2. Store Data
3. Prepare Request

Based on above assumption, he has tried to standardize above three major processes of portlet development. Idea is new one and, in my opinion, can be useful for small to medium size portlet development. For detailed portlets (say more than 100 lines of code), in my opinion, we should go for some proper framework like JSF, Spring or Struts. Have a look at the article - Portlet How-To: Using an Action Interface to Improve Portlet Code.

Comments

  1. Spring Sandbox has some initial support for PortletMVC, basically a port of the SpringMVC stuff to fit inside a portlet container. At Rutgers, we've started using the initial support in some projects with some success.

    ReplyDelete
  2. Hi Punit

    As you said we should go for either struts or spring kind of frame. Could you please let us know how could we use Struts2 app as a portlet.

    Thank you
    vishnu
    vishnu.j2eedeveloper at gmail dot com

    ReplyDelete
  3. Hi Punit

    As you mentioned in your blog when we go for big portal apps we need to go for some MVC framework like struts, spring etc., Could you please let us know how to us struts 2 app as a portlet.

    Regards
    Vishnu

    ReplyDelete

Post a Comment

Popular posts from this blog

Web Clipping for Portals goes Mainstream

Firebase upgraded properties are not yet supported in Google Analytics App

eXo Portal Merges into JBoss Community