Many developers use the Model View Controller (MVC) design pattern for their projects these days. Microsoft has an MVC Framework available for both .Net Framework and .Net Core. For many applications a three tiered architecture makes more sense but sometimes it doesn't and a more flexible architecture is required. This repository provides examples of five different ways to implement a three tiered architecture with .Net.
Disadvantages of using Microsoft's MVC Framework
- Locked into using Visual Studio or Visual Studio Code for the front end development. Front end developers must know C# or another .Net programming language.
- MVC gets overly complicated for very complex applications.
- Difficult to use stored procedures with MVC.
- Layers must use the same technology.
- Parallel development more difficult because the model, view, and controller are all compiled at the same time.
Advantages of a three tiered architecture
- Front end developers can develop HTML with any development tool even Dreamweaver. A different technology can be used for each tier. Front end developers don't need to know .Net.
- More maintainable for larger more complex applications.
- Because the tiers are completely separate, the database developer can freely develop stored procedures.
- Technology agnostic for application layers.
- Parallel development easier.
Architecture used for all five sample applications in this repository
CoreSample Project Highlights
- .Net Core 2.1
- Web application (Compiled with Visual Studio)
- HTTP web service used to communicate with client
- Dependency injection used for integrating data access layer
- Strehan.DataAccess used for the data access layer
HandlerSample Project Highlights
- .Net Framework 4.7.1
- Website (Compiled by IIS)
- Handlers (ashx files) used to communicate with client
- Strehan.DataAccess used for the data access layer
- Strehan.GenericHandlers used for the handlers
WCF Project Highlights
- .Net Framework 4.7.1
- Website (Compiled by IIS)
- HTTP web service used to communicate with client, web service implemented with WCF
- Strehan.DataAccess used for the data access layer
WebAPI Project Highlights
- .Net Framework 4.7.1
- Web application (Compiled with Visual Studio)
- HTTP web service used to communicate with client
- Dependency injection used for integrating data access layer
- Strehan.DataAccess used for the data access layer
WebAPIWebsite Project Highlights
- .Net Framework 4.7.1
- Website (Compiled by IIS)
- HTTP web service used to communicate with client
- Dependency injection used for integrating data access layer
- Strehan.DataAccess used for the data access layer