Vous êtes sur la page 1sur 4

NLayers Architecture

NLayers tries to provide a Layering solution to a typical ASP.NET application. Intended Audience This project framework is targeted for Architects or Developers with good grip over ASP.NET and Entity Framework. Creating Solution You can create NLayers solution using the template as shown below.

(For installation of NLayers please refer the previous article)

Projects in NLayers On creating a new Project from the NLayers ASP.NET Application template you can see the Solution Explorer as shown below:

Project NLayers.BusinessLogic

NLayers.DataAccess.Interface NLayers.DataAccess.Implemenation NLayers.Entity NLayers.InstanceManager NLayers.Web

Description Business Logic part of the solution. Least expected to be changing the implementation classes throughout the lifetime of project. Decoupled design for Data Access. Implementation of Data Access Interface projet. Project containing the EDMX file of Entity Framework. It contains the entity classes. Project providing instance management for Business Logic and Data Access classes. ASP.NET Web Application. This project uses the WebApp class of InstanceManager to access Business Logic and Data Access instances.

Control Flow The start up project should be NLayers.Web. Web project will be using the Instance Manager project to invoke Business Logic and Data Access classes. The entity project will be used by all the projects. Following diagram depicts the control flow.

Layers in NLayers The layers inside NLayers Architecture are following. 1. Web Application representing the Presentation Layer 2. Business Logic representing the Business Logic Layer 3. Data Access representing the Data Access Layer

NLayers Advantages Following are the advantages of NLayers over a typical monolithic appliclation. Source This document is meant to provide information on NLayers project. You can access the latest source or documentation from: http://nlayers.codeplex.com Summary In this document NLayers Architecture was explained. For detailed information on how to use the NLayers classes use the document named NLayers.Examples. Decoupled Design / Separation of Concerns Easier Manageability Better support for Unit Testing Easier Replace of Data Access Implementation Instance Management CRUD wrappers over Entity Framework VS 2010 Project and Item Templates for Quick Start Better support for Dependency Injection / Policy Injection

Vous aimerez peut-être aussi