About

Who Can Help Me? is a web application that allows communities to capture skill profiles, making it easier to find people who can help you. It is also a technology showcase of Sharp Architecture (including ASP.NET MVC 1.0,
NHibernate & Fluent NHibernate).

Branches

The "Main" branch contains vanilla WCHM - running against the 1.5 version of Sharp Architecture

The "N2CMS" branch demonstrates how to integrate
N2CMS into the framework

The "VS2010" branch contains a vanilla version of WCHM that runs in Visual Studio 2010 and .NET 4.0.

History

Who Can Help Me? was originally written in just over 3 hours using ASP.NET WebForms and LINQ to SQL to try and solve the business problem of creating a searchable skills matrix that would allow people within an organisation find other people who had specific
skills or expertise who could help them solve a particular problem. The application has now been re-written using Sharp Architecture and many other Open Source Frameworks & Tools.

Q&A

James Broome has written a
superb Q&A that covers many of the architectural decisions behind Who Can Help Me - the questions were posed by a developer new to the solution & architecture.

Separation of Concerns

Testability, Inversion of Control & Single Responsibility Principal

These three concepts go hand-in-hand.; the best way to make your code testable is to implement Inversion of Control, so that you mock your dependencies. If you make sure your code follows the SRP then testing is further simplified because you are enforcing
that your code should do one thing only. Within
Who Can Help Me? we used Behaviour Driven Design, using the
Machine.Specifications (MSpec) BDD Framework and
RhinoMocks.

Aspect Oriented Programming

Another key concept demonstrated in Who Can Help Me is the use of AOP via PostSharp to remove repetitive commodity code from your solution and to refactor this boilerplate code into PostSharp Aspects which you can easily apply to your areas of your application.
Within Who Can Help Me we make use of AOP to manage the caching infrastructure.

Client Side File Versioning

One aspect of web development that is generally overlook is versioning of client side files, for example static content such as CSS & JS files as the user can experience errors or code malfunctions once a new version of the web application is deployed and
static files on the client machine become out of sync with the newer static files required by the new version of the web application. Who Can Help Me demonstrates a simple, yet effective solution to this problem.

Sharp Architecture

Used as the architectural reference for the MVC solution structure, however, we moved away from the original reference in the following ways.

Naming

Various layers of the Sharp Architecture solution were re-named by the team:

Data -> Infrastructure

Renamed as our Data namespace ended up containing more than just our own repositories of data and included third party services. When the rubber hits the road for any DB, webservice, WCF, integration calls, it goes here.

Core -> Domain + Framework

We split out domain entities into the Domain namespace, and anything that was generic, core, functionality into the Framework namespace. The idea being that Framework could be reused across projects, however Domain was, well, domain specific.

ApplicationServices -> Tasks

A simple and subtle change, but removes the confusion over the difference between Application Services and Domain Services. DDD is all about language, and we found that as soon as we started talking about our Application Services layer as a Tasks Layer, then
things seemed to start to make more sense. We mandate the use of the Tasks layer, as a logical application boundary. Controllers are presentation logic, so any business logic (e.g. validation) must happen behind the Tasks layer.

View Models

Sharp Architecture does not prescribe the use of view models, however, through experience we found that it better practice to have a default stance of using them. The majority of the boiler plate mapping code can be handled by
AutoMapper, leaving your controllers clean.

Architecture Diagram

Below is the logical architecture of the Who Can Help Me application:

Below is a dependency graph of the components within the Who Can Help Me application (generated by
NDepend). As you can see, the Who Can Help Me application is quite loosely coupled:

Dependencies

In order to get up and running with Who Can Help Me?, a few dependencies are required:

Set the host name within the bindings dialog for this site to be dev.who-can-help.me

Under "Basic Settings" set the physical path of the site to be C:\Projects\CodePlex\WhoCanHelpMe\Main\Solutions\WhoCanHelpMe.Web

If you do not have Visual Studio Team System 2008 Database Edition GDR 2 installed, then please ensure you have SQL Server (Express or Developer) installed and run the script located in
C:\Projects\CodePlex\WhoCanHelpMe\Main\Data\create-db-and-data.sql

Run the RunFirst script to set up the assembly versioning at C:\Projects\CodePlex\WhoCanHelpMe\Main\Build\RunFirst.cmd

Make sure the solution builds and all the tests pass by running C:\Projects\CodePlex\WhoCanHelpMe\Main\Build\RunSpecs.cmd