You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Hildebrandt, Ole" <ol...@eds.com> on 2004/05/07 16:42:26 UTC

MVC-Design issues - use Struts for M and C?

Hi,

I followed parts of the discussion about where to locate business logic, or
more generally speaking, how to apply MVC in Cocoon. I am quite new to
cocoon and i don't want to step on anyones toes, but i think that the C
capabilities in Cocoon are not satisfying. I do think that the V parts in
Cocoon are amazing, probably because cocoon used to be a publishing
framework.

In my personal usecase I am going to implement an informationportal platform
which is going to be used by several internet sites. So the need for an
XML/XSL approach is obvious and cocoon seems to be a good choice to do that.
But each of these sites might optionally  have a partially different
applicationflow and different business logic and data, but they must not!
So i was searching the documentation and also posting in the list to find a
useful solution for having a most flexible controller in cocoon.  Regarding
to the documentation and some postings in the list the best approach would
be to use Flowscript as controller. But this doesn't seem a good idea to me
since you cannot use the possibilities the java language offers
(inheritance, using OO-design patterns) so I am afraid there is going to be
a big mess. (Correct me if i am wrong with this). 

So I came up with the idea to use Struts' controller and Model capabilities,
since they are very good and flexible, and integrate Cocoon to be the View,
since cocoon is very good at that. So all the business logic and
application-flow-controll resides within Struts, and the resulting data is
passed via the Request-Object to a cocoon pipeline which performs the
XML-Processing. 

So here is my question: Has anyone tried that before or Is there any chance
to implement a struts-equivalent controller in cocoon?

Kind Regards

Ole












---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: MVC-Design issues - use Struts for M and C?

Posted by Joerg Heinicke <jo...@gmx.de>.
On 07.05.2004 16:42, Hildebrandt, Ole wrote:

> So I came up with the idea to use Struts' controller and Model capabilities,
> since they are very good and flexible, and integrate Cocoon to be the View,
> since cocoon is very good at that. So all the business logic and
> application-flow-controll resides within Struts, and the resulting data is
> passed via the Request-Object to a cocoon pipeline which performs the
> XML-Processing. 
> 
> So here is my question: Has anyone tried that before or Is there any chance
> to implement a struts-equivalent controller in cocoon?

There are Struts-Cocoon integration projects:
http://wiki.cocoondev.org/Wiki.jsp?page=Struts
http://struts.sf.net/struts-cocoon/

Other project focus on Struts and XSLT:
http://stxx.sourceforge.net/
http://it.cappuccinonet.com/strutscx/index.php
But they are probably not that flexible as Cocoon

Joerg

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: MVC-Design issues - use Struts for M and C?

Posted by Ugo Cei <u....@cbim.it>.
Hildebrandt, Ole wrote:
> So i was searching the documentation and also posting in the list to find a
> useful solution for having a most flexible controller in cocoon.  Regarding
> to the documentation and some postings in the list the best approach would
> be to use Flowscript as controller. But this doesn't seem a good idea to me
> since you cannot use the possibilities the java language offers
> (inheritance, using OO-design patterns) so I am afraid there is going to be
> a big mess. (Correct me if i am wrong with this). 

I'd like to correct you. First of all, Javascript as implemented by 
Rhino offers many OO features. Second, you can instantiate any Java 
object from the flowscript, so there are really no limits to what you 
can do, and how many patterns you can apply.

> So here is my question: Has anyone tried that before or Is there any chance
> to implement a struts-equivalent controller in cocoon?

Can't comment on that, having never used Struts. From what I've heard, 
you'd get no benefit from this approach, unless you have a large code 
base based upon Struts that you want to reuse.

	Ugo


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org