Hello All,
I am trying to get into a project with ASP.NET MVC and NHibernate ( Newbie) and looking for faster data access from DAL.
my solution will be roughly asp.net mvc ------ Business Layer - DataAccess Layer ----------All supported by Infrastructure layer ----------------
My project is to do with classifieds and community site where faster data access is a must have.
I really like the KIGG implementation but I am not very sure if the repository pattern is suitable for faster data access.
I have looked at S#arp Architecture and it is too big for me.
On the repositories too I plan to divert from KIGG implementation and use the following for retrieving objects
IRepository {
void Add(); void Remove();
public IQueryable FindAll(Func exp) { return GetTable.Where(exp).AsQueryable(); }
}
where daily site hit might be around 10000 to 15000, is going with repository pattern with above "Find All" advisable ?
After reading for last few days on Repository pattern and also the fact that there is difference in opinion between experts themselves, I am getting more confused how repositories can be used effectively, (http://ayende.com/Blog/archive/2009/04/17/repository-is-the-new-singleton.aspx)
I know the question is vague but any advise is appreciated.
EDIT*1
I like this point about DAL: Trying to encapsulate to make things easier to work with, great. Trying to encapsulate so that you can switch OR/Ms? Won’t work, will be costly and painful.
EDIT*2
I am getting inclined towards "CQRS" pattern. It seems to be logical and from what I have been reading will make the reads faster, even though stale. Reading from Domain in terms of domain object will lead to unnecessary processing to populate AggregateRoot and then convert them to ViewModels.
Thank you, The Mar