On 12/20/05, Roman Suzi <[EMAIL PROTECTED]> wrote:
> Lets suppose that I've done OO Analysis and have a dozen of nice classes
> which model my problem domain. Lets also suppose that I did it on the
> basis of known use cases. Now I want to build Web application fulfilling
> those use cases but  separate my  classes from Zope framework (Ok,  some
> of them could be taken from Zope framework, like user folder), so that I
> can see the problem domain abstractions in the clear, without a mess of
> miriads of Presentation injections.
> (I'd liked to put presentation-related things into other classes and ZPTs)
> Are there any good examples out there, or any good architectural
> solutions for that?

Yes. Zope 3. ;)
Zope 3 adresses several of these questions, especially the separation
of presentation from logic on a class bases. And of you can't use Zope
3, then you can use the same principals under Zope 2 thanks to the
Five technology:

Five is included with Zope 2 since Zope 2.8.

> Or is it even possible in Zope2 to go that far
> without doing to much adaptation?

No problems at all. Nuxeos new calendar product is done exactly like
that, even to the point that the base classes are in a separate
product (CalCore) that could be used outside of Zope, the UI is in
another product (CalZope) that provides all the pages, and we have
integration with CPS in a third product (a Plone integration,
CalPlone, is in progress).

> What I see in real world examples, is extensive use of mix-ins. Is it
> the only feasible way to at least textually separate Logic from
> Presentation?

Not at all, if you don't want to do it the Z3 way, you can do it with

> (What about delegation?)

Well, I guess that's pretty much what zope 3 does. The presentation is
done in separate classes called view-classes.

Lennart Regebro, Nuxeo     http://www.nuxeo.com/
CPS Content Management     http://www.cps-project.org/
Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to