if you do DDD you might be interested in salve: http://code.google.com/p/salve/ , which you can use with guice
francisco On Wed, Nov 12, 2008 at 6:36 PM, Kamil Demecki <[EMAIL PROTECTED]> wrote: > > > > On Nov 10, 2:30 am, "Stuart McCulloch" <[EMAIL PROTECTED]> wrote: >> 2008/11/10 Brian Pontarelli <[EMAIL PROTECTED]> >> >> >> >> > > For this case there is indeed little difference between the anemic >> > > model and rich model. But for this specific use-case I would flip the >> > > question on you and ask: what do you benefit from a anemic model? >> > > Given >> > > the point of using C-style functions and global variables versus OOP >> > > why >> > > wouldn't you go for OOP every time? >> >> > The anemic model will produce a well defined wire format that collects >> > all the data for a Person together. This allows that data to flow >> > through as many layers/tiers/servers as necessary and be worked on by >> > anything that understands that class of data. In the end, a large >> > distributed system is going to be a collection of functions that work >> > on classes of data. >> >> > I find myself coming back to this pattern more and more, but never >> > taking that step over to fully functional languages. I think the >> > reason is both due to the ability to organize and encapsulate in OO. >> > And, I would definitely not use C as a base line. There are many far >> > more elegant functional languages than C. >> >> > I also still use rich-objects at times. It is just not something I >> > force myself to use for everything. I find that model too restrictive >> > and not very pragmatic. But, there are still many benefits that I can >> > achieve from OO concepts like extension, aggregation, polymorphism and >> > the like. I just find that they also work well with anemic objects and >> > highly functional services. I guess in the end I don't find OO and >> > functions to be opposing ideals. They are tools I mix and match to >> > suit the task at hand. >> >> > One idea I've been tossing around lately is a new approach with a >> > separation of data and function. Not sure what it would look like or >> > how it would work, but it seems interesting to me. It would allow you >> > to define a data class such as Human, but have that Human behave like >> > a Infant at one point in time and a Teenager later. In the reverse, >> > the Infant might need Human data, but also other data classes to >> > function properly. Then later on the Teenager might also need the >> > Human data, but other data to function. >> >> > Need to think about it for another year or so to figure it all out. ;) >> >> FWIW this is exactly the motivation behind Qi4j - context based behaviour... >> >> http://www.qi4j.org/introduction.html >> >> there's a mailing list (seehttp://www.qi4j.org/26.htmlfor >> subscription/archives) >> where the design is regularly discussed and refined, and if you're familiar >> with >> DDD concepts then you should feel right at home >> >> Rickard's also going to be presenting the latest updates at this year's >> Øredev >> >> -- >> Cheers, Stuart > > > Very nice. I'll Take a look. Half a year I checked DDD solutions to my > masters but I didnt find QI4J. > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "google-guice" 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/google-guice?hl=en -~----------~----~----~----~------~----~------~--~---
