Copied to clipboard

Flag this post as spam?

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


  • Scott 95 posts 277 karma points
    May 21, 2013 @ 19:08
    Scott
    0

    Razor vs. XSLT

    Hey everybody,

    I have been wondering which technology is best at what times and why, are there any of you who have information about this?

    Regards,

  • Chriztian Steinmeier 2800 posts 8791 karma points MVP 8x admin c-trib
    May 21, 2013 @ 22:54
    Chriztian Steinmeier
    3

    Hi Scott,

    If you're used to .NET and Visual Studio, it makes perfect sense to go ahead with Razor - you should be able to get Intellisense and all that jazz VS-people are used to.

    One potential danger area is that with Razor, you have access to all of the C# "goodies", and it can be a hard discipline to keep advanced logic out of your views - with XSLT it's not at all easy to introduce a lot of logic, so you tend to create the correct helper extensions etc.

    I've been using XSLT for so many years that when I found Umbraco it was a natural fit for me - I only do frontend; never touch backend code, and I work in OS X on a Mac which of course keeps me out of VS :-)

    I know Umbraco has switched the courses from XSLT to Razor because they saw a much better pickup curve with that... and agreed, XSLT is hard to grasp at first - on the other hand, when you "get" it, it's such a nice way to handle the Umbraco XML for many types of output.

    What's your background? Are you a frontend developer?

    /Chriztian 

  • Scott 95 posts 277 karma points
    May 22, 2013 @ 18:15
    Scott
    0

    Hi Chriztian,

    Thanks for your reply.

    I regularly use VS and think that Razor is great really but for some tasks I think it's too complicated I don't know if I have just not explored it sufficiently. For xslt I have built various extensions and also have my helper classes.

    Of course there are things in xslt which are also easier to do in Razor.

    We are developing both frontends as well as backends but we do more frontends.

    What about yourself?

    Again thank you for your reply.

    Scott

  • Chriztian Steinmeier 2800 posts 8791 karma points MVP 8x admin c-trib
    May 22, 2013 @ 18:54
    Chriztian Steinmeier
    0

    Hi Scott,

    Great points — sounds like you already have a firm grasp of the differences.

    As I already stated, I'm a frontend developer - I have a pretty solid system using XML & XSLT at the prototype level, so I dive right into XSLT from the very start (working locally on the Mac), so by the time I get to implementing in Umbraco I already have 85% of the macros written. I could write them in Razor, but I would lose the ability to render locally and solely would have to rely on deploying to a server for testing even the simplest things... no-go for me :)

    /Chriztian

  • Scott 95 posts 277 karma points
    May 22, 2013 @ 20:36
    Scott
    0

    Ouch, I missed the only do frontend piece, sorry.

    Is there no engine what-so-ever for mac to run razor scripts? Like a local web server or equal?

     

    S

Please Sign in or register to post replies

Write your reply to:

Draft