Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 25588 invoked from network); 6 May 2004 16:16:33 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 6 May 2004 16:16:33 -0000 Received: (qmail 95862 invoked by uid 500); 6 May 2004 16:11:05 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 95812 invoked by uid 500); 6 May 2004 16:11:05 -0000 Mailing-List: contact users-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: users@cocoon.apache.org Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 95712 invoked from network); 6 May 2004 16:11:04 -0000 Received: from unknown (HELO confixx.bestiole.ch) (66.111.0.243) by daedalus.apache.org with SMTP; 6 May 2004 16:11:04 -0000 Received: from [192.168.1.34] (lsn-boi-catv-c121-p001.vtx.ch [212.147.121.1]) by confixx.bestiole.ch (8.11.6/8.11.6) with ESMTP id i46GB1417669 for ; Thu, 6 May 2004 18:11:02 +0200 Mime-Version: 1.0 (Apple Message framework v613) In-Reply-To: References: Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: quoted-printable From: Bertrand Delacretaz Subject: Re: Business Objects vs Data Objects [was Re: JXTemplates - what's in a name?] Date: Thu, 6 May 2004 18:11:01 +0200 To: users@cocoon.apache.org X-Mailer: Apple Mail (2.613) X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Le 6 mai 04, =E0 09:44, Derek Hohls a =E9crit : > Bertand > > Is there not a difference between a Java "business > object" (which I assume in a Cocoon app will be a > POJO - even though I do not now know where and > how to create this...) and "data access object" - at > least that what the Core J2EE patterns imply > http://java.sun.com/blueprints/corej2eepatterns/Patterns/=20 > DataAccessObject.html To be strict, yes: a DAO's role would be to interface with a database, =20= save and retrieve data, that's it. Whereas a "business object" usually means an object that sits on top of =20= DAOs (or other data access methods) and implements business rules, =20 aggregations, etc. But I think this is not terribly important when talking about how to =20 interface Cocoon with Java objects. Basically, if you're using Flow as a front-end to business logic and/or =20= data access stuff written in java, the Flow needs to: 1) Access the java objects 2) tell them to load the required data 3) manipulate the data (maybe with CForms) - the java objects are most =20= often not used for this step 4) tell the java objects to save the modified data That's it, and this is demonstrated (although in a very simple and =20 limited way) by the bean editor app in the supersonic block. The objects shown there do not use a database, the data is just being =20= held in memory. But adding database load/save would happen only in the =20= java world, without requiring further interaction with Flow (other than =20= Flow calling the load/save methods at the right times). Also, this example app uses a simple instantiation for 1), but if you =20= really make your java objects play with the Cocoon framework, you'd =20 want to use the Avalon object lookup mechanisms for this. It's a bit =20 more complicated but not that much. Hope this helps! -Bertrand --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org For additional commands, e-mail: users-help@cocoon.apache.org