Ayende @ Rahien

Refunds available at head office

Hibernating Rhinos - Episode #4: Hibernating Forums - Part I - Testable & Painless Persistence

Okay, here is the first episode in my OR/M challenge series. It mostly deals with the MonoRail skeleton project and with setting up the domain model in a TDD fashion. I am not sure how interesting it is, because about 60% of it is building the Active Record entities, and explaining how it works, but it lays a foundation that I will use for the next few episodes.

Lots of Um..., I am afraid, but at least I am speaking in a normal speed :-)

  • Total length: 55:44 Minutes
  • Download size: 77Mb
  • Code starts from ~4 minutes into the episode.
  • Getting the Latest code - will be updated for new episodes
  • Getting the Code from the episode

The download page is here: http://ayende.com/hibernating-rhinos.aspx

I have some ideas about where to take the next episode, but this is something that is mostly dependant on your feedback :-)

Comments

jdn
06/28/2007 01:42 AM by
jdn

This is awesome stuff. I finally got around to watching Episode #3 (hope to have some blog comments about it), and hope to backtrack to #2, but this is really, really helpful to me, and I hope to other people in the community.

And you always comment about not being a native English speaker, and it does bring about a few humorous moments, but I think your presentations are actually very easy to follow.

Thanks for this.

Ben Scheirman
06/28/2007 01:19 PM by
Ben Scheirman

The more of these you do, the more natural your English sounds. Keep it up!

Ayende Rahien
06/28/2007 01:53 PM by
Ayende Rahien

Ben,

Hi, not fair to reveal my nefarious plans in the open!

Tim Haines
06/29/2007 08:33 AM by
Tim Haines

Thanks very much Ayende. I picked up a few good tips (several reshaper ones too) from this screencast. I'll be taking your UnitOfWork for a test drive this weekend. Oh - I also had no problems at all understanding everything you said. I had to pause and rewind a few times to see what you'd added to the code though. :-)

The Repository pattern is interesting. I remember reading about it in EE's book (or was it Fowlers?), and thinking it sounded like too much work when Active Record (and the previous O/RM I used) did it all for you. I'm looking forward to seeing how you extend one to add class specific find methods.

SimoneB
06/30/2007 05:56 PM by
SimoneB

Very interesting, thanks!

Simon
07/20/2007 07:32 PM by
Simon

500 An error occured:

ComponentActivator: could not proxy Cuyahoga.Modules.Downloads.DownloadsModule

Ravi
07/30/2007 10:23 AM by
Ravi

Awesome article

Can you discuss more best practices if we have deep object graph/hierarchies.

Yoni G
08/14/2007 08:32 PM by
Yoni G

Hi,

Can u please recommend me of a good quickstart article to start using Rhino Mocks? Thanks, Yoni.

Ayende Rahien
08/14/2007 08:35 PM by
Ayende Rahien

The first Hibernating Rhino screen cast is a good start, I think

Joe Fiorini
08/23/2007 01:32 PM by
Joe Fiorini

I haven't gotten to watch the rest of your video yet, so I apologize if this was already mentioned.

How would you recommend testing custom Find methods implemented in an Active Record layer, such as:

[ActiveRecord]

public class Employee{

     ....

     public Employee FindByUserId(string userId){

         return Employee.FindFirst(Expression.Eq("UserId", userId));

     }

}

My first thought is to extract that find into an interfaced service layer and then mock the service in my test project to call the in memory persistence instead of ActiveRecord's Find/Save methods. What are your thoughts on that?

-Joe

Ayende Rahien
08/23/2007 05:46 PM by
Ayende Rahien

I dealt with the subject here:

http://www.ayende.com/Blog/archive/2006/04/14/7667.aspx

Comments have been closed on this topic.