2. Model Action
Routing Binding Result
Controller Validation Render
Factory Result
2
3. Restful routing - http://bit.ly/GAl1IG
To build nested collections:
http://localhost/blogs/{id}
http://localhost/blogs/{blogId}/Posts/
http://localhost/blogs/{blogId}/Posts/{id}
http://localhost/blogs/{blogId}/Posts/{postId}/Comments
To be RESTful
For DELETE and PUT special hidden field is used to
support usual form submittion
Convetion over configuration
3
4. IoC container - three calls pattern
Your MVC application MUST NOT have
Resolve calls inside it
AutoFac http://bit.ly/GBH1Au
No matter why or what kind of IoC container you
use
Prefer to have convention based registration
Keep in mind CommonServiceLocator project
http://bit.ly/GB9lB5
4
5. Use FluentValidation - http://bit.ly/GBp3QZ
No attributes
Easy extended
MVC client/server side integration
Easy globalization support
Unit testing friendly
5
6. http://automapper.codeplex.com/
Do not show domain entities to user
Map ViewModels to domain
Once again convention over configuration
Unit test friendly
6
7. All posted here http://bit.ly/GBafxA
Conventional Mapping
LifeTime is managed by IoC container
Transactions are handled by ActionFilters
Always have integration test to validate
mappings
7
9. Mvc Scaffolding
Mvc Contrib
Grid
Strongly typed Html helpers
Strongly typed redirects
Test helpers
Automoq to simulate your IoC container
ModelBinders, ValueProviders for custom
form data
9