Generic MVC Portlet Proposal:

Contact: tkuebler@cisco.com
Javadocs: http://www.kuebler.org/MVCPortlet

This actually refers to a set of classes that implement the idea.
 
MVC refers to the 'Model View Controller' design pattern .  This idea is basically that you keep separate the data (Model) you want to display from the format the data is being displayed in (the View).  The merging of the two is handled by the Contoller.   More info on this design pattern can be found at Sun's Site.

As I see it the portlet should really be the implementation of a MVC system, and not actually hold any of the user developed components, simply implement the MVC, providing the developer with a framework to do her work in, and isolating her from the details of portal life in much the same way a servlet + struts does for the servlet world.

That is not to say however that the other portlets and way of developing can't co-exist happily with this new porlet.  I'm only proposing a new portlet, not doing away with all the others. :)

  1. Simplify portlet development lifecyle by removing one of the three components from the developer landscape.

  2. Make the MVC design pattern available to all  portlet types in a consistent manner.

  3. Supporting a new view technology becomes simpler, all a developer has to do is read and implement the ViewProcessor interface and add the entry into the registry or prefs file


  4. The view is cleanly abstracted and clear, ie you dont' read a portlet API to figure out how a template gets processed.


  5. It doesn't tie you to the 1 portlet = 1 view technology scenario, you could easily add the ability to set the template type and name as part of the request parameters, mixing view technology for a single portlet, all controlled by the action and requiring no new portlet.


  6.  If the function of the current subclassing approach is to provide the same functionality (ie view processing) over and over again, that sounds more like a pluggable component factory pattern to me.

Developers use this Portlet by defining  their portlet to be a GMVCP portlet in the portlet registry entry and then developing a template in JSP/Velocity/XSLT and an Action that places the data into the Generic Context used during View processing.  For more info on it's usage read the javadocs