MvcExtensions tries to be the Ruby on Rails of Asp.NET MVCdevelopment.
When you build a new ASP.Net application, you typically need some extra components in order to get started (an ORM, DI container, …)
In Ruby on Rails you do not need to setup a single component to get started; basic functionality is available out of the box.
MvcExtensions does the same by providing a reusable bootstrapper which sets up an ORM
, a DI container
and the Spark viewengine
.
This makes building new apps a breeze, since all the (default) wiring is done by us.
These are the basic steps :
- Create a new ASP.Net MVC project
- Reference the MvcExtensions DLL
- Define your model classes where every public property or function should be
virtual
and have anint id
(i.e. implementIModelId
) - Tell MvcExtensions where to find these classes by using a very simple interface:
IDomainDefinition
- Init the mvcextensions lib by registering your
Database
&IDomainDefinition
and allIOC dependencies
inglobal.asax
- You are ready to go
There is a lot more to this project, but this is all you need to get started. You can find more info in the following articles:
- A screencast
- All the required code/steps in a single overview
- [[Proper responsibilities]]: Defining ActionLinks in the controller instead of the view.