51
Urine for a Treat (or: ASP.NET MVC) Barry Gervin, ObjectSharp and Joey deVilla, Microsoft

Urine for a Treat (or: ASP.NET MVC)

Embed Size (px)

DESCRIPTION

The "ASP.NET MVC" presentation done by Barry Gervin and Joey deVilla for Stack Overflow DevDays Toronto on Friday, October 23rd, 2009.

Citation preview

Page 1: Urine for a Treat (or: ASP.NET MVC)

Urine for a Treat(or: ASP.NET MVC)

Barry Gervin, ObjectSharpand

Joey deVilla, Microsoft

Page 2: Urine for a Treat (or: ASP.NET MVC)
Page 3: Urine for a Treat (or: ASP.NET MVC)
Page 4: Urine for a Treat (or: ASP.NET MVC)

First came ASP…

Page 5: Urine for a Treat (or: ASP.NET MVC)
Page 6: Urine for a Treat (or: ASP.NET MVC)

…then cameASP.NET…

Page 7: Urine for a Treat (or: ASP.NET MVC)
Page 8: Urine for a Treat (or: ASP.NET MVC)

…and now,ASP.NET MVC

Page 9: Urine for a Treat (or: ASP.NET MVC)
Page 10: Urine for a Treat (or: ASP.NET MVC)

Model-View-Controller

Page 11: Urine for a Treat (or: ASP.NET MVC)

ASP.NET MVC’s MVCControllerHandles input(HTTP requests)

ViewVisually representsthe model

Request

View

Controller

Response

ModelDoes the thinkin’and persistence

Page 12: Urine for a Treat (or: ASP.NET MVC)

Routing

Page 13: Urine for a Treat (or: ASP.NET MVC)

mysite.com/object/action/parameter

Page 14: Urine for a Treat (or: ASP.NET MVC)

ConventionOver

Configuration

Page 15: Urine for a Treat (or: ASP.NET MVC)
Page 16: Urine for a Treat (or: ASP.NET MVC)
Page 17: Urine for a Treat (or: ASP.NET MVC)

Testability

Page 18: Urine for a Treat (or: ASP.NET MVC)

Master of Your Domain

Page 19: Urine for a Treat (or: ASP.NET MVC)

ASP.NETtyGoodness

Baked Right In

Page 20: Urine for a Treat (or: ASP.NET MVC)

ASP.NET Runtime

ASP.NET MVC

Page 21: Urine for a Treat (or: ASP.NET MVC)
Page 22: Urine for a Treat (or: ASP.NET MVC)

Microsoft.com/web

Page 23: Urine for a Treat (or: ASP.NET MVC)

Web Platform Installer

Page 24: Urine for a Treat (or: ASP.NET MVC)

RunPee.com (Yes, it’s a real site!)

Page 25: Urine for a Treat (or: ASP.NET MVC)

MovieWhizz

Page 26: Urine for a Treat (or: ASP.NET MVC)
Page 27: Urine for a Treat (or: ASP.NET MVC)

“Classic” ASP.NET vs.ASP.NET MVC

Page 28: Urine for a Treat (or: ASP.NET MVC)

ComparingRuby on Rails

andASP.NET MVC

Page 29: Urine for a Treat (or: ASP.NET MVC)
Page 30: Urine for a Treat (or: ASP.NET MVC)

David Heinemeier Hansson

Page 31: Urine for a Treat (or: ASP.NET MVC)

The “Gang of Foreheads”

Page 32: Urine for a Treat (or: ASP.NET MVC)

Programming Language

ASP.NET• C# or Visual Basic• Compiled• Statically typed• Java-esque syntax• Strongly tied to

Visual Studio IDE

Ruby on Rails• Ruby• Interpreted• Dynamically typed• Smalltalk-y, Perl-y,

Lisp-y syntax• Culturally tied to

TextMate

Page 33: Urine for a Treat (or: ASP.NET MVC)

Design Philosophy

ASP.NET• There really should

be a form of ASP.NET that actually treats the Web like the Web

• “Whatever, man.”• Built as a general

purpose framework for web developers using ASP.NET as a base

Ruby on Rails• There really should be

a Web programming framework that maximizes joy

• “There’s a right way to do things, and it’s this way.”

• Extracted from commonalities in 37Signals projects

Page 34: Urine for a Treat (or: ASP.NET MVC)

Database

ASP.NET• “SQL! Whoooo!”• More exposure to the

database• Typically, you build a

Repository class to act as a go-between for your models and the database

• Traditional database building

Ruby on Rails• “SQL! Ewwww!”• DHH’s opinion is that

the database is just storage

• Database persistence is provided by the model

• Database building through migrations

Page 35: Urine for a Treat (or: ASP.NET MVC)

Out soon: ASP.NET MVC 2

• A good number of new features including:– Client-side validation based on the

model’s validation metadata– Areas to better organize an application–Model validation providers to hook in

alternative validation logic when model binding

–Metadata providers to allow for alternative sources of metadata for model objects

Page 36: Urine for a Treat (or: ASP.NET MVC)

ASP.NET MVC as Seen by a Former Rails Guy, Techincally

• Really fast runtime performance!• Could stand to be a little more

“opinionated”• Coming from the world of ActiveRecord, the

“M” in MVC feels like it should be short for “Missing”

• More lines of code, but Visual Studio’s Intellisense help compensate for that

• Where are my plugins?• Could go either way on the lack of RJS

Page 37: Urine for a Treat (or: ASP.NET MVC)

ASP.NET MVC as Seen by a Former Rails Guy, Culturally

• Yes, this isn’t the first MVC framework, but the world is a better place when people take a good idea and run with it

• Moving from Rails to ASP.NET MVC, I kind of miss that Indie Rock feeling, but I like the Arena Rock opportunities

• “I’m not selling out, I’m buying in!”

Page 38: Urine for a Treat (or: ASP.NET MVC)

Resources

Page 39: Urine for a Treat (or: ASP.NET MVC)

NerdDinner (nerddinner.com)

Page 40: Urine for a Treat (or: ASP.NET MVC)

Professional ASP.NET MVC 1.0,a.k.a. The “Gang of Foreheads” Book

Page 41: Urine for a Treat (or: ASP.NET MVC)

ASP.NET MVC in Action(Follow @ManningBooks on

Twitter)

Page 42: Urine for a Treat (or: ASP.NET MVC)

Pro ASP.NET MVC Framework(Highest rating on

Amazon.com)

Page 43: Urine for a Treat (or: ASP.NET MVC)

The Official ASP.NET MVC SiteASP.NET/MVC

Page 44: Urine for a Treat (or: ASP.NET MVC)

You’ve Been Haacked (Phil Haack)

Haacked.com

Page 45: Urine for a Treat (or: ASP.NET MVC)

Scott Hanselman’s BlogHanselman.com

Page 46: Urine for a Treat (or: ASP.NET MVC)

ASP.NET MVC aggregator siteASPDotNetMVC.com

Page 47: Urine for a Treat (or: ASP.NET MVC)

This site will pull downthe pants of your mind

Page 48: Urine for a Treat (or: ASP.NET MVC)

ObjectSharpObjectSharp.com

Page 49: Urine for a Treat (or: ASP.NET MVC)

Canadian Developer Connection

blogs.msdn.com/cdndevs

Page 50: Urine for a Treat (or: ASP.NET MVC)

Global NerdyGlobalNerdy.com

Page 51: Urine for a Treat (or: ASP.NET MVC)

Thank You