With the near-release of ASP.NET MVC 3
, I've been looking at the new Razor view engine
. It's quite nicely done and removes the constant "context switching" between code and layout.
In my web site, I used Scott Hanselman's auto-detecting view engine
, and it has served me extremely well. However, with the relentless march of technology releases, a couple things should be pointed out:
- If you want to use Razor on the mobile side, you just need to inherit his original class from
RazorViewEngine instead of
WebFormViewEngine. (Obviously you should probably do this in a new class, or else the original class name of MobileCapabeWebFormViewEngine will not exactly match up to what the class actually does).
- The original Mobile Device Browser File project has disbanded. Very sad news, as this was a nice project that kept on top of new smart phones as they were released. It looks like 51 degrees has stepped up to give us an alternative. I opened up an issue to request providing this as a NuGet package. I'll definitely sign up to take this task on if it gains traction, and they want the help.