James Pic wrote:
> Hi Kore and everybody !
> 
> I tryed to merge your requirements.
> New document : http://xrl.us/bfe6f
> Diff: http://xrl.us/bfe53
> 
> A few questions remain :
> 
> 0) About the I/O routers tieins, it's up to the user to decide wheter
> to use URL-mapping or URL-generation/parsing.
> Which should the tiein use ?
> It's clear that URL-mapping will be *slightly* more complex and suit
> high-loads, though URL-generation/parsing is *slightly* simpler and
> suits sites without high-loads (intranets ...).
> I like both ideas, i think that both tieins should be supplied, though
> we should decide of one in a first stage.
> 
> 1) Should controllers have the hand on views ?
> This should be up to the user, it's possible to add a "template_path"
> variable to the output object to be used by the output-router.
> But again, should the output-router Template-tiein expect the controller
> to return a "template_path" ?
> I think that it's better to demonstrate how it's possible to do without
> having the controller to decide of the template, using a 
> controller-template mapping.
> 
> Let me define a rather common use-case.
> A website has three dynamic zones : main, basket and navigation.
> We discussed of this with Laurent Jouanneau (creator of Jelix), he decided
> to make a controller of "main" and "zones" for basket and navigation.
> However, the current requirements involve zone/controller abstraction.
> 
> So, there should be three controllers : $main, basket and navigation.
> The input router should select the $main controller, and run "basket" and 
> "navigation" anyway.
> The output-router should use outputs of these controllers to generate :
> - the "layout" template,
> - the "main" template,
> - the "navigation" template,
> - the "basket" template.
> 
> Once the "main" is inserted in the "layout", the new "layout" should
> have variables to locate placement for "navigation" and "basket".
> 
> Result : any combination of templates is possible and controllers did not
> need to select the template.

Hi all,

I was following the discussion about the MvcTools and it looks good so 
far. Good job James and the others!

However I don't really understand everything as it all looks too 
complex. Only in this last mail I see a practical example with the 
basket and the navigation zones. It would have been nice to see more of 
these examples along the way.

But looking at this example, I see a "kill mosquitos with the cannon" 
approach: why is it so complicated that you need 3 controllers, an input 
router and output router just to display a template on the screen?

I don't think that the average web developer knows about things like 
controller and router. He probably knows how to read input from $_GET, 
filter the input, run some SQL queries, create a Template object, pass 
some values to it and voilà! a page is displayed. How would controllers 
and routers simplify these things, or even how would they help in any way?

So I would like to see the answers to the questions:

- why do we need MVC?

- how to use MVC?

- what benefits does MVC have?

Looking forward for the development of these ideas!

Cheers,
Alex.

-- 
Alexandru Stanoi
eZ Components System Developer
eZ Systems | http://ez.no
-- 
Components mailing list
Components@lists.ez.no
http://lists.ez.no/mailman/listinfo/components

Reply via email to