You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by Todd Kuebler <tk...@cisco.com> on 2003/02/26 23:18:28 UTC

Generic MVC Portlet Proposal

Hi folks,

I've noticed that one of the barriers to entry for portlet development is 
learning all the different portlets including their inconsistencies in 
handling events, etc.   I have a proposal that might help that and wanted 
your input.  IMHO it would be extremely useful to have a base portlet that 
would implement the MVC paradigm in a portlet context and de couple the 
action handling  and context idea from the specific templating language.

I've got a working prototype including a hello world example that uses the 
same portlet and action for JSP and Velocity templates.  I have included 
the UML diagrams for your perusal.  The package names, ect would obviously 
be different.

Summary:

1) A base portlet that includes common action handling and context support 
for all MVC type portlets such as JSP,Velocity,etc.
2) It should encapsulate/implement the basic MVC idea and provide action 
event handling similar to the current velocity portlet.
3) Support for different View technology will be through a 
ViewProcessorFactory that returns a ViewProcessor (JSPViewProcessor,etc)
	- consumes the context
	- init during portlet init cycle with the portlet object
	- evoked after action handling
	- view type, etc is determined by portlet registry entry
	- the mapping of the type to class/module will happen via a ViewFactory 
properties file
	- returns the same type as the getContent() method of the Portlet

4) Developers will typically only write actions and templates 
(JSP,velocity,XSLT,etc).
5) There will be a common context object for all templating types containing *
		- rundata object reference
		- portlet object reference
		- js_peid string
		- portlet config object reference

6) The initial implementation should provide support for JSP, Velocity, 
RSS, HTML, and XSLT.
7) Future versions should include support for WebServices, etc
8) It will extend the jetspeed AbstractInstancePortlet


* note on #4: The XSLT ViewProcessor will be a little different/difficult 
due to XSLT's runtime-static-variable nature (ie, you can't do things like 
use variable substitution from the data source to do XPath pattern 
matching) and lack of context idea.  Maybe the context objects listed will 
be added to the xml input as xml (limited) or the xalan-java extensions 
will be used to allow them to be accessed within the style sheet via custom 
tags.  Another option would be to support template chaining and 
pre-processing (parse the data to create a style sheet to be used on the 
data). Another option would be to use some other templating technology to 
create the style sheets dynamically (jsp templates to create the xsl 
templates).  Ideas here are definately welcome.


%regards -tk

Re: Updated MVC Portlet Proposal - website

Posted by Werner Ramaekers <we...@shiftat.com>.
looks great and i'm sure i can benefit from it, can not speak for others 
though,
please open a case in bugzilla so that we can have a look at the code 
(and also attach the contents of the page)

thanks

Werner

Todd Kuebler wrote:

> Got this pretty well done and working for my project here at work and 
> moving on to something else, but wanted to double check if there was 
> any interest in it before I took the website down.  If there is 
> positive interest I'll be happy to open a bugzilla case and attach the 
> code, otherwise no sweat and saves us all a lot of work.  :)
>
>
> -tk
>
>
> At 02:37 PM 2/28/2003 -0800, Todd Kuebler wrote:
>
>> You can see the modified proposal, integrated UML diagram and 
>> javadocs at:
>>
>>  http://www.kuebler.org/MVCPortlet/MVCPortlet.html
>>
>>
>> This is my home cable connection, so go gentle on it. ;)
>>
>>
>> %regards -tk
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org
>
>

-- 
----------------------------------------------------------------------
ir. Werner Ramaekers
Enterprise Java Solutions Architect - Shift@
BeJUG steering committee member
JBoss Certified Services Partner

Read my Blog at http://www.werner.be
"May the source be with you."
----------------------------------------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Re: Updated MVC Portlet Proposal - website

Posted by Todd Kuebler <tk...@cisco.com>.
Got this pretty well done and working for my project here at work and 
moving on to something else, but wanted to double check if there was any 
interest in it before I took the website down.  If there is positive 
interest I'll be happy to open a bugzilla case and attach the code, 
otherwise no sweat and saves us all a lot of work.  :)


-tk


At 02:37 PM 2/28/2003 -0800, Todd Kuebler wrote:

>You can see the modified proposal, integrated UML diagram and javadocs at:
>
>  http://www.kuebler.org/MVCPortlet/MVCPortlet.html
>
>
>This is my home cable connection, so go gentle on it. ;)
>
>
>%regards -tk
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Updated MVC Portlet Proposal - website

Posted by Todd Kuebler <tk...@cisco.com>.
You can see the modified proposal, integrated UML diagram and javadocs at:

  http://www.kuebler.org/MVCPortlet/MVCPortlet.html


This is my home cable connection, so go gentle on it. ;)


%regards -tk

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Re: Generic MVC Portlet Proposal

Posted by Todd Kuebler <tk...@cisco.com>.
I'm resending the attachments, look like they didn't take the first time.

-tk