When starting a software project, the first question is : which architecture should we use ? What are the more efficient practices?
It depends of project size. There are two categories:
-RAD (Rapid Application Development) for little projects
-DDD , Domain Design Driven for big project, software we want use for several years
In RAD development, Architecture is designed by the environment development (like in visual studio) behind the designer when you drag and drop component between the GUI (Graphic User Interface) and the DataSource. Microsoft has built a framework called LigthSwitch (go the RAD article).
In DDD development, Architecture is splitted in N layers:
1- Presentation Layer:
in this layer, you can use different patterns on GUI implementation like
-MVC (Model View Controller) with Asp.net MVC
-MVP (Model View Presenter) with Winforms Technologie
-MVVM ( Model View ViewModel) used with WPF technologies
Presentation Layer contains all GUI mechanism
2-Distributed Service Layer
this layer allows to communicate between Presentation layer and the other layers
it is very interesting if you want to make your application distributable in a N Tiers architecture (composed by many computer ;-))
Microsoft technologies for this layer are WCF, Web services, and windows server appfabric (this last is also used in Cross cutting layer). in this layer, SOA or REST are used to distribute services and isolate the software from the GUI.
Application layer represent the workflow of the software and can be implemented by Windows Workflow Foundation (WF) Application Service ( provide service at Application level ) and Adapter (To make convertion between DTO to domain entities).
4- Domain Layer
Domain Layer (Business Layer) contains entities, services, repositories contract and query specifications. All around business is implemented here.
5- Data Infrastructure Layer
this layer is used to persist data in different storage. Microsoft technologies used are
-ORM like Entity Framework 4.0
-Service Agents with Web services and WCF
6- Cross Cutting Layer
this layer is shared by all other layers and contains cache, security, technical logging and operations. Unity and MEF are used to implement in this layer and allow to decorate at reflection level the whole application especially with AOP (Aspect Oriented Programming)