ASP.NET MVC 3

21
ASP.NET MVC 3 Jonathan Canfield Mavin Lisa Giss Professor Kenytt D. Avery

description

ASP.NET MVC 3. Jonathan Canfield Mavin 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 - PowerPoint PPT Presentation

Transcript of ASP.NET MVC 3

Page 1: ASP.NET MVC 3

ASP.NET MVC 3

Jonathan CanfieldMavin Lisa Giss

Professor Kenytt D. Avery

Page 2: ASP.NET MVC 3

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

Page 3: ASP.NET MVC 3

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.

Page 4: ASP.NET MVC 3
Page 5: ASP.NET MVC 3
Page 6: ASP.NET MVC 3
Page 7: ASP.NET MVC 3

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.

Page 8: ASP.NET MVC 3

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.

Page 9: ASP.NET MVC 3

Key features continued

• HTML 5 enabled project templates• Expressive views including Razor View Engine• Dependency Injection and Global Action

Filters• JavaScript support

Page 10: ASP.NET MVC 3

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#

Page 11: ASP.NET MVC 3

Controller example

Page 12: ASP.NET MVC 3

Views example

Page 13: ASP.NET MVC 3

Model Example

Page 14: ASP.NET MVC 3

Building a sample app

Page 15: ASP.NET MVC 3

• The default template created for a ASP.NET MVC project.

Page 16: ASP.NET MVC 3
Page 17: ASP.NET MVC 3

Adding a controller to the project

Page 18: ASP.NET MVC 3

Adding a method

Page 19: ASP.NET MVC 3

Adding a view

Page 20: ASP.NET MVC 3

Reasons to Learn ASP.NET MVC

• To unit test

• To gain control and extensibility

• To learn something new

– Google Developer Kevin Pang

Page 21: ASP.NET MVC 3

References

http://www.asp.net/mvc/overview/getting-startedhttp://msdn.microsoft.com/en-us/gg618477