You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by Tony Giaccone <tg...@gmail.com> on 2013/09/12 05:10:21 UTC

Design Patterns

	

I'm going to do a demonstration of Cayenne at work in the next few days. As part of that I'd like too present some architecture diagrams and perhaps some examples of cayenne design patterns. Does anyone have some examples or diagrams they would like to share that might help me make this case?



Tony Giaccone

Re: Design Patterns

Posted by Andrus Adamchik <an...@objectstyle.org>.
Hi Tony,

Here are my slides from WOWODC this year. This may give some ideas. Feel free to borrow anything you want from it:

http://www.slideshare.net/wocommunity/2-apache-cayenneforwebobjectsdevelopers

Regarding architecture, the basic stack structure, is this:

  ObjectContext (many) -> DataChannel (one)

DataChannel is a data access abstraction that is either another ObjectContext or (most commonly) - a DataDomain. DotaDomain is the "end of the line" in the potential multi-step chain of channels. It is a singleton in a stack. DataDomain's own structure is this:

  DataDomain (one) -> DataNode (one or many)

Finally DataNode is a wrapper around a single JDBC DataSource. 

For the end user there is an alternative view of the above (see slide 34) - Cayenne stack is simply a DI container full of collaborating services, and wrapped by ServerRuntime facade. 90% of the time the user interacts with ObjectContext and ServerRuntime. 10% of the time the user may want to pick inside the container to customize/override some service.

HTH

Andrus 


On Sep 12, 2013, at 6:10 AM, Tony Giaccone <tg...@gmail.com> wrote:
> I'm going to do a demonstration of Cayenne at work in the next few days. As part of that I'd like too present some architecture diagrams and perhaps some examples of cayenne design patterns. Does anyone have some examples or diagrams they would like to share that might help me make this case?
> 
> 
> 
> Tony Giaccone