Greg Young [MVP]

Sponsors

The Lounge

News

Advertisement

Images in this post missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at imagehelp@codebetter.com
Slides: AR vs Repository

Active Record and Repository (30 min presentation).

http://codebetter.com/files/45/codebetter_downloads/entry148143.aspx

I have been slowly filling in more content beyond these slides. If you happen to notice that the objects are a bit flat in the examples it is because later slides use value objects (and inheritance in some cases) to work further on the example objects.

 


Posted 08-08-2006 3:33 PM by Greg
Filed under:

[Advertisement]

Comments

ASP.NET Podcast wrote ASP.NET Podcast Show #62 - Atlanta Cutting Edge .NET User Group
on 08-08-2006 5:41 PM
SubscribeDownloadShow Notes:Atlanta Cutting Edge .NET User GroupFor me, its a 24 hour process to speak.Nervous.Paul...
evarlast wrote re: Slides: AR vs Repository
on 08-10-2006 2:03 PM
Looks like it was an excellent presentation.

I too prefer Repository and Factory(to create new instances which aren't necessarily part of a Repository) to ActiveRecord.  Yes, Castle Project's ActiveRecord and NHibernate are so awesome.

I've found myself creating Interfaces with properties for my data objects, and having my implementations inherit from ActiveRecord<> and implement those Interfaces, then use the Repository and Factory pattern with those data objects.  

It works well because working with the Interface hides the fact that the data object inherit from ActiveRecord, so I can work with the data objects in different projects, across app domain boundaries or with remoting or web services, without having to know or expose that the objects inherit from Active Record.

I'm wondering what kinds of tools and libraries do you use to help you implement data objects, their factories and their repositories quickly?  Do you have an code samples of complete systems?
Greg wrote re: Slides: AR vs Repository
on 08-11-2006 1:03 AM
For repositories one can create a generic repository fairly quickly. In various systems I have worked on it may be as simple as declaring a Repository<object> then adding your specific accessors ...

For tools I like to use sparx systems' .. http://www.sparxsystems.com.au/ there may be better ones out there but I know and like that one.

I believe there is a DDD sample project being worked on (unfortunately most DDD systems are in the enterprise and can't be shared often for legal reasons). I personally believe though that DDD does not lend itself well to such examples. DDD is about crafting a solution specific to the domain and will never do well with a wizard generation type system.
ASP.NET Podcast wrote ASP.NET Podcast Show #62 - Atlanta Cutting Edge .NET User Group
on 01-24-2007 10:08 PM

Subscribe (Definitely a big deal) Pictures from the Atlanta Cutting Edge .NET User Group. Show Notes:

Add a Comment

(required)  
(optional)
(required)  
Remember Me?