Jaime.. Not a crazy idea - could tie in well for some of cache rollover strategies I'm thinking about for Transfer.
Wouldn't be impossible to implement at all, if you wanted to go down that path. Mark On Jan 31, 2008 11:25 AM, Jaime Metcher <[EMAIL PROTECTED]> wrote: > Basically, yes. > > I should say I'm not actually working on this - my current approach is to > use Transfer for RAD or small domain models and Hibernate for larger > systems, and both are plenty good enough. I'm just thinking through what it > would mean to work towards a rich domain model that is *completely* > persistence agnostic. > > Jaime > > -----Original Message----- > *From:* [email protected] [mailto:[EMAIL PROTECTED] Behalf > Of *Mark Mandel > *Sent:* Thursday, 31 January 2008 9:32 AM > *To:* [email protected] > *Subject:* [CFCDEV] Re: myBean.save() versus myServiceObj.save(myBean) > > Ah.. > > So if you could track what a user was doing with objects across a > request... essentially you could async. save them all at the end of the > request? > > Is that what you are thinking? > > Mark > > On Jan 31, 2008 10:25 AM, Jaime Metcher <[EMAIL PROTECTED]> > wrote: > > > Mark, > > > > Thinking about Hibernate. The key there is that every persisted object > > is known to the current session. *If* you could automate opening and > > closing a session on every request, along with reattaching your cached > > objects on session open, it might be possible to hide all the ugliness > > around merging, attaching, etc. Whether CF can handle that kind of workload > > is another question. > > > > Jaime > > > > -----Original Message----- > > *From:* [email protected] [mailto:[EMAIL PROTECTED] > > Behalf Of *Mark Mandel > > *Sent:* Thursday, 31 January 2008 8:46 AM > > *To:* [email protected] > > *Subject:* [CFCDEV] Re: myBean.save() versus myServiceObj.save(myBean) > > > > Jaime, > > > > I've had thoughts on this on and off through the years. > > > > The only thought I've ever had was something like async persistence on a > > timer, say every 10 minutes. > > > > I figured this wouldn't be a good idea as if the sever goes down, you > > can lose a fair amount of data. > > > > That and there is no way of guaranteeing any data you query is valid > > (unless it hooks directly into the cache). > > > > Was this the sort of direction you were talking about.. or something > > else? > > > > Mark > > > > On Jan 31, 2008 9:25 AM, Jaime Metcher <[EMAIL PROTECTED]> > > wrote: > > > > > > > > Sticking our heads above the CF parapet for a moment, "neither" is > > > also a > > > valid answer. Transparent persistence is nice for some use cases. > > > I'm not > > > aware of any mature frameworks or even best practices for doing this > > > in CF, > > > but we should leave it on the radar, maybe someone will get inspired. > > > > > > Jaime Metcher > > > > > > > -----Original Message----- > > > > From: [email protected] [mailto:[EMAIL PROTECTED] > > > Behalf > > > > Of Peter Bell > > > > Sent: Thursday, 31 January 2008 3:17 AM > > > > To: [email protected] > > > > Subject: [CFCDEV] Re: myBean.save() versus myServiceObj.save(myBean) > > > > > > > > > > > > > > > > Hi Alan, > > > > > > > > Been pretty much beaten to death on cfcdev over the years. Short > > > > answer, it > > > > isn't right or wrong - more a matter of preference. > > > > > > > > I prefer syntactically User.save() to UserService.save(User), but > > > that's a > > > > pure preference Others prefer it the other way round. > > > > > > > > Provisos: > > > > - Don't put SQL in the bean - eithr way the saving should be > > > > delegated to a > > > > DAO > > > > - For user.save() you need to inject a DAO into your transients > > > which > > > > requires ColdSpring with singleton=false, a custom factory or > > > lightwire. > > > > - If you need to support remote method cals, you're going to need a > > > > Userservice.save() method. I have one for remote calls ad it just > > > delgates > > > > to a new bean it creates. Some may prefer just to have the service > > > do the > > > > save all the time, but again it's down to preferences. > > > > > > > > Best Wishes, > > > > Peter > > > > > > > > > > > > On 1/30/08 12:03 PM, "Alan Livie" <[EMAIL PROTECTED]> > > > wrote: > > > > > > > > > > > > > > We currently use the service object to save a bean (which uses a > > > > > gateway/DAO its composed with to do the work) > > > > > > > > > > Another developer has suggested the bean should save really be > > > > > responsible for saving itself (again using a DAO its composed > > > with). > > > > > > > > > > This looks like a good one for a discussion! :-) > > > > > > > > > > Alan > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > E: [EMAIL PROTECTED] > W: www.compoundtheory.com> > -- E: [EMAIL PROTECTED] W: www.compoundtheory.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CFCDev" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cfcdev?hl=en -~----------~----~----~----~------~----~------~--~---
