views:

74

answers:

4

Hi

I was looking to build a Data Access Layer for my new web based application, I'm using ASP.NET. I'm want to build a framework not only for this application but also want to utilize it for my future projects.

Actually my main aim is to make a framework, from DAC, DAL, BL to GUI. I want suggestions from you guys that what should i adopt, what give me flexibility, which suits for both small and large size applications.

Thanks in advance.

A: 

Well normally DAL's can be utilized in multiple projects anyway. I think you're now talking about Business Logic Layer functionality. Make sure that you implement enough BL functionality to re-use big parts of your BL in future projects. There is alot information to be found on the internet about how to make sure big projects can be re-used in the future.

http://en.wikipedia.org/wiki/Business_logic_layer

http://en.wikipedia.org/wiki/Data_access_layer

Younes
+1  A: 

YAGNI.

If you don't know what you need in your framework, you don't need it in your framework.

Write the framework following the third of your applications, based on what commonalities you observe between them.

Pete Kirkham
I disagree with you in this circumstance, DALS are always useful and ridiculously reuseable if done properly
Yoda
@Yoda so create a DAL, rather than a framework from DAC, DAL, BL to GUI
Pete Kirkham
+1  A: 

I dont think DAL is for multiple project, i think you are confusing DAC (Data Access Component) with DAL(Data Access Layer), DAL are usually project specifiec, and on the other hand DAC is something very common.

Sakhawat Ali
Depends on if you are gonna re-use the same database or not. For example take a CMS ... Most of the times u will have the same DB so the same DAL ! :>
Younes
If you read the main question posted, you will note that the guy want to make a framework. and what i believe, framework is a generic thing it may depend of DB provide but shouldn't depend on DB structure. and if it dependent on the structure of the DB then i won't call it a framework, it is just a architecture of the software and that's all.
Sakhawat Ali
I think we are mixing up the things. In simple words am looking for some sort of code generation framework which is independent of database and can be used in web as well as windows applications. Yes, Nettiers and many other are there. But its shouldn't be complex.
GS_Guy
A: 

Don't reinvent the wheel. The .NET framework is already pretty rich and adding complexity only makes maintainability and testability more painful.

If you want solid frameworks:

  • For Data Access there is Entity Framework or nHibernate .
  • For Presentation there's ASP.NET MVC (Or MVVM for Silverlight and WPF).
  • If you need rich cross cuts and IoC there's Unity and Enterprise library.
  • For complex BL there's Workflow Foundation.

Tying them together neatly will solve pretty much any problem.

Doobi