talk-deconstructing-the-framework

http://www.youtube.com/watch?feature=player_detailpage&v=iUe6tacW3JE

talk-deconstructing-the-framework#what1 Gary Bernhardt, says services, or service objects, are stateless objects with no data but behaviors associated with them. talk-deconstructing-the-framework#what1

talk-deconstructing-the-framework#what-to-put-in-the-activerecord-model1

Watching it reminded me about how in Destroy All Software he has ActiveRecord classes provide an abstraction to the database and not much else, but the methods he does put in them are interesting.

The methods he adds are basic query or update methods that are named and take parameters.

So, objects that interact with the ActiveRecord objects can only call those methods and not the bazillion methods that ActiveRecord-subclassed models provide by default.

That narrows the interface and, makes it explicit about how to use it because you have to use those explicit methods, it and makes an easy point for stubbing or mocking.

talk-deconstructing-the-framework#what-to-put-in-the-activerecord-model1

Referring Pages

service-objects read-models

People

person-gary-bernhardt