CodeGarden 2013

Getting the most out of Razor

1,705 views
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
Add a comment...
Post as (log out)