A code sample is worth a thousand words. Here are a few projects to take a look at that go beyond just code snippets to show you how to put key technologies together in the form of sample applications. (Note, if you are looking for just code snippets and focused code samples, you can check out the Microsoft All-in-One Code Framework project site on CodePlex.)
Layered Architecture Solution Guidance
Project Site – http://layerguidance.codeplex.com
”Designing and creating layered applications can be a challenging task to developers. Layered Architecture Solution Guidance is a Microsoft Visual Studio 2010 extension that provides a set of tools and guidance aimed at simplifying the development of layered applications.
Layered Architecture Solution Guidance is a Guidance Automation Extension that integrates with Microsoft Visual Studio 2010 to allow developers to easily create and organize their projects in a layered fashion following the structure that is illustrated in the Layered Architecture Sample for .NET. It provides a set of solution templates integrated with a suite of code generators to make developing layered applications much simpler and quicker.
Microsoft Spain – Domain Oriented N-Layered .NET 4.0 Sample App
Project Site – http://microsoftnlayerapp.codeplex.com/
The main goal is to show how to use .NET 4.0 wave technologies implementing typical DDD patterns: N-Layered Architecture, Domain Entities, Aggregates, Repositories, Unit of Work, Domain Services, Application Services, DTOs, DTO-Adapters, etc.
Improvements in the Domain Layer
- Using EF 4.1 POCO Code-First approach for Domain Entities/Aggregates/ValueObjects
- Added more Domain logic within entities (no anemic domain)
- Better exposure of Aggregates’ elements
- Better support to navigations between Aggregates and elimination of inverse relationships not needed
- Entity Validation support
- Specification pattern implementation, use of expressions as specifications and composition support
Improvements in the Application Layer
- DTO and DTO-Adapters support
- Validation support
- Improvements in exception management
Improvements in the Data-Persistence-Infrastructure Layer
- Using EF 4.1, CodeFirst, DbContext
- Persistence layer simplification and improvements
- IoC/Unity: Elimination of abstractions no needed
- Better testing strategy for Integration Tests
Improvements in the Presentation Layer
- Reviewed and minor improvements in MVVM code.
- In current V2.0 version we only support a Silverlight client. We’d like to add more clients in the future.
Improvements in the Distributed-Services Layer
- Segregation in 2 Web-Services (One per MODULE).
- Improvements regarding WCF exceptions handling (less spread code in Catch)
- We currently use SOAP Web-Services, but we will switch to REST in the coming future when the new WCF Web API (WebApi.all) (still in beta) will support Silverlight.