Hacker News new | past | comments | ask | show | jobs | submit login

the new Dynamic View and ViewModel properties is a great addition to mvc3



Why? In particular Dynamic view models? What is the benefit of adding this third way of expressing your view model objects?


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.


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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: