Skip to content
alecwhittington edited this page Sep 24, 2012 · 35 revisions

Overview

Pronounced "Sharp Architecture," this is a solid architectural foundation for rapidly building maintainable web applications leveraging the ASP.NET MVC framework with NHibernate. The primary advantage to be sought in using any architectural framework is to decrease the code one has to write while increasing the quality of the end product. A framework should enable developers to spend little time on infrastructure details while allowing them to focus their attentions on the domain and user experience. Accordingly, S#arp Architecture adheres to the following key principles:

  • Focused on Domain Driven Design
  • Loosely coupled
  • Preconfigured Infrastructure
  • Open Ended Presentation

The overall goal of this is to allow developers to worry less about application "plumbing" and to spend most of their time on adding value for the client by focusing on the business logic and developing a rich user experience.

Absolutely essential reading is Eric Evans’ Domain Driven Design. For a quick introduction to the subject, see Domain Driven Design Quickly which is a concise summary of Evans’ classic work. Other useful background material, albeit dated, includes NHibernate Best Practices. Although there are major infrastructural changes from the referenced article when compared to the current S#arp Architecture, the general structure is very similar and the background reading is helpful in understanding many of the ideas behind this development foundation.

Architecture

The project is divided into the following layers:

  • Tasks
  • Domain
  • Infrastructure
  • Presentation
  • Specs/Tests

Despite their divergent names, the layers and their functions should be familiar to anyone with experience with the MVC pattern.

More on Architecture

Simple CRUD Application

Sharp Architecture makes it simple to do CRUD applications right out of the box. While we recommend the use of another framework such as Dynamic Data for CRUD heavy sites, take a look at how to do simple CRUD operations in Sharp Architecture.

Simple CRUD Application

#Updating dependencies via nuget

In Visual Studio, open the Package Manager Console, and run:

Update-Package -Safe

This will update all packages to their latest compatible version. You can update a specific package by providing the package name.

If any of the assemblies that have been updated are strongly signed, you would need to add assembly binding redirects to your applications config files (including the test projects). Luckily this can be done easily with nuget, in the Package Manager Console select each project you want to add assembly binding redirects to and run:

Add-BindingRedirect

Additional Resources

Thanks

Sharp Architecture attempts to represent the combined wisdom of many software development giants. Included patterns and algorithms reflect best practices described by the GoF, Martin Fowler, Uncle Bob Martin, Steve McConnell, many gurus in the blogosphere and other industry leaders. Many have been personally involved with helping to shape S#arp Architecture’s current form including and in no paticular order: Alec Whittington, Chris Richards, Seif Attar, Jon George, Howard van Rooijen, Billy McCafferty, Frank Laub, Kyle “the coding hillbilly” Baley, Simone Busoli, Jay Oliver, Lee Carter, Luis Abreu, James Gregory, and Martin Hornagold ... along with many others who have asked WTF at all the right times. A special thanks to Roy Bradley who was brave crazy enough to commission Billy to develop the first version 0.1. Finally, none of this would have been possible and/or applicable without the tireless, unpaid efforts of the teams behind projects such as NHibernate, Fluent NHibernate, NHibernate Validator, MvcContrib, and Castle.