View Single Post
  #3 (permalink)  
Old 11-12-2007, 04:50 PM
mjhoagland's Avatar
mjhoagland mjhoagland is offline
i'm here
 
Join Date: Nov 2007
Posts: 32
Default

Ok. The thing with code generators is that all of them have bugs and flaws. No program can surpass the judgement and expertise of a knowledgable programmer. Hence, why progammers make programs and not the other way around.

The neatest skeleton framework that does what you're describing is Ruby on Rails and that's not ASP.Net. So, the best thing I can recommend for you is to take your time and develop your own basic data access layer that is flexible enough to work with any data structure and yet rigid enough to include error checking, recovery, etc.

Not the answer you're looking for, I know but it's the best way to address your problem. This is a very common situation for programmers and this is the "best practices" solution for it.

As far as a prebuilt business layer, that is what describes your business rules. If there's code in the business layer that doesn't describe those rules then it shouldn't be in your business layer, no exceptions. That is the single most layer that changes the most from application to application whether it be a desktop app, web app, server/client app, etc.

A good data access layer should not change much from application to application. There are really only three requirements you need to focus on when making this layer. Requirement 1) get data, 2) put data and 3) an exception recovery model in case 1 or 2 fails. This should be the most light-weight and efficient layer of the application as it's accessed the most since in the vast majority of applications it is accessed by everything.

The business layer should be all the heavy duty logic, your 800lb gorilla. The data layer is the heart and the business layer is the brain. And as a brain, it carries everything from differentiating bool from string, etc.

So, in summary, avoid generators and, instead, develop your own data framework that you can carry from project to project. Not saying it's a straight copy/paste from each application but the changes will be minimal if you do it correctly.
Reply With Quote