ASP.NET MVC 3 Jonathan Canfield Mavin Lisa Giss Professor Kenytt D. Avery
Jan 03, 2016
ASP.NET MVC 3
Jonathan CanfieldMavin Lisa Giss
Professor Kenytt D. Avery
History of ASP.NET
• Active Server Pages (ASP) released in 1998• Replaced by ASP.NET in 2002– Addressed separation of presentation and content
• ASP.NET MVC framework released in 2009– Integrated with ASP.NET– Framework allowing Model – View – Controller
based development
What is ASP.NET MVC
• MVC stands for Model-View-Controller which is a framework that is a lightweight, highly testable framework that is integrated with existing ASP.NET features.
• MVC separates an application into three main components for ASP.NET– Model– View– Controller
• This allows software developers to build web apps as a composition of three roles.
Advantages of MVC
• Makes it easier to manage complexity by dividing app into three roles
• Does not use view state or server-based forms. This gives the developer more control
• Provides better test-driven development • Works well for Web apps that are being
developed by large teams.
Some Key Features
• Separation of input, business and UI logic.• Components are designed so they can be
easily replaced or customized for a specific need. – For example you could plug in your own view
engine. • Allows you to build web apps
comprehensible and searchable URLs.• Supports existing ASP.NET features.
Key features continued
• HTML 5 enabled project templates• Expressive views including Razor View Engine• Dependency Injection and Global Action
Filters• JavaScript support
Building an app
• One nice aspect (for some) is you can use Visual Studio for building apps.
• The Primary language used for ASP.NET MVC is C#
Controller example
Views example
Model Example
Building a sample app
• The default template created for a ASP.NET MVC project.
Adding a controller to the project
Adding a method
Adding a view
Reasons to Learn ASP.NET MVC
• To unit test
• To gain control and extensibility
• To learn something new
– Google Developer Kevin Pang
References
http://www.asp.net/mvc/overview/getting-startedhttp://msdn.microsoft.com/en-us/gg618477