Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
ITCamp 2013 - Andrei Ignat - MVC - Common pitfalls and how to resolve them
1. itcampro@ itcamp13# Premium conference on Microsoft technologies
MVC - Common pitfalls and
how to resolve them
Andrei Ignat , C# MVP
http://msprogrammer.serviciipeweb.ro/
Ubisoft Romania
2. itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
MobileHuge thanks to our sponsors!
3. itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
• What is MVC?
• Routing and slug routing
• Validation
• Ajax requests and error handling
• Testing : ViewModels, browser
Agenda
4. itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
– Example of routing
– Intercepting controller errors
– Demo:
– http://haacked.com/archive/2010/02/21/manipul
ating-action-method-parameters.aspx
– Homework:
http://www.jefclaes.be/2012/01/autocorrecting-
unknown-actions-using.html
Routing and slug routing
5. itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
• Model validation
• Unobtrusive
• Ajax with partial views
• Demo
• Homework:
Validation for a list.
Validation
6. itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
• Simple Ajax request
• GET/POST
• Demo
– http://msprogrammer.serviciipeweb.ro/2011/12/
05/jquery-ajax-request-and-mvcdetailed/
• Homework:
Ajax for a list – see
http://haacked.com/archive/2008/10/23/model-
binding-to-a-list.aspx
Ajax requests and error handling
7. itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
• Test ViewModels
• Mocking
– Demo
• Testing Browser
– Demo: Selenium
• Homework:
Ajax test – HttpWebRequest.
Testing : ViewModels, browser
8. itcampro@ itcamp13# Premium conference on Microsoft technologies
Q & A
Thank you !
Andrei Ignat , C# MVP
http://msprogrammer.serviciipeweb.ro/
ignatandrei@yahoo.com