Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 29437 invoked from network); 31 Oct 2003 15:25:26 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 31 Oct 2003 15:25:26 -0000 Received: (qmail 11290 invoked by uid 500); 31 Oct 2003 15:25:18 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 11154 invoked by uid 500); 31 Oct 2003 15:25:17 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: dev@cocoon.apache.org Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 11141 invoked from network); 31 Oct 2003 15:25:17 -0000 Received: from unknown (HELO main.gmane.org) (80.91.224.249) by daedalus.apache.org with SMTP; 31 Oct 2003 15:25:17 -0000 Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1AFb9L-00005F-00 for ; Fri, 31 Oct 2003 16:25:19 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: dev@cocoon.apache.org Received: from sea.gmane.org ([80.91.224.252]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AFb9J-000056-00 for ; Fri, 31 Oct 2003 16:25:17 +0100 Received: from news by sea.gmane.org with local (Exim 3.35 #1 (Debian)) id 1AFb9J-0002uE-00 for ; Fri, 31 Oct 2003 16:25:17 +0100 From: Sylvain Wallez Subject: [RT] Direct Form->SQL mapping through OJB and DynaBeans Date: Fri, 31 Oct 2003 16:25:17 +0100 Lines: 33 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@sea.gmane.org User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031007 X-Accept-Language: fr, en, en-us Sender: news 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 Hi, Some people to which I demonstrated Woody and Flowscript asked me how we can directly map forms to a database. Yeah, I know that architecturally having intermediate domain objects is better, but it seems a bit overkill when what you need is just a simple CRUD front-end to a database and have no additional logic. Writing a SQL binding for forms seems a complicated beast to me (maybe I'm wrong as I'm not very fluent in SQL), so I was thinking of using tools that would to the dirty work for me. And here comes (Antonio, you'll be happy!!) OJB, which AFAIK can persist DynaBeans [1]. So what about adding a getBean() to the widget interface that would return a DynaBean wrapper of the form widgets? A simple OJB mapping file and voil�, persistant forms! What do you think? Sylvain [1] http://jakarta.apache.org/commons/beanutils/api/org/apache/commons/beanutils/DynaBean.html -- Sylvain Wallez Anyware Technologies http://www.apache.org/~sylvain http://www.anyware-tech.com { XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects } Orixo, the opensource XML business alliance - http://www.orixo.com