Infrastructure code that matters
Model                  ActionRouting                Binding                Result          Controller             Validati...
   Restful routing - http://bit.ly/GAl1IG   To build nested collections:     http://localhost/blogs/{id}     http://lo...
   IoC container - three calls pattern   Your MVC application MUST NOT have    Resolve calls inside it   AutoFac http:/...
   Use FluentValidation - http://bit.ly/GBp3QZ   No attributes   Easy extended   MVC client/server side integration  ...
   http://automapper.codeplex.com/   Do not show domain entities to user   Map ViewModels to domain   Once again conve...
   All posted here http://bit.ly/GBafxA   Conventional Mapping   LifeTime is managed by IoC container   Transactions a...
Action                         ActionRouting                    Filter                         Filter• Restful            ...
   Mvc Scaffolding   Mvc Contrib     Grid     Strongly typed Html helpers     Strongly typed redirects     Test help...
Upcoming SlideShare
Loading in...5
×

Mvc extension points in action

5,140

Published on

Presentation shows how asp.net mvc extension points can be used to build all infrastructure for business applicaions

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
5,140
On Slideshare
0
From Embeds
0
Number of Embeds
42
Actions
Shares
0
Downloads
6
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Mvc extension points in action

  1. 1. Infrastructure code that matters
  2. 2. Model ActionRouting Binding Result Controller Validation Render Factory Result 2
  3. 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. 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. 5.  Use FluentValidation - http://bit.ly/GBp3QZ No attributes Easy extended MVC client/server side integration Easy globalization support Unit testing friendly 5
  6. 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. 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
  8. 8. Action ActionRouting Filter Filter• Restful • Begin • End routing transaction transaction Controller Validation Factory • Fluent • Dependency Validation Resolver • Autofac 8
  9. 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
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×