This is the first tutorial in a lengthy series that will explore techniques for implementing these common patterns in ASP. We'll start with creating a software architecture composed of a Data Access Layer (DAL) using Typed Data Sets, a Business Logic Layer (BLL) that enforces custom business rules, and a presentation layer composed of ASP. Once this backend groundwork has been laid, we'll move into reporting, showing how to display, summarize, collect, and validate data from a web application.These tutorials are geared to be concise and provide step-by-step instructions with plenty of screen shots to walk you through the process visually.Furthermore, when we build the Typed Data Sets for the DAL we'll need to point Visual Studio to the database from which the Typed Data Sets should be constructed.
We create databases to store the data, code to retrieve and modify it, and web pages to collect and summarize it.These scripts can be also be downloaded directly from Microsoft, if you'd prefer.If you use a different SQL Server version of the Northwind database, you will need to update the file.The presentation layer should not contain any references to such data access code, but should instead make calls into the DAL for any and all data requests.Data Access Layers typically contain methods for accessing the underlying database data.The Northwind database, for example, has These methods, when invoked, will connect to the database, issue the appropriate query, and return the results. These methods could simply return a Data Set or Data Reader populated by the database query, but ideally these results should be returned using strongly-typed objects.A strongly-typed object is one whose schema is rigidly defined at compile time, whereas the opposite, a loosely-typed object, is one whose schema is not known until runtime.The benefits of this layered architecture are well documented (see the "Further Readings" section at the end of this tutorial for information on these advantages) and is the approach we will take in this series.All code that is specific to the underlying data source – such as creating a connection to the database, issuing commands, and so on – should be located in the DAL.The files, which, like their SQL Server counterparts, are automatically added to the Server Explorer.If you don't want to use any of the SQL Server options, you can always download a Microsoft Access version of the Northwind database file and drop into the directory.