CodeGarden 2013

Getting the most out of Razor

February 07, 2014
How to get the most out of Razor, showing both good practices for larger maintainable sites as well as useful "keep it simple and smile" examples (primarily aimed for smaller sites)
  • Razor as an efficient and flexible pure view engine
  • Razor as an all-purpose server scripting language
Razor as a pure view engine language
I talk about the way Razor is/should be used in MVC views.
  • The "V" in MVC - Separation of concerns, no logic other than view logic
  • DRY your views
Razor as a scripting language
I talk about how it is possible to use Razor as an all-purpose server side coding language
  • Run pure C# code in Razor scripts
  • Create your own base class for your Razor scripts
  • Share code cross scripts
  • Use Razor as an api for ajax calls
  • Structure scripts
  • Visualize scripts in Umbraco
  • Testing Razor, "approval tests"

Rate this video

1 star 2 star 3 star 4 star 5 star
isabella dominic March 21, 2019 10:23 AM Delete

Thank you so much for informing more and more details of the razor. The one hour video is making the details more clear. It is more easy for me to understand things computer running slow . The razor is good to use as a server-side scripting language.

Tom September 21, 2018 10:00 AM Delete

The article is very nice as well as very informative. i have known very important over here i want to thank you for this informative read download dvd player windows 10 just come my website download for dvd player windows 10 is 4 best quality and mp4 2k full hd and blue re print choice you print and watching for video thanks for it.

Add a comment...
Post as (log out)