Re:ASP.NET MVC 3 Preview 1 - Razor View Engine
by michalmarko on Saturday August 28, 2010 @07:57AM
(#1641642)
the new Dynamic View and ViewModel properties is a great addition to mvc3
[ Parent
| on HN ]
Re:ASP.NET MVC 3 Preview 1 - Razor View Engine
by traskjd on Saturday August 28, 2010 @08:33AM
(#1641679)
Why? In particular Dynamic view models? What is the benefit of adding this third way of expressing your view model objects?
Re:ASP.NET MVC 3 Preview 1 - Razor View Engine
by gokhan on Saturday August 28, 2010 @11:40AM
(#1641839)
Clearer syntax. No need to define another ViewModel object for each page. Ability to refactor. Getting rid of naming the param as text.
ViewModel["Something"] = "Other";
vs
ViewModel.Something = "Other";
The best use case for dynamic IMO.
Re:ASP.NET MVC 3 Preview 1 - Razor View Engine
by vyrotek on Saturday August 28, 2010 @11:58AM
(#1641857)
While I think this is a neat use of dynamic, I think I'm still going to stick with my strongly typed models.
More specifically, I really like the 'ViewModel' technique. I won't give up my Intellisense and Compile Time validation anytime soon.