Dowmload Code - Click Here!
N-Tier Architect
developing .Net Application Using N-Tier Approach
What is N-Tier Architect
N-Tier architecture refers to the architecture of an application that has at least 3 "logical" layers -- or parts -- that are separate. <o:p>
Why Use N-Tier Architect
Because each layer can be located on physically different servers with only minor code changes, hence they scale out and handle more server load. Also, what each layer does internally is completely hidden to other layers and this makes it possible to change or update one layer without recompiling or modifying other layers.<o:p>
N-Tier Architect Over View
Any application developed using N-Tier Architect must have at least three logical
layerare:
• Presentation Tier <o:p>
• Business Logic Tier <o:p>
• Data Access Tier <o:p>
<o:p>
Enhancement in 3 Tier <o:p>
We can enhance our application by using some more layers. For presentation tier and
business logic tier communication.
• Business Facade Tier <o:p>
It would be better if we also separate application data passingclasses and configuration
and tracing classes.
• Common <o:p>
• System Frame Work <o:p>
<o:p>
Final N-Tier Architect
Finally we have N-Tier architecture which has four logical layers.
These are:
• Presentation Layer <o:p>
• Business Facade Layer <o:p>
• Business Rules Layer <o:p>
• Data Access Layer<o:p>
More… <o:p>
• Common <o:p>
• System Frame Work
<o:p>
<v:shapetype id="_x0000_t75" path="m@4@5l@4@11@9@11@9@5xe" stroked="f" filled="f" o:preferrelative="t" o:spt="75" coordsize="21600,21600"><v:stroke joinstyle="miter"><v:formulas><v:f eqn="if lineDrawn pixelLineWidth 0"><v:f eqn="sum @0 1 0"><v:f eqn="sum 0 0 @1"><v:f eqn="prod @2 1 2"><v:f eqn="prod @3 21600 pixelWidth"><v:f eqn="prod @3 21600 pixelHeight"><v:f eqn="sum @0 0 1"><v:f eqn="prod @6 1 2"><v:f eqn="prod @7 21600 pixelWidth"><v:f eqn="sum @8 21600 0"><v:f eqn="prod @7 21600 pixelHeight"><v:f eqn="sum @10 21600 0"><v:path o:connecttype="rect" gradientshapeok="t" o:extrusionok="f"><o:lock v:ext="edit" aspectratio="t"><o:p>
<o:p>
Presentation Tier
Contains user interface based upon windows form/web forms and code behind files.
– Modules (User Controls) <o:p>
– Web Pages <o:p>
• This layer is implemented as the Web project in the Duwamish.sln (you can download duwamish from link in ref at the end of this article).
<o:p>
Business Facade
The Business Facade layer serves as an isolation layer, segregating the user interface from the implementation of the various business functions.
This layer is implemented as the BusinessFacade project in the Duwamish.slnsolution file.
<o:p>
Business Rule
contains the implementation of the various business rules and logic. Business rules do tasks such as the validation of customer accounts and book orders.
This is implemented as the BusinessRules project in the Duwamish.sln solution file.
<o:p>
Data Access Tier
The Data Access layer provides data services to the Business Rules layer.
• This layer is implemented as the DataAccess project in theDuwamish.sln solution file.
<o:p>
Common<o:p>
The Common layer contains datasets that are used for passing information between thevarious layers.
This layers is implemented in the Common project in the Duwamish.sln solution file.
System Frame Work
This contains application configuration and tracing within the System.
This is implemented in SystemFramework project in the Duwamish.sln solution file. <o:p>
• Presentation Tier <o:p>
– Module <o:p>
à Create Customer .ASCX<o:p>
– Web Page <o:p>
à Create Customer .ASPX<o:p>
<o:p>
• Business Façade Tier <o:p>
à CUSTOMER.CS<o:p>
• Business Logic Tier <o:p>
à CUSTOMER.CS<o:p>
• Data Access Tier <o:p>
à CUSTOMER.CS<o:p>
• More… <o:p>
• Common <o:p>
à CUSTOMER.CS<o:p>
<o:p>
<o:p>
<o:p>
<o:p>
<o:p>
<o:p>
Deployment of Tiers
There are two methods to deploy your N-Tier architect application.
Distributed
Non Distributed
Distributed Deployment
In distributed deployment each tier is hosted independently
For large scale applications.
<o:p>
<o:p>
<o:p>
<o:p>
Non- Distributed Deployment
In this type of deployment you can host all of your tiers in the presentation tier
For small scale application.
<o:p>
Ref:<o:p>
- http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dwamish7/html/vtoriDuwamish70Overview.asp<o:p>