V0.9 - N-Layer DDD Sample App .NET4 PEX0.92 compat

Rating:        Based on 4 ratings
Reviewed:  4 reviews
Downloads: 5371
Change Set: 49531
Released: Jul 23, 2010
Updated: Aug 25, 2010 by cesardl
Dev status: Beta Help Icon

Recommended Download

Source Code V0.9 - N-Layer DDD Sample App (NET4.0 & PEX&MOLES V. 0.92 compatible)
source code, 4094K, uploaded Jul 23, 2010 - 4060 downloads

Other Available Downloads

Documentation V0.8 .CHM Help File (Assemblies Documentation)
documentation, 1196K, uploaded Jul 23, 2010 - 835 downloads
Source Code V0.72 - N-Layer DDD Sample App - (WinSrv AppFabric-Cache and Hosting Compatible)
source code, 5023K, uploaded Jul 23, 2010 - 476 downloads

Release Notes

Required Software (Microsoft Base Software needed for Development environment)

  • Visual Studio 2010 RTM & .NET 4.0 RTM (Final Versions)
  • Expression Blend 4 RC (Or newer Version)
http://www.microsoft.com/downloads/details.aspx?FamilyID=88484825-1b3c-4e8c-8b14-b05d025e1541&displaylang=en
  • Unity Application Block 2.0 - Published May 5th 2010
http://www.microsoft.com/downloads/details.aspx?FamilyID=2D24F179-E0A6-49D7-89C4-5B67D939F91B&displaylang=en
http://unity.codeplex.com/releases/view/31277
  • PEX v0.92.50603.1, 06/07/2010 - (including Moles) Visual Studio 2010 Power Tools Pre-Release
http://research.microsoft.com/en-us/projects/pex/downloads.aspx#PexMSDN
  • WPF Toolkit
http://wpf.codeplex.com/releases/view/40535
http://wpf.codeplex.com/
  • Silverlight 4 Tools for Visual Studio 2010
http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=40ef0f31-cb95-426d-9ce0-00dcfabf3df5
  • Silverlight 4.0 Toolkit (Apr. 15 2010)
http://silverlight.codeplex.com/releases/view/43528
  • Windows Server AppFabric Beta2 Refresh or RC (Just for our version 0.72)
http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=a9b94a33-2ec2-4439-902f-813539cf42d2

Minor Changes in V.0.9
- Compatible with PEX & MOLES V. 0.92
- Shorter assemblies' names, needed for deployment of next version to be migrated to Windows Azure

Functionality in V0.8 & V0.9:

UNITY 2.0 support
-- Almost all code was compatible. We just changed some lifetimemanagers, see down below.

Silverlight 4.0 Client (Better functionality)
-- Silverlight project is 100% Blend 4 Friendly
-- Class Library with entities logic code for Self Tracking Entities process. We're referencing same code used in .NET through links, so, for this point we use same code for .NET and Silverlight, but we recompile it in a Silverlight library code which just has liks to .NET code situated in Domain.Core,Domain.MainModule.Entities.

New Unity lifetimemanager for Unit Of Work (EF Context) sharing between several object graphs and Resolve<>
-- We created our custom lifetimemanager which is called "PerExecutionContextLifetimeManager". This way you can share your Unit-Of-Work (EF-Context) between several Unity object graphs (different IoCFactory.Resolve<>). :-)
Internally (within our lifetimemanager) we're storing the Unit-Of-Work (EF-Context) within a context, depending of the EXECUTION ENVIRONMENT, I mean:
- WCF Service --> WCF Context
- ASP.NET --> HTTP Context
- Unit Testing --> CallContext (Based on internall Remoting ContextBoundObjects)

See this thread for more info: http://microsoftnlayerapp.codeplex.com/Thread/View.aspx?ThreadId=211448

How To Setup this project in VS.2010:

After installing ALL pre-required software, do the following steps
- Create an empty SQL Server 2008 or SQL 2008 R2 DataBase called NLayerApp (conn-string is currently using SQL Server 2008 EXPRESS, like .\SQLEXPRESS)
- IMPORTANT: Open the VS Solution and within the DATABASE project, execute the sql script called "Script.PostDeployment.sql". This will create all the tables needed bythe app. Take into account that thisscript will be executed in every app's execution, so, all data will be cleaned up, for testing purposes, etc. It you do not want this, just comment the content of thie .SQL file or enable/disable it within Database project's settings.
- Select the WPF or SL4.0 project as 'Default project' for debugging.
- Depending on what you want to execute (Repositories working against the real DB or against an in-memory 'EF-MOCK' we have), you can change it using just a Web.config property in the WCF WebSite project:
key="defaultIoCContainer" value="RealAppContext" will run against the Database
key="defaultIoCContainer" value="FakeAppContex" will run against in-memory EF-Context fake

Reviews for this release

     
I really appreciate the efforts this team have put into making this excellent Architectural example, and also all the guidance and assistance they offer to the community. It's really useful to have a real and practical sample application covering much of Microsoft technology, going beyond the typical advice and considerations described in the usual architectural guides.
by Kings on Nov 25, 2010 at 11:41 AM
     
Estimados colegas, felicitaciones por el trabajo que vienen realizando, realmente me abrio los ojos y me ayudo a encarar unos proyectos en la empresa siguiendo esta arquitectura propuesta. Excelente trabajo gente, mis sinceras felicitaciones!!!!!!!!!!!! Ojala mas gente se sumara a estos proyectos que hacen que realmente valga la pena leeer un libro de 500 paginas.
by maurozuccolo on Nov 2, 2010 at 2:49 AM
     
I agree, there seem to be very few quality examples out there on the net that showcase all of Microsoft's technologies in a n-layer n-tier system. This project has taught me lots! I'm looking forward to seeing a MVC.Net website added to this project.
by duckaroy on Sep 2, 2010 at 3:23 AM
     
It´s a great project. I really think that MSFT HQ really need to take a look at this. (Hi ScottGu). Microsoft have great technologies, but there is nowhere where you can see all products working together in more complex/complete way. MSFT examples are very simple, and don´t deal with real world issues. This project from MSFT/Spain is in the right direction. Brazilian Regards.
by camilotelles on Jul 25, 2010 at 11:40 PM