Tuesday, 13 November 2012

My Journey with Sitecore and MVC : part1

I thought i'd start a post about my journey with a green field project for a large client. 

The project is an web application that existing customers of a large vehicle manufacturer can log on to to view details of vehicles the customer owns. This includes service history
The project will be built in MVC3 and will be driven by an existing client database wrapped by a Java web service which I will consume.

The site will use content from an existing Sitecore instance that the client already uses to populate their current site.

There is a possibility of other custom data stores being needed as the requirements become clearer. These extra data stores will be in Sql server and I will use Entity Framework 5 as my ORM.

Here is a list of technology I will be using:

  • ASP.NET MVC3 with a possible mixture of web forms where required.
  • WCF
  • Sql server 2008
  • Ninject as my DI container
  • Moq for unit testing
  • Glimpse.MVC for debugging
  • Automapper - mapping my domain entities to my MVC view models
  • Glass.Sitecore.Mapper - for mapping my Sitecore content items to my domain model. This also gives me Sitecore context in my domain.
  • Sitecore 6.6
My architecture will be somewhat as follows:
  • MVC UI
  • Viewmodel per view 
  • View model builder abstraction to keep my view model code construction out of my controllers
  • A manager / business layer
  • A caching layer
  • I will use the repository pattern with unit of work where required although from the spec, there is no real immediate need for a Unit of work but I will put it in there anyway.
  • A service layer to consume the external service that is hosted at the client.
  • An ORM layer using EF for any custom data stores
  • Sitecore 6.6 that supports MVC3
  • My DI container will take care of IOC so every layer right up to my controllers will be unit testable (I will test where needed but not just do testing for the sake of testing.)
This first post is just a summary. I will post more as I continue.