[Nitro] Views and Templating
George Moschovitis
george.moschovitis at gmail.com
Wed Sep 7 11:00:04 EDT 2005
Hello Peter,
> The V part of MVC feels neglected. Actions and views seem to be the
> ...
> circumstance entails. Here are some problems that arise:
I agree that the View part is quite important. My experience is that
this is often the most time consuming part in developing a web
application.
> - I'd like to ask for some model object ("entity"?) to express itself
> in some way, I have to do some work to track down the right view. I'd
> ...
> do that. This becomes a problem if the view is associated with a
> different Controller.
You can do that. In fact even the scaffold system injects methods like
to_href or to_link into managed objects. You can add a custom
to_summary method if you want. There is also support for forms:
#{form_for obj}
> - If I want a site-wide (across Controllers) generic page template,
> ...
> like to see.
If i understand this correctly, you propose something like the layout
system of Rails.
Even though I don't think this system is flexible enough for many
common cases (at least for several of my projects it is unusable) I
plan to add this functionality (it is useful for the scaffolder for
example). Of course I would prefer to receive a patch for this ;-)
> All of this is informed by Zope's Page Templates (ZPT, TAL, and
> ..
> copy of Plone or something and see how it works. Having actions and
> views coupled tightly precludes this kind of behavior.
I have no much experience with Zope. Can you provide some better examples?
thanks,
George
--
http://www.gmosx.com
http://www.navel.gr
http://www.nitrohq.com
More information about the Nitro-general
mailing list