Best location of Repository layer
In the 'Patterns in Action' example, I noticed that the Repository layer is accessed in the controllers. The Microsoft architecture evangelists like Scott Millet, Dino Esposito suggest a layer between the controllers and Repository. Based on their suggestions, the architecture will look like:
Service (Request and Response)
What do you think?
Varghese Pallathu, May 15, 2011
The Repository is an API Pattern (i.e. interface pattern), rather than a specific layer.
Anyhow, the best architecture is whatever works best for your situation.
The main criteria to keep in mind for these and many other architectural decisions are future changes. If you anticipate changes (change requests always occur), you want an architecture that is flexible and allow you to implement these effectively and efficiently, without breaking exising code (i.e. tested code).
Hope this helps.
Dan McMillan, May 16, 2011