Angel \”Java\” Lopez on Blog

October 7, 2011

The Repository Pattern: Links, News and Resources (1)

These are my links about Repository Pattern: the differences with DAOs (Data Access Objects); examples with NHibernate, Entity Framework; its use in DDD; its relation to IUnitOfWork; discussion about how to query a repository; the influence of Linq/IQueriable in the evolution of this pattern in .NET (LINQ/IQueryable is a missing piece in Java). There are interesting discussions in Spanish, too. I recommend you should translate them.

Repository
http://martinfowler.com/eaaCatalog/repository.html

A Repository mediates between the domain and data mapping layers, acting like an in-memory domain object collection. Client objects construct query specifications declaratively and submit them to Repository for satisfaction. Objects can be added to and removed from the Repository, as they can from a simple collection of objects, and the mapping code encapsulated by the Repository will carry out the appropriate operations behind the scenes. Conceptually, a Repository encapsulates the set of objects persisted in a data store and the operations performed over them, providing a more object-oriented view of the persistence layer. Repository also supports the objective of achieving a clean separation and one-way dependency between the domain and data mapping layers.

LLBLGenPro, Entity Framework 4.1, and the Repository Pattern
http://www.mattjcowan.com/funcoding/2011/09/25/llblgen-ef-repository-pattern/

HunabKu: LINQ and Repository
http://fabiomaulo.blogspot.com/2009/06/linq-and-repository.html

Revisiting the Repository and Unit of Work Patterns with Entity Framework
http://blogs.microsoft.co.il/blogs/gilf/archive/2010/06/21/revisiting-the-repository-and-unit-of-work-patterns-with-entity-framework.aspx

EFMVC
http://efmvc.codeplex.com/
Demo web app using ASP.NET MVC 3 RTM, Razor, EF Code First and Unity 2.0
Repository Pattern and Unit of Work

Repository is Dead: Long Live Repository
http://codebetter.com/gregyoung/2009/04/23/repository-is-dead-long-live-repository/

Repository is the new Singleton
http://ayende.com/blog/3955/repository-is-the-new-singleton

DDD: The Generic Repository
http://codebetter.com/gregyoung/2009/01/16/ddd-the-generic-repository/

The Repository Pattern
http://blogs.hibernatingrhinos.com/nhibernate/archive/0001/01/01/the-repository-pattern.aspx

N-Tiers using POCOs and Entity Framework – Part Two: Model and Entities
http://blog.jorgef.net/2010/09/n-tiers-pocos-ef-2.html

N-Tiers using POCOs and Entity Framework – Part Five: DataAccess Layer
http://blog.jorgef.net/2010/09/n-tiers-pocos-ef-5.html

N-Tiers using POCOs and Entity Framework – Part Six: Source Code
http://blog.jorgef.net/2011/02/n-tiers-pocos-ef-6.html

Using the NHibernate Repository Pattern in C# ASP .NET
http://jasper-net.blogspot.com/2011/04/using-nhibernate-repository-pattern-in.html

Mock a database repository using Moq
http://www.codeproject.com/Articles/47603/Mock-a-database-repository-using-Moq.aspx

The wages of sin: Proper and improper usage of abstracting an OR/M
http://ayende.com/blog/4788/the-wages-of-sin-proper-and-improper-usage-of-abstracting-an-or-m

The wages of sin: Over architecture in the real world
http://ayende.com/blog/4786/the-wages-of-sin-over-architecture-in-the-real-world

Architecting in the pit of doom: The evils of the repository abstraction layer
http://ayende.com/blog/4784/architecting-in-the-pit-of-doom-the-evils-of-the-repository-abstraction-layer
Better Domain-Driven Design Implementation
http://www.udidahan.com/2007/03/06/better-domain-driven-design-implementation/

Entities, Services and what goes between them…
http://ayende.com/blog/2145/entities-services-and-what-goes-between-them

Suteki Shop
http://mikehadlow.blogspot.com/search/label/Suteki%20Shop
http://code.google.com/p/sutekishop/
Suteki Shop is an eCommerce application. The orginal aim is to write a site for a fashion retail business. It includes a product catalogue, shopping cart and order processing.
Using
    * .NET 4.0
    * ASP.NET MVC 3
    * MVC Contrib
    * NHibernate
    * Windsor IoC Container

Hunabku
https://bitbucket.org/fabiomaulo/hunabku
Source for @fabiomaulo blog examples
http://www.fabiomaulo.blogspot.com/

