Gray's Matter
Justice Gray - North America's favorite metrosexual software consultant
E-mail Justice
Subscribe to this feed
Subscribe to comments
Perennially Popular Posts
How to write a presentation abstract
My grandmother, globalization, and what's wrong with DateTime.Parse
A letter to my Worldvision sponsor child
Development Methodologies for the 21st Century
My grandmother & the difference between strong typing and weak typing
How I am becoming a better developer, part 1 of infinity
Facebook RSS Feeds: How to Write Your Own With C#
The Ten Keys To Happiness
My grandmother and the Global Assembly Cache (And Star Wars)
My grandmother and the difference between processes and threads
How to make a meeting request
Why you should never be an independent consultant
The DasBlog 1.9 AJAX Autosave True Story, Part 2
Other "metro" developers
Ben Scheirman
Bil Simser
D'Arcy Lussier
David Woods
Donald Belcham
Donald Jessop
George Clingerman
James Kovacs
Jason Hunt
Jason Row
Jean-Paul Boodhoo
Jeffrey Palermo
Joey deVilla
John Bristowe
Jonas Avellana
Kyle Baley
Mack Male
Martin Hinselwood
Michael McClenaghan
Mike Duncan
Mike Friesen
Mo Khan
Otyce
RoboSapient
Russell Ball
Scott Hanselman
Scott Reynolds
Steven Rockarts
Tech Embassy
Terry Thibodeau
Tom Opgenorth
Vladimir Levin
The Justice Gray Fan Club
Amazing Mrs. Loquacious
Dr. Teeth
Facedown
Janey Lynne
Maxime Lamy
Ridley Thunder
Stan Woo
Vanilla Con
Wobbly*Bits
I Wish These People Updated More Than Once a Year
Anand Narayan
Jeff Perrin
<< Phil Haack and the mysterious case of the Phil Haack comments thread
Changes from Microsoft MVC Preview 1 to Preview 2 (Part B) >>
Changes from Microsoft MVC Preview 1 to Preview 2 (Part A)
For those of you who come for the lack of content, the new Captain America will keep you entertained
My apologies in advance for the dryness of this post, but given that some of Codivation's current contracts are using this technology right
now
, I wanted to capture some of this down for reference. Yes, that's right, one of the perks of running your own company is being able to negotiate some control over technical decisions! I know what you're all asking inside, and no, I have no idea why Microsoft hasn't contacted me to do white papers. All of what you can read here can be gleaned from watching
the first part
of
Scott Hanselman's
new screencast series - however watching that screencast will take you sixteen minutes while reading this post will take you
one.
Except, of course, in
D'Arcy's
case where I expect the reading time will be approximately 2 hours before he gives up and asks his class for help.
Here's what *you* need to know thus far about the new
Microsoft MVC Preview 2
:
The "MVC with Test Project" template is gone. In its place, there is now a prompt on the normal MVC project (a la Monorail) that asks if you'd like to set up a test project (yay). The only test project you can set up is keyed to MSTest (booooooooo) but they are hoping to have support for NUnit, xUnit, mbUnit and whomever else wants to play though I would suggest
DUnit
and
JUnit
shouldn't get their hopes up. A scoop from my inside man at MS says that
G-Unit
might still have a chance if we petition
Phil Haack
for it*.
In the previous releases of the MVC, the entirety of the new functionality was located in an updated version of System.Web.Extensions (3.6). However, this has now been removed from Extensions so to make the MVC bin-deployable for people without colliding with the old version of System.Web.Extensions (3.5). In its place are the following three assemblies:
System.Web.Mvc - contains the Mvc namespace stuff
System.Web.Abstractions - contains the IHttpContext (sorry, HttpContextBase or whatnot), IResponse, IRequest, IWhatever
System.Web.Routing - all of the routing logic. The routing logic is now usable in "vanilla" ASP.NET as well!!
Route definitions used to look like this:
"[controller]/[action]/[id]"
and now they look like this:
"{controller}/{action}/{id}"
Truly a breaking change no site will ever recover from!
Controllers no longer have a [ControllerAction] attribute. Any public method on the Controller is available through the web.
However, if you have any *other* public methods on the Controller that you want available for unit testing but do not want to be accessible through the web routing, mark them with a [NoAction] attribute.
Much
more detailed exception messages are available when a controller fails to load, and particularly when a View cannot be found (you'll get a message stating "View cannot be found at the following paths:")
MS MVC can now run in partial trust environments.
Continued tomorrow on related topics but with even less related pictures!
[update: the other three parts in this series can be found by clicking below:
MVC Preview 1 to Preview 2 Part B
MVC Bombshell #1
MVC Bombshell #2
]
* I can't take full credit for that one - it came from a presentation on unit testing that EDMUG's treasurer (Brad Daoust) and I did a couple of years back. I'm only providing this disclaimer so Brad doesn't sue!
Thursday, March 06, 2008
Comments [3]
Technical
|
3/6/2008 5:02:29 AM (Mountain Standard Time, UTC-07:00)
There's only a template for MSTest in the new File | New MVC Project wizard right now because we're reaching out to the big Unit Testing libraries to get them to help create templates. If you have a Unit Testing Library, you can get into the MVC File | New Project dialog by packaging up your templates like this: http://blogs.msdn.com/webdevtools/archive/2008/02/18/asp-net-mvc-test-framework-integration.aspx
I'd guess/hope that the installers for the major libraries would just include their templates in their next versions.
Scott Hanselman
|
scottAT NOSPAMhanselman dot com
3/6/2008 5:37:56 AM (Mountain Standard Time, UTC-07:00)
BTW, we have added MbUnit templates with ASP.Net MVC integration. It's all set up and ready to go!
Grab the latest MbUnit v2 and v3 previews from here: http://code.google.com/p/mb-unit/
Jeff Brown
|
jeff dot brownAT NOSPAMgmail dot com
3/6/2008 6:42:58 AM (Mountain Standard Time, UTC-07:00)
Thanks for the comments guys. I'll make a note of this in part B!
Justice~!
Name
E-mail
Home page
Remember Me
Comment (HTML not allowed)
Enter the code shown (prevents robots):
Justice Gray
: a seething cauldron of rampaging masculinity. A fighter! A brother! Your
secret lover
! He's also a software development consultant and the Vice President of the
Edmonton .NET user group
. He also greatly enjoys speaking about himself in the 3rd person.
Gray's Matter Archives
Recent Posts
No bias to see here
Foreshadowing is over
Foreshadowing, part II
Foreshadowing
Controversy clarifications!
The most controversial interview of ALL TIME
Finally! The *winner* of the "What Justice Gray Means to Me" contest
The mystery of D'Arcy Lussier's ASP.NET MVP is solved...
Well, now that's pretty horrifying
MVPs on MVC: "No, we don't have any idea either"
Why I am happy to not be at the MVP Summit
Post Categories
BookReviews
Conferences
DasBlog
EDMUG
Goals
HanselmanQuestions
HotDeveloperCorner
ILiveToInform
Leadership
Mac
OtherGrayAreas
Personal
Productivity
Ruby
Suresh
Technical
Transformers
Vancouver
Wii
<
August 2008
>
Sun
Mon
Tue
Wed
Thu
Fri
Sat
27
28
29
30
31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
2
3
4
5
6
Sign In