On Sat, Jan 29, 2005 at 02:31:32PM +0100, Andr? van Toly wrote:
> OK, but what would be a good MVC framework for MMBase?
Good question :-) The only "generic" MVC framework that I've attempted
to use with MMBase is struts, and I wasn't impressed - there is a lot of
overlap in functionality between struts and mmbase, but they don't really
interface nicely, so you end up with way too much code integrating the two.
> > > One of the concepts, i believe, that laid the
> >> fundament for the web was the iterative nature of
> >> HTML. You could (can) at every moment change the
> >> look of your page by fiddling with your
> >> HTML-tags. And that's also the nature of the
> >> current MMBase taglib, you can fiddle as much as
> >> you like until it looks right ;-)
> >
> >MVC is not about the look - It's talking about how the data on
>
> You are twisting my words. With 'looks right', i
> meant it works the way you want it to...
>
> >the page is retrieved from the database and how you get user input back
> >in the database. You can still use jsp's and taglibs to query the model
> >classes and display some nice html. In fact, that is basically what
>
> ... in the way it puts data on a page or gets it
> from a user. Just like you are saying here.
Ok, I misinterpreted you then. I agree it should be easy to adapt your code
to changeing requirements and/or grow the system incrementally.
> >MMBase is doing already, it just doesn't really have a controller
> >(usually everything, including the cloud connector, is set up via the
>
> You mean like nobody has ever coded a controller
> for MMBase? If i read you correctly, you are
> suggesting a controller should be invented for
> MMBase or it should be done with some other
> software. MMBase is missing the c in mvc.
I think there are probably a lot of controllers coded for mmbase;
actually, controllers aren't really that hard to write - IMO the only
thing a controller should do is: 1. decide what action should be performed
on the data (if any) and 2. decide what view (jsp page) should be shown after
the action has been performed, basically:
Browser View Controller Model
. . . .
. HTTP Request . . .
+---------------------------------->+ .
| . | update model .
| . +-------------->+
| . | |
| . | return status |
| . +<--------------+
| . select view | .
| +<----------------+ .
| | . .
| | query state . .
| +-------------------------------->+
| | . |
| | . return state |
| +<--------------------------------+
| HTTP Response | . .
+<----------------+ . .
. . . .
I'm not sure if there already is a _generic_
controller that works nicely with MMBase, though.
Also, the schema above implies that the *Model* should probably be more
capable than the standard MMBase nodes / nodemanagers are right now. The
basic functionality is good enough, but IMHO they are too hard to extend
by the programmer.
Joost.
_______________________________________________
Developers mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/developers