Repository, IQueryable y otras hierbas
http://cprieto.com/index.php/2010/05/20/repository-iqueryablet-y-otras-hierbas/
"cuando Fowler y Eric Evans en su libro DDD definieron Repository no existía el concepto de IQueryable y creo que no muchos se lo veían venir, así que simplemente si asociamos que Repository es una abstración superior del acceso a datos y este se debe comportar como una colección en memoria (mezclando las definiciones de Fowler y Evans) y coincidimos en que en la .Net Framework las colecciones pueden extenderse a IQueryable, es fácil razonar que por definición un repositorio finaliza implementando IQueryable<T> (mera jalada mi filosofía y asociación, pero para filósofo preguntémosle mejor a @ajlopez!)" <—Great! @cprieto reads my philosophy posts ;-)
Spanish discussion http://groups.google.com/group/altnet-hispano/browse_thread/thread/9c9e84a850dd00bc

HunabKu: Enhanced Query Object
http://fabiomaulo.blogspot.com/2010/07/enhanced-query-object.html

Implementing Repository Pattern With Entity Framework
http://www.codeproject.com/KB/database/ImplRepositoryPatternEF.aspx

Entity Framework as Repository and UnitOfWork?
http://stackoverflow.com/questions/520065/entity-framework-as-repository-and-unitofwork

Repository or DAO?: Repository
http://fabiomaulo.blogspot.com/2009/09/repository-or-dao-repository.html

Repository or DAO?: DAO
http://fabiomaulo.blogspot.com/2009/09/repository-or-dao-dao.html

Repositories for Value Objects?
http://tech.groups.yahoo.com/group/domaindrivendesign/message/17972

How to use dependency injection and the repository pattern with ASP.NET web services?
http://stackoverflow.com/questions/1449870/how-to-use-dependency-injection-and-the-repository-pattern-with-asp-net-web-servi

FubuMVC Contrib
http://code.google.com/p/fubumvc-contrib/
Contrib for FubuMVC a Front Controller-style MVC framework designed primarily for Web applications built on ASP.NET
Many samples with IRepository, NHibernate, IUnitOfWork

MPBlog Implementation. Part 4
http://www.simplyvinay.com/Post/50/MPBlog-Implementation.-Part-4.aspx
NHibernate Repository and Unit Of Work

Linq specifications: from Argentina with Love
http://joseoncode.com/2009/12/24/linq-specifications-from-argentina-with-love/

IRepository interface
http://weblogs.asp.net/alexeyzakharov/archive/2009/11/18/irepository-interface.aspx

nHibernate, Linq and Queries
http://lucisferre.net/2009/05/19/nhibernate-linq-and-queries/

The DAL should go all the way to UI
http://ayende.com/blog/3958/the-dal-should-go-all-the-way-to-ui

Returning IQueryable<T>
http://weblogs.asp.net/fredriknormen/archive/2008/12/01/returning-iqueryable-lt-t-gt.aspx

Generic Repository
http://grepo.codehaus.org/
The Generic Repository (grepo) is an open source (ASLv2) framework for Java which allows you to access (database) repositories in a generic and consistent manner.

The catalogue metaphor and command-query seperation architectures
http://codebetter.com/iancooper/2009/10/08/the-catalogue-metaphor-and-command-query-seperation-architectures/
Query Objects vs Methods on a Repository
http://www.udidahan.com/2007/03/28/query-objects-vs-methods-on-a-repository/

Using Repository and Unit of Work patterns with Entity Framework 4.0
http://blogs.msdn.com/b/adonet/archive/2009/06/16/using-repository-and-unit-of-work-patterns-with-entity-framework-4-0.aspx

AltNet-Argentina: DAO, Repository y clases Query
http://groups.google.com/group/altnet-argentina/browse_thread/thread/a3f5324ab8418277?pli=1

DDD: The Generic Repository
http://codebetter.com/gregyoung/2009/01/16/ddd-the-generic-repository/

My Links
http://www.delicious.com/ajlopez/repository

More links about other patterns are coming.

Keep tuned!

Angel “Java” Lopez
http://www.ajlopez.com
http://twitter.com/ajlopez

2 Comments »

  1. Excellent article.
    Following link seems a good tutorial on JSON.

    http://www.w3resource.com/JSON/introduction.php

    Comment by w3develop — February 23, 2012 @ 4:09 pm

  2. wgoah this weblog is wonderful i like studying your
    posts. Keep up the great work! You realize, a lot of individuals are looking around for this information,
    you can help them greatly.

    Comment by scrum Software Development — May 27, 2014 @ 9:54 am


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

The Shocking Blue Green Theme. Get a free blog at WordPress.com

Follow

Get every new post delivered to your Inbox.

Join 68 other followers

%d bloggers like this: