Re: [Zope] How to make good architecture in Zope2?

2005-12-21 Thread Roman Suzi

Lennart Regebro wrote:


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:
http://codespeak.net/z3/five/

Five is included with Zope 2 since Zope 2.8.
 



Thank you for hints, Lennart. They are quite helpful. Its hard for me to 
competently say anything more on this as some time is required to

learn and try Five.

 


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).
 


This example is also interesting, thanks!


--
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/
 



___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] How to make good architecture in Zope2?

2005-12-20 Thread Roman Suzi

Hi!

This question is not about how to make a Zope2 product, but how to get 
most from separating concerns while making Web application in Zope2.


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? Or is it even possible in Zope2 to go that far 
without doing to much adaptation?


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?
(What about delegation?) Is there any pattern which doesn't look strange 
in Zope2 while letting me do what I described above?


Thank you in advance!

Regards,
Roman Suzi

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] How to make good architecture in Zope2?

2005-12-20 Thread Lennart Regebro
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:
http://codespeak.net/z3/five/

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
subclassing.

 (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
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )