On Fri, Jan 28, 2005 at 10:32:53AM +0100, Wouter Heijke wrote:
> To me using "news,posrel,images" notation inside a tag is already
> something that should then be done inside a controller.

I disagree - this is something that should be done by the model:
news.getImages() or something should implement the query - it's annoying to
have to know that the relation is a posrel when what you want is an
ordered list of images related to the news object, and it makes it hard
to change the datamodel later. The news class/builder/whatever should 
be the place to implement this.

Ofcourse, right now it's not easy to extend a node (except sort of via the
functions framework), and building a new model "on top of" the bride nodes
(encapsulating the nodes and nodemanagers) gets you in all kinds of
trouble, so I'm not sure how to do this "right" in MMBase...


> With this in mind i have been using struts tiles. It puts 'queries' like
> this in a config file, the query itself is executed by a struts controller
> accessing MMBase through the bridge, in your presentation jsp you then
> 'insert' this 'definition' which is just a name with a simple tag:
> 
> <tiles:insert definition="news"/>

I have never seen this part of struts, looks interesting, at least it
shouold make it easier to re-use queries throughout your jsp's. though I still
don't like the separation of the model and the queries - for reasons
stated above.

Joost.

_______________________________________________
Developers mailing list
Developers@lists.mmbase.org
http://lists.mmbase.org/mailman/listinfo/developers

Reply via email to