introduction to asp.net mvc 2
DESCRIPTION
Introduction to ASP.NET MVC 2TRANSCRIPT
Shiju VargheseShiju Varghese
http://weblogs.asp.net/shijuvarghese
Introducing ASP.NET MVC 2Introducing ASP.NET MVC 2
Who am I?Who am I?
Shiju VargheseShiju VargheseFocus on ASP.NET MVC & DDDFocus on ASP.NET MVC & DDDASP.NET MVPASP.NET MVPBlog: http://weblogs.asp.net/shijuvargheseBlog: http://weblogs.asp.net/shijuvargheseTwitter: http://twitter.com/shijucvTwitter: http://twitter.com/shijucv
Session ObjectivesSession Objectives
Introduction to ASP.NET MVCIntroduction to ASP.NET MVC Demonstrate App building with ASP.NET Demonstrate App building with ASP.NET
MVC 2MVC 2
What is ASP.NET MVCWhat is ASP.NET MVC An alternative framework to ASP.NET Web An alternative framework to ASP.NET Web
FormsForms More control over your HTMLMore control over your HTML A more easily testable frameworkA more easily testable framework Simply an optionSimply an option
Will not a replacement for Web FormWill not a replacement for Web Form Build on top of ASP.NETBuild on top of ASP.NET
MVC ArchitectureMVC Architecture
DemoDemo
Goals of ASP.NET MVC Goals of ASP.NET MVC FrameworkFramework
Enable clean separation of concernsEnable clean separation of concerns Each component has one responsibilityEach component has one responsibility
Single Responsibility Principle (SRP)Single Responsibility Principle (SRP) Highly testable and maintainable applicationHighly testable and maintainable application
Testable by default (built with TDD in mind)Testable by default (built with TDD in mind) Red/Green/Refactor TDD Red/Green/Refactor TDD
Enable full control over the rendered HTMLEnable full control over the rendered HTML Enable clean URLs and HTMLEnable clean URLs and HTML
SEO and REST friendly URL structuresSEO and REST friendly URL structures
Goals of ASP.NET MVC 2
Enterprise readyBetter productivityBetter Maintainability
What’s New in ASP.NET MVC 2.0?
Strongly Typed HTML HelpersTemplated ViewsData AnnotationsAreas
ASP.NET MVC Best practices ASP.NET MVC Best practices Use a service layer to put application logic.Use a service layer to put application logic. Use ViewModel objects to pass data for Use ViewModel objects to pass data for
the Views.the Views. Use AutoMapper to map between Use AutoMapper to map between
ViewModel objects and Domain model ViewModel objects and Domain model objects.objects.
Use an Inversion of Control or MEF for Use an Inversion of Control or MEF for building loosely coupled software.building loosely coupled software.
Use your own HTML helpers to keep logic Use your own HTML helpers to keep logic out of your views.out of your views.
Source Code
http://RavenMVC.codeplex.com- ASP.NET MVC 2, RavenDB & Unity 2
- For MongoDB version, http://MongoMVC.codeplex.com
Questions?Questions?
ThanksThanks
Shiju VargheseShiju Varghese
Blog : http://weblogs.asp.net/shijuvargheseBlog : http://weblogs.asp.net/shijuvarghese
Twitter : http://twitter.com/shijucvTwitter : http://twitter.com/shijucv