[Zope] Model-View-Controller in Zope

Paolo Bizzarri p.bizzarri at icube.it
Tue Jul 20 03:03:29 EDT 2004


Hi Roche,

> > The only real doubt is that this approach seems not really Zopish, so we
> > were wondering if there are other, more Zopish way of doing things.
>
> Seems Zope enough for me, what makes you think otherwise?
>
> PageTemplates by design discourage embedding domain logic, and most
> product developers put their business logic in Python classes. So
> already there's your model and view. Not many product developers
> incorporate the idea of a controller into their products, because it
> only begins to make sense and worth the effort in more involved business
> apps.

Yes and no. In Zope, as far as I understand, there are two objects:

- content, that mantains information;

- view (Page Templates) that provide presentation services.

Our point of view is more structured:

- domain objects, containing the domain application logic and information

- page controllers, that manage the interaction with the user and provide 
encapsulation for all the presentation-related information;

- last Page Templates, that provide only HTML view.

Also, in our view,  a Controller is a complete separate object instance, one 
for each user. This allows the object itself to have all the context 
information that are local to the object. You do not have to pass lot of 
context information to the object itself, beacuse each object has its 
separate information.

What do you think ?

Best regards.

Paolo

-- 
Paolo Bizzarri - President - Icube S.r.l.
Address:   	Via Ridolfi 15 - 56124 Pisa (PI), Italy
E-mail:	p.bizzarri at icube.it	Web:	http://www.icube.it
Phone:	(+39) 050 97 02 07	Fax: 	(+39) 050 31 36 588


More information about the Zope mailing list