In response to an answer posted by Marc Gravell and his suggestion via email, I was wondering:
What choices do people make when deciding on their architecture for a new project?
This question could serve as a decent reference point for links/ideas/suggestions/architecture decisions, anything really that is of interest when deciding the best way to approach a new solution.
I am currently working on an ASP.NET MVC application - mainly as a exercise to increase my experience of the new framework - that works with an ExtJs front end passing Json objects between the layers.
Testability is very important so my .NET layer uses interfaces to define contracts and consists of a service layer, which handles data validation and application logic, which in turn interacts with a repository layer that just handles the data persistence and retrieval. All allowing me to test quite thoroughly.
I have a custom model hierarchy that is based on the database, however, it is not related to any ORM (I am using LinqToSql at present) tool tying it to a particular platform. My repositories return my custom models and not their own database structures, which will hopefully allow me to develop different repository implementations in the future without too many problems.
Another reason for this approach was that I am working with a legacy database that has some interesting design choices and cannot change the structure too much at present, so I wanted a bit more control over the resultant models.
All this may seem completely wrong to some of you so tell me what you think ;)