introduction to asp.net mvc

18
Introduction to ASP.NET MVC LOHITH G. N. DEV EVANGELIST, TELERIK [email protected]

Upload: lohith-gn

Post on 15-Dec-2014

742 views

Category:

Technology


1 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Introduction to asp.net mvc

Introduction to ASP.NET MVC

LOHITH G. N.

DEV EVANGELIST, TELERIK

[email protected]

Page 2: Introduction to asp.net mvc

Session Objectives

• What is ASP.NET MVC?

• What is MVC?

• Is it deprecating WebForms?

• What are its value propositions?

• Is ASP.NET MVC right for you?

• Can it ease some web development pain you’re currently having?

Takeaways

Page 3: Introduction to asp.net mvc

ASP.NET Then…

Caching Modules

HandlersIntrinsics

Pages Controls

Globalization

Profile

Master Pages

MembershipRoles

Etc.

ASP.NET

One web applicationframework to rule them all…

Page 4: Introduction to asp.net mvc

ASP.NET Now…

ASP.NETDynamic Data

ASP.NETWebForms

ASP.NETMVC

Presentation

RuntimeASP.NET

Core

Page 5: Introduction to asp.net mvc

WebForms is great, but options

are good…

Page 6: Introduction to asp.net mvc

Master Page

Control

Control

No real role responsibility…

UIPresentation LogicBusiness LogicData Access

Who does what?How and when?

Control

ControlPage

Control

Control

Control

Control

Page 7: Introduction to asp.net mvc

Control abstractions can be negative…

Page 8: Introduction to asp.net mvc

It isn't easy enough to test…

Logic UI

Page 9: Introduction to asp.net mvc

So how does ASP.NET MVC

differ?

Page 10: Introduction to asp.net mvc

MVC = Model-View-Controller

Controller(Input)

Model(Logic)

View(Presentation)

Separation of concerns!

Page 11: Introduction to asp.net mvc

How does MVC look?

Request

View

Controller

Response

ControllerHandles input(HTTP requests)

ViewVisually representsthe model

Page 12: Introduction to asp.net mvc

File | New

Page 13: Introduction to asp.net mvc

What are the tenets of ASP.NET

MVC?

Page 14: Introduction to asp.net mvc

Framework Goals

Frictionless Testability

Tight control over <markup>

Leverage the benefits of ASP.NET

Conventions and guidance

Page 15: Introduction to asp.net mvc

Clean URLs

Don’t settle for…

/Products.aspx?CategoryID=123

When you can easily have…

/Product/Puppies

Or whatever else makes sense…

Page 16: Introduction to asp.net mvc

Extensibility

ControllerBuilder

ControllerFactory

Controller

ViewEngine

View

ControllerActionInvoker

ActionResult

ActionFilters

Model Binders

Any of this can be replaced!

Page 17: Introduction to asp.net mvc

MVC Development

Page 18: Introduction to asp.net mvc

Summary

• ASP.NET MVC is a new application option built on top of ASP.NET

• WebForms isn’t being deprecated

• ASP.NET MVC strives to provide strong, frictionless testability

• It places a lot of the control in your hands