Northwind Traders Sample Application Documentation Home | Northwind Sample
 

Northwind Traders Overview

What is Northwind Traders?  The Northwind Traders sample database contains sales data for a fictitious company called Northwind Traders, which imports and exports specialty foods from around the world. Click here to see the schema diagram of the database.

Logged in with 'Admin' User ID users can view all the data from the Northwind database freely. Every tables data is displayed in a grid, the grid has a search control just above it. If they like, users can add, edit, delete data from any of the tables and review all the functionality. You will notice from the source code that there are no hidden assemblies that the generated code refers to. All souce code is included in a generated application. For the sake of documetation we have included a sample of the souce code and not all of it. When you purchase the product and generate applications, complete source will be generated and available to review and modify.

We have disabled some of the administration related functionality, from the admin account, so that users accidentally do not lock themselves out of the sample application.

Click here to download a copy of the sample application. The download file contains the sample in 3 different languages - VB.NET, C#, and J#. The setup wizard will walk you through all the necessary steps to setup 3 web applications, one database, and the source projects on your local computer. Once you have run the install you will be able to double-click on the .NET solution and review the application.
Application Architecture 
The base UI of Northwind Traders Sample is created using ASP.NET user controls (.ascx files), a few web pages (.aspx files), and some custom controls. Each of the table has 3 corresponding user controls - Grid, Filter, and Detail control. User controls can easily be reused to display different sets of data from the same table using different criteria. This is especially useful in a portal environment or coporate Intranet.

In addition to the user controls associated with each of the database tables DotNetGenie also generates a few generic user controls. Foreign Key Control allows users to make selections from a table for foreign key values. Custom Datagrid Control is a customized datagrid control and has multiple flavors for mutiple uses. Custom Dropdownlist Control is a dropdownlist control with some added functionality.

There are very few ASP.NET web pages (.aspx files) that are generated. For instance Grid.aspx is used to display all the grids and filter user controls, Detail.aspx is used to display a single record from any table for editing data, MasterDetail.aspx is used to display a master and detail relationship with 2 grid controls.

The middle-tier consists of the business and data layer classes. Business classes provide the data to the presentation layer via objects and fetch data from the data layer via datasets and datareaders. The data layer communicates with the database via stored procedures ONLY. Microsoft's Data Access Application Block is integrated in to the data layer to handle all database access.

Click on the links below to view the files that implement the Northwind Traders Sample Application:

Home Page Web Pages (.aspx files) User Controls (.ascx files) Security Controls Other Controls
You may view the source files in either of the 3 languages VB.NET, C#, or J#. Select the language of your choice from the drop down menu on the top left of the documentation pages.


What did DotNetGenie Do? 
Below is a list of objects that were already present in the Northwind database and a list of objects that were generated by DotNetGenie. The first column contains the number of objects that were already in the database and columns 2 and 3 list the number of objects generated by DotNetGenie.

Northwind Database Objects
 
No. of Tables 13
No. of Views 16
No. of Stored Procedures 7
.NET Framework Objects
 
No. of Solutions 1
No. of Projects 3
 
No. of Data Layer Classes 22
No. of Custom Data Layer Classes 24
No. of Business Layer Classes 22
No. of Custom Business Layer Classes 25
 
No. of Custom Controls 2
 
No. of User Controls 66
No. of Web Pages 12
No. of Base Classes 6
No. of Base Controls 6
No. of Reports 22
No. of Themes 2
Database Objects
 
No. of Tables 9
No. of Views 22
No. of Stored Procedures 185


What Do Some of these Generated Items Mean? 
Solutions This refers to the Visual Studio.NET solution
Projects This refers to the Visual Studio.NET projects. DotNetGenie creates a middle-tier, helper, and user interface project. The middle-tier project contains the data and business layer objects. The helper project contains the custom controls (data grid and dorp down list) and some utilities shared by the other two projects. The user interface project contains all the user controls, web pages, some base classes, some base controls, and themes.
 
Data Layer Classes The data layer classes contain all the generated code for each of the tables. These contain all the properties (fields in the table) and methods (add, edit, delete...). These classes are abstract and should not be modified. The idea is that these classes can be re-generated at any time during the life-cycle of the project.
Custom Data Layer Classes These classes contain minimal code. They inherit from the data layer classes and here is where all the customizations can be coded. Once created these do not have to re-generated. These classes interact with the business layer classes.
Business Layer Classes The business layer classes contain all the generated code for each of the tables. These contain all the properties (fields in the table) and methods (add, edit, delete...). These classes are abstract and should not be modified. The idea is that these classes can be re-generated at any time during the life-cycle of the project.
Custom Business Layer Classes These classes contain minimal code. They inherit from the business layer classes and here is where all the customizations can be coded. These are ideal for business rules validation. Once created these do not have to re-generated. These classes interact with the business layer classes.
 
Custom Controls DotNetGenie creates 2 custom controls that are utilized by the user interface - data grid and drop down list. These two controls are extensions of the base data grid and drop down list controls. We have added additional features to handle foreign key selections.
 
User Controls DotNetGenie generates a set of 3 user controls per table in the database - Filter, Grid, and Detail user controls. User controls are very easy to reuse.
 
Web Pages There are very few web pages in the generated application. DotNetGenie generated applications are user control centric. For example there is one page (grid.aspx) that is used to load the filter and grid controls for any of the tables in the database. Since the application is user control centric the single grid.aspx loads any of the filter and grid control based on the menu item selected.
 
Base Classes These classes contain common code that all the filter, grid, and detail user control share. Individual user controls inherit from these base classes. Source code is included in the genrated application.
 
Base Controls These controls are used by the user interface through out the application. Some of the controls are Header, Footer, Menu, SingIn, Foreign Key, and About.
 
Reports DotNetGenie generates one report per table in the database. These reports are very basic and must be modified by the developer after they are created. DotNetGenie has integrated ActiveReports.NET a report writer create by DataDynamics. You must install at leaset a trial version before you can modify the reports.
 
Themes DotNetGenie by default generates two theme files to be used by the user interface.
 
Database Objects: Tables DotNetGenie create a set of 9 tables to maintain security, bookmarked searches and reports. None of your tables are modified by DotNetGenie.
 
Database Objects: Views DotNetGenie create a single view for each table. The view contains any foreign key tables that are related to the base table.
 
Database Objects: Stored Procedures DotNetGenie create a set of 8 stored procedures for each of the tables in the database. It also create a few extra ones that are security related. These stored proedures can be prefixed before generation so they do not conflict with the existing stored procedures.