Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I personally am a fan of the n-tier architecture. When I start out I will typically create two projects for a web application, the first for the Business Logic and Database access, this is a class library project. Then I add a web application project for the actual website.</p> <p>I have in the past built a data access framework that I use that leverages the Microsoft Data Application Block for all data access, and that is what I use to structure all data calls.</p> <p>I have at times used codesmith or other items, but so far, I've found better luck, just rolling my own code, as I can get more granular with the data. Granted if I had time to research other ORM tools, I might not need to be concerned about it...</p> <p>I find that the best approach is typically to create your business objects, data validation and all of the "business" pieces of the application. Then program in the data access pieces, and finish by putting everything together with the presentation code at the end. It takes some discipline to be able to do this, but it ensures that you are building things in a manner that can be re-used, and I have had great success.</p> <p>The book you referenced might be a good example to start with as well.</p> <p><em>Addition from comment</em></p> <p>In response to a comment posted. Typically inside my Business/Data class library I will use namespaces to separate out the logic from the data. A few key things are done here.</p> <ol> <li><p>My data method calls are all limited in scope to the assembly, they are NOT items that can be called directly, this way I enforce data access through the business logic for all presentation callers</p></li> <li><p>All data input and output is done via objects, rather than DataSets or any other variant</p></li> <li><p>The Business methods after validation will call specific methods from the data components to get the needed information.</p></li> </ol>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload