Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Peter 2 posts 22 karma points
    Oct 12, 2012 @ 13:00
    Peter
    0

    State and limitations of Razor in Umbraco?

    Hi,

    I've just recently started using umbraco and i'm wondering what the state of Razor is in Umbraco. I noticed that the starter kits use XSLT and which got me wondering, is this because Razor is not a first class citizen in Umbraco or is developer preference or just because XSLT was there first.

    Secondly, are there any limitations in capabilities of Razor compared to using XSLT in Umbraco (or .net user controls)?

  • SC Digital Services Team 104 posts 171 karma points
    Oct 12, 2012 @ 17:32
    SC Digital Services Team
    0

    We have been exclusively using Razor on our site (http://new.shropshire.gov.uk - originally built in v5.x, and recently rebuilt in 4.9), and so far have not come across any issues or limitations. If anything, it's been easier for us to work this way!

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Oct 12, 2012 @ 17:57
    Tom Fulton
    0

    Hi Peter,

    As far as I know, Razor is what Umbraco is pushing going forward.  The Starter Kits were written before Razor existed and were probably just never updated.  Tim has updated his Creative Website Starter if you're looking for some examples, also Cultiv RazorExamples and the Razor Cheat Sheet.

    I think there will also be some changes to Razor in 4.10, though I don't know the exact details.

    I don't think there are any noteable limitations in Razor capabilities.  There can be performance issues depending on how you use it, though [1] [2] [3] [4].  It also can have a high learning curve when trying to figure out how to do certain things (working with dynamic node, type casting, etc), but you can usually find an answer in the Cheat Sheet or a forum post.

    Worth nothing that uCommerce posted a poll recently and the split was abouyt 75%/25% Razor vs XSLT.  Despite this, I think a lot of people are still using XSLT because of familiarity and performance.  XSLT won't be going away if that's what you prefer to use.

    Hope this helps,
    Tom

Please Sign in or register to post replies

Write your reply to:

Draft