From acronce at earthlink.net Fri Nov 2 11:42:06 2007 From: acronce at earthlink.net (Allen Cronce) Date: Fri Nov 2 11:48:55 2007 Subject: Xcode update moves the ant directory Message-ID: <472B6F7E.5000907@earthlink.net> Hi all, We build both Mac and WO projects on the same automated build system. After upgrading to Xcode 2.5, we found that our standalone ant build broke with the following error: taskdef class org.objectstyle.woproject.ant.WOCompile cannot be found Upon investigation it appears that under Xcode 2.5, the ant/lib folder has moved from here: /Developer/Java/Ant/lib/ to here: /usr/share/ant/lib After copying the required woproject.jar to the above folder, the build worked. It looks like installing Xcode 3.0 also moves the ant directory to this same new location. Maybe someone who has write access to the WOProject-Ant section of the wiki could update the installation instructions for Xcode 2.5 and 3.0. Best, -- Allen Cronce From drwo at woteki.com Fri Nov 9 18:46:38 2007 From: drwo at woteki.com (Tom Woteki) Date: Fri Nov 9 19:46:47 2007 Subject: 2 wod problems migrating to WOLips Message-ID: <545916DC-9761-4177-AF83-0F714D0201D4@woteki.com> I'm making the leap but i have 2 problems. Any help much appreciated and thanks in advance: 1) I have a custom component declared as: package com.my.package; public class MyComponent extends WOComponent { ... } In a wod file I have: myComponent : com.my.package.MyComponent { ... } I get an error message on the wod saying: "The class for com.my.component.MyComponent is either missing or does not extend WOElement" However, the class is not missing. The class is in a framework that has been imported. And of course WOComponent extends WOElement. Help? 2) In the java source for a component I have: public Producer producer; // Producer is imported form elsewhere. Producer has a method "producer", i.e. producer.producer() returns a String; In the wod file for the component I have: PopUpButton1: WOPopUpButton { displayString = producer.producer; .... } I get the error message on the wod saying: "There is no key 'producer' for the keypath 'producer' ... ". But of course there is. Help? THanks very much. Tom -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman/archive/webobjects-dev/attachments/20071109/de06ddf3/attachment.html From chill at global-village.net Fri Nov 9 19:53:19 2007 From: chill at global-village.net (Chuck Hill) Date: Fri Nov 9 19:53:24 2007 Subject: 2 wod problems migrating to WOLips In-Reply-To: <545916DC-9761-4177-AF83-0F714D0201D4@woteki.com> References: <545916DC-9761-4177-AF83-0F714D0201D4@woteki.com> Message-ID: <549A2669-73B0-42D3-86C6-64EC6D44C61F@global-village.net> Hi Tom, This might be more appropriate to the WOLips list. Also knowing which version of Eclipse, WOLips, and WO your are using can narrow down potential issues. On Nov 9, 2007, at 6:46 PM, Tom Woteki wrote: > I'm making the leap but i have 2 problems. Any help much > appreciated and thanks in advance: > > 1) > > I have a custom component declared as: > > package com.my.package; > public class MyComponent extends WOComponent { ... } > > In a wod file I have: > > myComponent : com.my.package.MyComponent { ... } > > I get an error message on the wod saying: "The class for > com.my.component.MyComponent is either missing or does not extend > WOElement" > > However, the class is not missing. The class is in a framework that > has been imported. And of course WOComponent extends WOElement. > > Help? I usually chalk this up to "Eclipse being wigged out". Quit and restart Eclipse, do a clean and build of the, er, afflicted projects. > 2) > > In the java source for a component I have: > > public Producer producer; // Producer is imported form elsewhere. > > Producer has a method "producer", i.e. producer.producer() returns > a String; > > In the wod file for the component I have: > > PopUpButton1: WOPopUpButton { > displayString = producer.producer; > .... > } > > I get the error message on the wod saying: "There is no key > 'producer' for the keypath 'producer' ... ". But of course there is. > > Help? That might be the same problem. Is producer() public? HTH Chuck -- Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects From anders_peterson at optimatika.se Tue Nov 13 04:11:33 2007 From: anders_peterson at optimatika.se (Anders Peterson) Date: Tue Nov 13 04:34:48 2007 Subject: DAO with EOF Message-ID: <47399475.8040407@optimatika.se> Hi, I'd like to make my business objects independent of EOF. Thinking about doing doing this using the Data Access Object design pattern where the EOs are the DAOs and the BOs are POJOs. http://java.sun.com/blueprints/corej2eepatterns/Patterns/DataAccessObject.html Is (something like) this commonly done? Has anyone done it? /Anders From bob at apple.com Tue Nov 13 08:06:36 2007 From: bob at apple.com (Bob Frank) Date: Tue Nov 13 08:07:29 2007 Subject: MEETING: Chicago CocoaHeads / CAWUG - Leopard Dev Tools - Tuesday November 13th 7:00 PM In-Reply-To: <56D99030-558E-4FAD-B4EB-AC84E8B032AC@apple.com> References: <56D99030-558E-4FAD-B4EB-AC84E8B032AC@apple.com> Message-ID: <8D3E219D-1664-427C-B034-8681B35E2EB4@apple.com> IMPORTANT NOTES: Our meetings will be permanently starting at ** 7:00 ** instead of 6:00 We have a new mailing list URL: http://groups.google.com/group/cawug Email Address: cawug@googlegroups.com You can email here to subscribe immediately: cawug-subscribe@googlegroups.com -------- Hi all, Just a quick reminder. The Chicago CocoaHeads / Chicago Cocoa and WebObjects User Group (CAWUG) is holding our next meeting tonight Tuesday, November 13th, at 7:00 PM at the Apple Store on Michigan Ave. Agenda: - Introductions & Announcements - Bob on Lots of Leopard Dev Tools goodnes - Highlights of obscure features of Leopard Client & Server - adjournment to O'Toole's When: Tuesday, September 11th, 6:00 PM Where: Apple Store Michigan Avenue 679 North Michigan Ave. (at the corner of Huron & Michigan Ave.) Chicago, IL 60611 http://maps.yahoo.com/maps_result? ed=gYbE5Op_0Tokf_p7h61dwjbWtjC2r1YehzWw&csz=60611 http://tinyurl.com/26z5nb (in case long URL gets cut) - O'Tooles We will continue the discussion at our local watering hold Timothy O'Toole's at 622 Fairbanks (2 blocks east of the store). We also wish to thank the folks who run the theater space at the Apple store for letting us have our meetings there, and Jonathan 'Wolf' Rentzsch for hosting the new and revived CAWUG web site. Thanks all. Also, if you are working on a project and would like to talk about it briefly / promote it, I think it would be fun for people to hear about other people's projects. Please email me off line and you can talk at a future meeting or would like a book to review. Future meetings dates: 12/11/07 CAWUG Resources Mail list: http://groups.google.com/group/cawug Google Site: http://groups.google.com/group/cawug Web Site: http://www.cawug.org/ RSS feed: http://www.cawug.org/rss.xml iCal: http://ical.mac.com/chicagobob/ Chicago-CocoaHeads-CAWUG (view on the web) iCal: webcal://ical.mac.com/chicagobob/Chicago-CocoaHeads-CAWUG.ics (subscribe to in iCal) Cocoa Heads web site: http://cocoaheads.org/us/ChicagoIllinois/index.html Hope to see you at the meeting. -Bob From chill at global-village.net Tue Nov 13 11:29:01 2007 From: chill at global-village.net (Chuck Hill) Date: Tue Nov 13 11:29:18 2007 Subject: DAO with EOF In-Reply-To: <47399475.8040407@optimatika.se> References: <47399475.8040407@optimatika.se> Message-ID: <723ABB82-2172-4C95-9676-C7CBB263F7C0@global-village.net> On Nov 13, 2007, at 4:11 AM, Anders Peterson wrote: > Hi, > > I'd like to make my business objects independent of EOF. Thinking > about doing doing this using the Data Access Object design pattern > where the EOs are the DAOs and the BOs are POJOs. > > http://java.sun.com/blueprints/corej2eepatterns/Patterns/ > DataAccessObject.html > > Is (something like) this commonly done? Has anyone done it? I have never heard of anyone doing this with WO. Given how EOF works, I don't see it as being of great benefit. And you are still going to have to manage and pass around an EOEditingContext. If you still want to do this, EOGenerator will be a big help. Chuck -- Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects From markus at ruggiero.ch Wed Nov 14 02:43:41 2007 From: markus at ruggiero.ch (Markus Ruggiero) Date: Wed Nov 14 02:44:13 2007 Subject: Managing structural DB changes Message-ID: <47DAB262-C097-4BE7-B872-BB14AF35ABF6@ruggiero.ch> This may be OT in direct relation to WO but certainly not in relation to deployment of large scale db apps. I am sure some (all?) of you have or will have at one point in time the following problem: You deploy your version 1.0 application at a customer site with a certain database structure. Now you continue developing your app and soon the greatest new version 2.0 will be available. However the database structure has changed and you face the problem that you have to upgrade the database at the customers site. A simple export / drop tables / create tables / import is not doable because you may have to split or join tables, move attributes to different tables, and make incompatible changes to data types. How do you manage such a scenario? In my case the application manages third party devices (phones). Now every couple of months the vendors update those devices or throw completely new ones with new capabilities on the market. Our customers expect our application to support those new phones and the new or changed features. As we are managing different phones from different vendors in a unified way we have to update our datamodel all the time. As this is an app for the corporate high end market we have customers with different releases. Sometimes we have to upgrade a customer from V2 to V3, sometimes it is V2.1 to V2.2 or V2.8 to V3.4. This means that upgrades are incremental but the necessary increments may change from installation to installation Any and all inputs very welcome Thanks and have a nice day ---markus--- Markus Ruggiero rucotec consulting and technologies email mailto:markus.ruggiero@rucotec.ch rucotec GmbH web http://www.rucotec.ch Steinentorstrasse 8 4051 Basel Mobile +41 (0)79 508 4701 Switzerland Phone/Fax +41 (0)61 271 4990 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman/archive/webobjects-dev/attachments/20071114/cbd826ab/attachment.html From werner at isd.uni-stuttgart.de Wed Nov 14 03:01:26 2007 From: werner at isd.uni-stuttgart.de (Johann Werner) Date: Wed Nov 14 03:08:11 2007 Subject: Managing structural DB changes In-Reply-To: <47DAB262-C097-4BE7-B872-BB14AF35ABF6@ruggiero.ch> References: <47DAB262-C097-4BE7-B872-BB14AF35ABF6@ruggiero.ch> Message-ID: <0BE67B9E-C21C-4B22-B750-D71C7035E3B0@isd.uni-stuttgart.de> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2176 bytes Desc: not available Url : /mailman/archive/webobjects-dev/attachments/20071114/cbf2eebe/smime.bin From kieran_lists at mac.com Wed Nov 14 04:27:22 2007 From: kieran_lists at mac.com (Kieran Kelleher) Date: Wed Nov 14 04:27:32 2007 Subject: Managing structural DB changes In-Reply-To: <47DAB262-C097-4BE7-B872-BB14AF35ABF6@ruggiero.ch> References: <47DAB262-C097-4BE7-B872-BB14AF35ABF6@ruggiero.ch> Message-ID: On a side note, if one discovers that certain aspects of your application infrastructure has to be painfully changed to reflect "normal variability" in the domain that your app is servicing, then you need you rethink your application design or data model. You need to model a way to add new phones and new phone features without changing your eomodel. Just my 2 cents. Regards, Kieran On Nov 14, 2007, at 5:43 AM, Markus Ruggiero wrote: > This may be OT in direct relation to WO but certainly not in > relation to deployment of large scale db apps. > > I am sure some (all?) of you have or will have at one point in time > the following problem: > > You deploy your version 1.0 application at a customer site with a > certain database structure. Now you continue developing your app > and soon the greatest new version 2.0 will be available. However > the database structure has changed and you face the problem that > you have to upgrade the database at the customers site. A simple > export / drop tables / create tables / import is not doable because > you may have to split or join tables, move attributes to different > tables, and make incompatible changes to data types. > > How do you manage such a scenario? In my case the application > manages third party devices (phones). Now every couple of months > the vendors update those devices or throw completely new ones with > new capabilities on the market. Our customers expect our > application to support those new phones and the new or changed > features. As we are managing different phones from different > vendors in a unified way we have to update our datamodel all the > time. As this is an app for the corporate high end market we have > customers with different releases. Sometimes we have to upgrade a > customer from V2 to V3, sometimes it is V2.1 to V2.2 or V2.8 to > V3.4. This means that upgrades are incremental but the necessary > increments may change from installation to installation > > Any and all inputs very welcome > Thanks and have a nice day > > ---markus--- > > Markus Ruggiero > rucotec consulting and technologies email > mailto:markus.ruggiero@rucotec.ch > rucotec GmbH web http://www.rucotec.ch > Steinentorstrasse 8 > 4051 Basel Mobile +41 (0)79 508 4701 > Switzerland Phone/Fax +41 (0)61 271 4990 > > > _______________________________________________ > WebObjects-dev mailing list > WebObjects-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/webobjects-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman/archive/webobjects-dev/attachments/20071114/5e40e8d5/attachment.html From mschrag at mdimension.com Wed Nov 14 05:19:48 2007 From: mschrag at mdimension.com (Mike Schrag) Date: Wed Nov 14 06:03:56 2007 Subject: Managing structural DB changes In-Reply-To: <0BE67B9E-C21C-4B22-B750-D71C7035E3B0@isd.uni-stuttgart.de> References: <47DAB262-C097-4BE7-B872-BB14AF35ABF6@ruggiero.ch> <0BE67B9E-C21C-4B22-B750-D71C7035E3B0@isd.uni-stuttgart.de> Message-ID: <052C0FB1-DBDE-496F-BE3B-95E4EB9E1BAB@mdimension.com> If you use Project Wonder, definitely look at the er.extensions.migration system ... It's based on this original stepwise article with LOTS of bells and whistles added (framework dependencies, (for very common changes) a SQL-less migration API, etc). ms On Nov 14, 2007, at 6:01 AM, Johann Werner wrote: > Hi Markus, > > have a look at http://www.stepwise.com/Articles/2005/DBChanges/index.html > for a database updater. For each db version you use with your > different app versions you have an incremental change class. So you > have classes that update V2->V2.1, V2.1->V2.2, ... > When your app launches it will look in a special table that it > creates in your database on which version it is and updates it to > the last version it has update classes for. > > jw > > Am 14.11.2007 um 11:43 schrieb Markus Ruggiero: > >> This may be OT in direct relation to WO but certainly not in >> relation to deployment of large scale db apps. >> >> I am sure some (all?) of you have or will have at one point in time >> the following problem: >> >> You deploy your version 1.0 application at a customer site with a >> certain database structure. Now you continue developing your app >> and soon the greatest new version 2.0 will be available. However >> the database structure has changed and you face the problem that >> you have to upgrade the database at the customers site. A simple >> export / drop tables / create tables / import is not doable because >> you may have to split or join tables, move attributes to different >> tables, and make incompatible changes to data types. >> >> How do you manage such a scenario? In my case the application >> manages third party devices (phones). Now every couple of months >> the vendors update those devices or throw completely new ones with >> new capabilities on the market. Our customers expect our >> application to support those new phones and the new or changed >> features. As we are managing different phones from different >> vendors in a unified way we have to update our datamodel all the >> time. As this is an app for the corporate high end market we have >> customers with different releases. Sometimes we have to upgrade a >> customer from V2 to V3, sometimes it is V2.1 to V2.2 or V2.8 to >> V3.4. This means that upgrades are incremental but the necessary >> increments may change from installation to installation >> >> Any and all inputs very welcome >> Thanks and have a nice day >> >> ---markus--- >> >> Markus Ruggiero >> rucotec consulting and technologies email mailto:markus.ruggiero@rucotec.ch >> rucotec GmbH web http:// >> www.rucotec.ch >> Steinentorstrasse 8 >> 4051 Basel Mobile +41 (0)79 508 4701 >> Switzerland Phone/Fax +41 (0)61 271 4990 >> >> >> _______________________________________________ >> WebObjects-dev mailing list >> WebObjects-dev@omnigroup.com >> http://www.omnigroup.com/mailman/listinfo/webobjects-dev > > _______________________________________________ > WebObjects-dev mailing list > WebObjects-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/webobjects-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman/archive/webobjects-dev/attachments/20071114/1976ad97/attachment.html From daryl at montagetech.com Wed Nov 14 09:24:06 2007 From: daryl at montagetech.com (Daryl Thachuk) Date: Wed Nov 14 09:57:32 2007 Subject: DAO with EOF In-Reply-To: <47399475.8040407@optimatika.se> References: <47399475.8040407@optimatika.se> Message-ID: On 13-Nov-07, at 5:11 AM, Anders Peterson wrote: > Hi, > > I'd like to make my business objects independent of EOF. Thinking > about doing doing this using the Data Access Object design pattern > where the EOs are the DAOs and the BOs are POJOs. > > http://java.sun.com/blueprints/corej2eepatterns/Patterns/DataAccessObject.html > > Is (something like) this commonly done? Has anyone done it? > > /Anders > Why would you want to do this? I think this pattern exists because of limitations in J2EE. Limitations which do not exist in EOF. Of course I could be wrong :-) -daryl ------ Daryl Thachuk Montage Technologies Inc. http://www.montagetech.com -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman/archive/webobjects-dev/attachments/20071114/21941674/attachment.html From anders_peterson at optimatika.se Wed Nov 14 10:22:10 2007 From: anders_peterson at optimatika.se (Anders Peterson) Date: Wed Nov 14 10:22:20 2007 Subject: DAO with EOF In-Reply-To: References: <47399475.8040407@optimatika.se> Message-ID: <473B3CD2.6040706@optimatika.se> Daryl Thachuk wrote: > On 13-Nov-07, at 5:11 AM, Anders Peterson wrote: > >> Hi, >> >> I'd like to make my business objects independent of EOF. Thinking >> about doing doing this using the Data Access Object design pattern >> where the EOs are the DAOs and the BOs are POJOs. >> >> http://java.sun.com/blueprints/corej2eepatterns/Patterns/DataAccessObject.html >> >> Is (something like) this commonly done? Has anyone done it? >> >> /Anders >> > > Why would you want to do this? I've started thinking about this because I have two different application in the same domain - one is a WebObjects app the other one is not. Trying to figure a pattern that will allow me to share as much code as possible between the two apps. /Anders > I think this pattern exists because of > limitations in J2EE. Limitations which do not exist in EOF. > > Of course I could be wrong :-) > > -daryl > > ------ > Daryl Thachuk > Montage Technologies Inc. > http://www.montagetech.com > > > ------------------------------------------------------------------------ > > _______________________________________________ > WebObjects-dev mailing list > WebObjects-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/webobjects-dev From christianedwardgruber at gmail.com Wed Nov 14 10:03:48 2007 From: christianedwardgruber at gmail.com (Christian Edward Gruber) Date: Wed Nov 14 10:30:04 2007 Subject: DAO with EOF In-Reply-To: References: <47399475.8040407@optimatika.se> Message-ID: <59314493-C9CC-45BB-8561-50F8CA8EA923@gmail.com> The pattern exists because people wanted to better abstract and coordinate the crap they were producing in C++ and other languages. J2EE was built within the culture of those evolutions, but a lot of what happened with O/R frameworks in the smalltalk/objective-c era were largely ignored, because they were not popular. But you're right, the core pattern of a DAO is quite particular to the services-oriented approach that came from CORBA and the like. Christian. On 14-Nov-07, at 12:24 PM, Daryl Thachuk wrote: > > On 13-Nov-07, at 5:11 AM, Anders Peterson wrote: > >> Hi, >> >> I'd like to make my business objects independent of EOF. Thinking >> about doing doing this using the Data Access Object design pattern >> where the EOs are the DAOs and the BOs are POJOs. >> >> http://java.sun.com/blueprints/corej2eepatterns/Patterns/DataAccessObject.html >> >> Is (something like) this commonly done? Has anyone done it? >> >> /Anders >> > > Why would you want to do this? I think this pattern exists because > of limitations in J2EE. Limitations which do not exist in EOF. > > Of course I could be wrong :-) > > -daryl > > ------ > Daryl Thachuk > Montage Technologies Inc. > http://www.montagetech.com > > _______________________________________________ > WebObjects-dev mailing list > WebObjects-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/webobjects-dev From jerrywwalker at gmail.com Wed Nov 14 10:36:54 2007 From: jerrywwalker at gmail.com (Jerry W. Walker) Date: Wed Nov 14 10:37:07 2007 Subject: DAO with EOF In-Reply-To: <473B3CD2.6040706@optimatika.se> References: <47399475.8040407@optimatika.se> <473B3CD2.6040706@optimatika.se> Message-ID: Hi, Anders, How about using your WO application as the interface to your database through standard EOF and feeding results to your other application through Web Services. If you took this approach, all of your persistence logic could be retained in the WO app using all the best O/R design approaches provided by EOF. Using the other approach basically forces you into a lowest common denominator approach which might prove quite frustrating. The biggest downside to the Web Services approach that I can see is speed. If your other app accesses a great deal (particularly, large bursts) of data from the database, then the Web Services approach will probably not work. Regards, Jerry On Nov 14, 2007, at 1:22 PM, Anders Peterson wrote: > Daryl Thachuk wrote: > >> On 13-Nov-07, at 5:11 AM, Anders Peterson wrote: >>> Hi, >>> >>> I'd like to make my business objects independent of EOF. Thinking >>> about doing doing this using the Data Access Object design >>> pattern where the EOs are the DAOs and the BOs are POJOs. >>> >>> http://java.sun.com/blueprints/corej2eepatterns/Patterns/ >>> DataAccessObject.html >>> >>> Is (something like) this commonly done? Has anyone done it? >>> >>> /Anders >>> >> Why would you want to do this? > > I've started thinking about this because I have two different > application in the same domain - one is a WebObjects app the other > one is not. Trying to figure a pattern that will allow me to share > as much code as possible between the two apps. > > /Anders > >> I think this pattern exists because of limitations in J2EE. >> Limitations which do not exist in EOF. >> Of course I could be wrong :-) >> -daryl >> ------ >> Daryl Thachuk >> Montage Technologies Inc. >> http://www.montagetech.com >> --------------------------------------------------------------------- >> --- -- __ Jerry W. Walker, WebObjects Developer/Instructor for High Performance Industrial Strength Internet Enabled Systems jerrywwalker@gmail.com 203 278-4085 office From lenny at aps.org Wed Nov 14 11:55:41 2007 From: lenny at aps.org (Lenny Marks) Date: Wed Nov 14 11:55:23 2007 Subject: DAO with EOF In-Reply-To: <473B3CD2.6040706@optimatika.se> References: <47399475.8040407@optimatika.se> <473B3CD2.6040706@optimatika.se> Message-ID: I believe one major benefit of the DAO/POJO pattern has do with testability, particularly when combined with dependency injection/ Inversion of control(ex. Spring) as many have come to do. It's a lot easier to test code that uses a DAO for fetching over the static factory alternatives like Employee.findByX. The same goes for direct EOFetchSpecification usage. You can stub/mock DAO interfaces (Easymock) so that you can test the things that use them in isolation without preloading a database with test data or even connecting to one. You may find these old threads relevant. http://www.omnigroup.com/mailman/archive/webobjects-talk/2006- September/000495.html http://www.omnigroup.com/mailman/archive/webobjects-talk/2006- September/000496.html *http://www.omnigroup.com/mailman/archive/webobjects-talk/2006- September/000500.html -lenny On Nov 14, 2007, at 1:22 PM, Anders Peterson wrote: > Daryl Thachuk wrote: > >> On 13-Nov-07, at 5:11 AM, Anders Peterson wrote: >>> Hi, >>> >>> I'd like to make my business objects independent of EOF. Thinking >>> about doing doing this using the Data Access Object design >>> pattern where the EOs are the DAOs and the BOs are POJOs. >>> >>> http://java.sun.com/blueprints/corej2eepatterns/Patterns/ >>> DataAccessObject.html >>> >>> Is (something like) this commonly done? Has anyone done it? >>> >>> /Anders >>> >> Why would you want to do this? > > I've started thinking about this because I have two different > application in the same domain - one is a WebObjects app the other > one is not. Trying to figure a pattern that will allow me to share > as much code as possible between the two apps. > > /Anders > >> I think this pattern exists because of limitations in J2EE. >> Limitations which do not exist in EOF. >> Of course I could be wrong :-) >> -daryl >> ------ >> Daryl Thachuk >> Montage Technologies Inc. >> http://www.montagetech.com >> --------------------------------------------------------------------- >> --- >> _______________________________________________ >> WebObjects-dev mailing list >> WebObjects-dev@omnigroup.com >> http://www.omnigroup.com/mailman/listinfo/webobjects-dev > > _______________________________________________ > WebObjects-dev mailing list > WebObjects-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/webobjects-dev > From anders_peterson at optimatika.se Wed Nov 14 14:04:48 2007 From: anders_peterson at optimatika.se (Anders Peterson) Date: Wed Nov 14 14:21:19 2007 Subject: DAO with EOF In-Reply-To: References: <47399475.8040407@optimatika.se> <473B3CD2.6040706@optimatika.se> Message-ID: <473B7100.1080208@optimatika.se> http://www.omnigroup.com/mailman/archive/webobjects-talk/2006-September/000500.html That one was interesting to read! A big part of my problem is that the two apps already exist and the domain logic is unfortunately not independent from data access/management in either of them. When deployed the two apps have nothing to do with each other. My aim is only to to share/re-use code. /Anders Lenny Marks wrote: > I believe one major benefit of the DAO/POJO pattern has do with > testability, particularly when combined with dependency > injection/Inversion of control(ex. Spring) as many have come to do. > It's a lot easier to test code that uses a DAO for fetching over the > static factory alternatives like Employee.findByX. The same goes for > direct EOFetchSpecification usage. You can stub/mock DAO > interfaces(Easymock) so that you can test the things that use them in > isolation without preloading a database with test data or even > connecting to one. > > You may find these old threads relevant. > http://www.omnigroup.com/mailman/archive/webobjects-talk/2006-September/000495.html > > http://www.omnigroup.com/mailman/archive/webobjects-talk/2006-September/000496.html > > *http://www.omnigroup.com/mailman/archive/webobjects-talk/2006-September/000500.html > > > -lenny > > On Nov 14, 2007, at 1:22 PM, Anders Peterson wrote: > >> Daryl Thachuk wrote: >> >>> On 13-Nov-07, at 5:11 AM, Anders Peterson wrote: >>>> Hi, >>>> >>>> I'd like to make my business objects independent of EOF. Thinking >>>> about doing doing this using the Data Access Object design pattern >>>> where the EOs are the DAOs and the BOs are POJOs. >>>> >>>> http://java.sun.com/blueprints/corej2eepatterns/Patterns/DataAccessObject.html >>>> >>>> >>>> Is (something like) this commonly done? Has anyone done it? >>>> >>>> /Anders >>>> >>> Why would you want to do this? >> >> I've started thinking about this because I have two different >> application in the same domain - one is a WebObjects app the other one >> is not. Trying to figure a pattern that will allow me to share as much >> code as possible between the two apps. >> >> /Anders >> >>> I think this pattern exists because of limitations in J2EE. >>> Limitations which do not exist in EOF. >>> Of course I could be wrong :-) >>> -daryl >>> ------ >>> Daryl Thachuk >>> Montage Technologies Inc. >>> http://www.montagetech.com >>> ------------------------------------------------------------------------ >>> _______________________________________________ >>> WebObjects-dev mailing list >>> WebObjects-dev@omnigroup.com >>> http://www.omnigroup.com/mailman/listinfo/webobjects-dev >> >> _______________________________________________ >> WebObjects-dev mailing list >> WebObjects-dev@omnigroup.com >> http://www.omnigroup.com/mailman/listinfo/webobjects-dev >> -- http://ojalgo.org/ Mathematics, Linear Algebra and Optimisation with Java From jbrook at chellomedia.com Thu Nov 15 01:48:23 2007 From: jbrook at chellomedia.com (James Brook) Date: Thu Nov 15 02:04:40 2007 Subject: DAO with EOF In-Reply-To: References: <47399475.8040407@optimatika.se> Message-ID: On 14 Nov 2007, at 18:24, Daryl Thachuk wrote: > > On 13-Nov-07, at 5:11 AM, Anders Peterson wrote: > >> Hi, >> >> I'd like to make my business objects independent of EOF. Thinking >> about doing doing this using the Data Access Object design pattern >> where the EOs are the DAOs and the BOs are POJOs. >> >> http://java.sun.com/blueprints/corej2eepatterns/Patterns/ >> DataAccessObject.html >> >> Is (something like) this commonly done? Has anyone done it? >> >> /Anders >> > > Why would you want to do this? I think this pattern exists because > of limitations in J2EE. Limitations which do not exist in EOF. > > Of course I could be wrong :-) > > -daryl We did it for an integration with the Rome library. Rome consumes common syndication format like RSS and Atom and builds an idealised object graph of POJOs. We wanted to add persistence and a WebObjects API, so we copied the POJOs to EOs. The Rome classes implement an interface called CopyFrom. In our implementation a method on the top level 'feed' EO in the object graph copies the object graph from the POJOs to the EOs using reflection. Everything performs okay, but the solution doesn't feel very clean. It was really just because we wanted to use EOF for persistence and later for working with objects that we fetched into other applications, but we could not map POJOs directly to the database with EOF, because that's simply not the way it works. I think to have your business objects independent of EOF you are looking for something that uses the DataMapper pattern (http://martinfowler.com/ eaaCatalog/dataMapper.html), but then maybe you should choose between using EOF, or using POJOs and some other persistence mechanism. -- James -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman/archive/webobjects-dev/attachments/20071115/c5d1647e/attachment.html From drwo at woteki.com Fri Nov 16 05:16:16 2007 From: drwo at woteki.com (Tom Woteki) Date: Fri Nov 16 05:16:45 2007 Subject: WO5.4: Bug serializing/deserializing EOAndQualifiers? Message-ID: Hi: I believe there is a bug in the serialization/deserialization of EOAndQualifiers in WO5.4. I'm wondering if anyone else has observed this before I file a bug. I am porting an application verbatim from WO5.3 on 10.4.10 to WO5.4 on Leopard. The serialization code works perfectly in the WO5.3 environment but I get a ClassCastException at com.webobjects.eocontrol.EOAndQualifier.readObject (EOAndQualifier.java:250) when I perform the deserialization operation in 5.4/Leopard. I am working with an EOAndQualifier that resembles this as a string: ((loginName = 'foobar') and (loginCount = '0')) Upon deserializing the previously serialized version of this I get the exception noted above. If I merely change the "and" to "or" everything works fine. I can formulate a workaround to this to solve my problem, but of course this doesn't fix the root cause bug I believe is present. Has anyone else seen this? Regards, Tom -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman/archive/webobjects-dev/attachments/20071116/5968f051/attachment.html