ASP.NET MVC 3 Preview 1 - Razor View Engine
dotnetcurry.com
dotnetcurry.com
http://weblogs.asp.net/scottgu/archive/2010/07/02/introducin...
A fresh start was needed, and it looks great.
It'll be interesting to see how they incorporate unit testing.
The MVC pattern is already a lot more unit-testable than most, since the view is separated from the rest, and data (viewModel) and processing (controller) can be tested without the view.
From that article: "Unit Testable: The new view engine implementation will support the ability to unit test views (without requiring a controller or web-server, and can be hosted in any unit test project – no special app-domain required)."
I was wondering how that would work, since as you said, they're notoriously hard to test.
I had to wrestle with this just last week, it was a major pain in the ass to work around this limitation.
It seems like, among the leading-edge developers, this kind of tempting is rapidly being eschewed by newer techniques.
The correction is, of ourselves, "this kind of templating is being eschewed by other, newer techniques." Enlive by cgrand is the example I like to mention.
ViewModel["Something"] = "Other";
vs
ViewModel.Something = "Other";
The best use case for dynamic IMO.
More specifically, I really like the 'ViewModel' technique. I won't give up my Intellisense and Compile Time validation anytime soon.