Web Application Structure

The Web Application Solution is made up of four projects:
 * Core - A dumb layer that contains definitions but minimal logic. Contains the Datatypes/POCO classes, Interfaces and simple shared Utility classes. It is top of the project tree - does not reference any of the other layers.
 * Data - Controls access to Oracle by implementing the Data Repository Interfaces defined in Core and accepting/returning the Datatypes defined in Core. The purpose of this layer is to abstract the interaction with the database. All other layers are ignorant of the Database setup/technology.
 * Business - Responsible for applying any business rules, acts as the middle man taking data from the Data Repositories and manipulating it for use by the Web layer and taking data from the Web layer and processing it to pass it to the Data Repositories. It does this by implementing the Service interfaces defined in Core
 * Web - The web layer handles any user interaction by preparing web pages for display and handing any user input. It consumes the services from the Business layer.

The purpose of these layers is to provide a separation of concerns with each layer only being responsible for its specific function - this allows for easier testing/maintainability. It also reworking of one layer without disturbing the other (e.g. replacing the data layer with a different implementation) or the mocking of a layer (e.g. creating a mock Data layer to allow testing of the Business layer without real data)

Other than Core the layers are Loosely Coupled with the interfaces/contracts defined in Core. So: At run time the Dependency Injection (DI) telling the application where to find these implementations is handled by an Inversion of Control (IoC) container - we are using Castle Windsor for this. The Castle Windsor installer classes tell the application in which project/class it will find the implementation of﻿ each of the interfaces.
 * Web knows that there will be Services as defined in Core, but doesn't care where they are implemented
 * Business knows there are Data Repositories as defined in Core, but doesn't care where they are implemented