Return-Path: Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: (qmail 45176 invoked from network); 1 Apr 2010 06:15:18 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 1 Apr 2010 06:15:18 -0000 Received: (qmail 43497 invoked by uid 500); 1 Apr 2010 06:15:18 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 43351 invoked by uid 500); 1 Apr 2010 06:15:16 -0000 Mailing-List: contact user-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cayenne.apache.org Delivered-To: mailing list user@cayenne.apache.org Received: (qmail 43343 invoked by uid 99); 1 Apr 2010 06:15:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Apr 2010 06:15:15 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [209.191.69.70] (HELO web30308.mail.mud.yahoo.com) (209.191.69.70) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 01 Apr 2010 06:15:10 +0000 Received: (qmail 79545 invoked by uid 60001); 1 Apr 2010 06:14:47 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1270102487; bh=0CLJH+xTgM+yDnjlqgT0KjB+XA5Cf/fteign5kJqX7U=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=DprM5+gLkPf4cf8xeDgOHDKucsQaqg6SxugJhRAlTtaLD6qMKequ6UntXy0lxcb2LwJgXoNgfYTRk2dlFTjk1C/V85EFiMUzrnKScU4M0y6dQA/20+3SIdhmd5ETKFxZfN+iL2BCktDuxBGJbMBOEodfNviSnnO/V1XTszMyAyo= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=niDLaA1vwMxzMYnWX8PlU0UjRUthcFX+F7HLSFZtnpTrUSr4sMLIFSRrxh+7GPgV7taEBbpATRLoescAkvJ7P+N+cUpSwLHQUWIUkfEbztEmt2j/Wg/CUPRc5b78Xm6qWjhK6ZEsKfpGuoGXD9ofvSz1JNG1aVFb9oXYb3PqvhI=; Message-ID: <674221.78330.qm@web30308.mail.mud.yahoo.com> X-YMail-OSG: oePHvmoVM1n65v._GLaOqKO7xyn3zeLUOH7ZrTZFIPMtrc7 FXLTMQTGcnrrlBcmTvJ1L1pC64dMH_Rhp20v2YyaAR9qS8NUu7gAMnNY69He j2wfgzunyZDRn9qZ_o_9QNakjUr6Or1fmFy4f7ZW.NYF6C6L5rF.n2MPTdZZ evDiufIAJF.h_TRc.oLjr2b6SBD95VQ6lVGGrhkrUyY_6TYRO5tNY84siLVP aTIDD.OSj2rykHgAN6RFwZE_Omtr_My4fy7nGWNEfL6ex3a3S5I1IlPTZaJV sk1Tn7PC0PwFn8HVGrjQgjqH5Ls3rmkWjwsvkI4rapbhK0BjIJ8EXdyVETGB gJjFhnUytil97UHPqYhVpXPEYg40zi_Q- Received: from [95.0.156.2] by web30308.mail.mud.yahoo.com via HTTP; Wed, 31 Mar 2010 23:14:47 PDT X-Mailer: YahooMailRC/324.3 YahooMailWebService/0.8.100.260964 References: <8617BC00-7762-4F16-B38D-14C4EC5AA400@objectstyle.org> Date: Wed, 31 Mar 2010 23:14:47 -0700 (PDT) From: Erdinc Subject: Re: Cayenne pattern quesiton To: user@cayenne.apache.org In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-838334436-1270102487=:78330" --0-838334436-1270102487=:78330 Content-Type: text/plain; charset=us-ascii I agree. My favorite method is to use Domain Driven Design techniques. ________________________________ From: Malcolm Edgar To: user Sent: Thu, April 1, 2010 6:32:05 AM Subject: Re: Cayenne pattern quesiton I would argue against putting finder methods in the generated entities, as I think it is a separate concern and you can easily end up with tightly coupled code which is difficult to refactor. The "Rich Domain" model can end up becoming the "Blob" anti-pattern. I don't think stateful entities objects should be be mixed up with static finder methods. regards Malcolm Edgar On Wed, Mar 31, 2010 at 6:10 PM, Andrus Adamchik wrote: > Also I suspect I am not using a classic version of DAO. My DAO's are morphed > with the "business layer" and can have interactions with other subsystems, > not just Cayenne (e.g. caching, data access via web services, etc.). Also > they are not auto-generated, as any new methods are created when a need in > them arises in the application. The idea is to keep it tight and avoid > having any unused and unneeded methods. > > Andrus > > On Mar 31, 2010, at 10:02 AM, Andrus Adamchik wrote: > >> I am using a form of DAOs (with injection) with the main reason being that >> I can provide alternative implementations in a context-sensitive manner >> without changing the DAO interface (something that can't be done with the >> static methods), which is very handy in numerous situations. >> >> Andrus >> >> >> On Mar 30, 2010, at 11:51 PM, MGargano@escholar.com wrote: >>> >>> When using Cayenne are DAO's still the pattern used for findAll, >>> findByProperty, and findById query methods or is there some better way to >>> do this in Cayenne? For example in the pet store project I see DAO's >>> being implemented, but I know that example was taken from other projects >>> that use DAO's to begin with so I'm not sure if it was just retrofitted >>> to >>> use DAO's with Cayenne. I tried to look at some other examples from the >>> website, but most of those are either not complex enough to warrant that >>> kind of structure or the links are dead. I hope this is clear. :) Also >>> if DAO's are the recommended pattern to use is there a tool (i.e. eclipse >>> plugin) that will generate them? >>> >>> Thanks. >>> -Mike >> >> > > --0-838334436-1270102487=:78330--