Copied to clipboard

Flag this post as spam?

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


  • bh 408 posts 1395 karma points
    Nov 01, 2018 @ 13:28
    bh
    0

    Umbraco in Visual Studio ?

    I'm starting a new Umbraco project. I've got 6 Umbraco projects in production to date. In all 6 of those projects I've downloaded the latest version of Umbraco installed it on my webserver and edited my server side code in the template/partial views in the Umbraco editor, and edited my css and js in notepad ++.

    From talking to folks at the US Conference and on this forum, seems like the majority of Umbraco users develop Umbraco locally using Visual Studio and installing from npm. If that's you can you tell me why? What's the advantage of developing Umbraco in VS?

  • Nik 1593 posts 7151 karma points MVP 6x c-trib
    Nov 01, 2018 @ 14:00
    Nik
    100

    Hi bh,

    I guess it depends to be honest. What does it depend on? Well that's where it's a bit situational but here are some common reasons for using Visual Studio.

    1. Visual studio allows you to debug custom code by stepping through, this includes stepping through code in your razor template files (cshtml).

    2. Visual studio gives you intelli-sense. This can be a pro and a con as it can make you "lazy" but at the same time it can allow you to find function overrides you didn't know existed, highlight when you are using obsolete methods that might be removed and other things.

    3. Installing Umbraco via Nuget generally makes upgrading a bit easier

    4. Custom code can be separated form your website project into an individual DLL. This can improve testing, but also means you can deploy compiled code. This saves ASP.Net (IIS) having to compile code on the fly by having class files in an app_code folder in the website.

    From my point of view, these reasons all result in a cleaner more robust development process but it is personal opinion based. However if you are writing a lot of custom c# code I do highly recommend using Visual Studio.

    I'm sure others here can provide additional reasons :-)

    Nik

  • Dan Diplo 1554 posts 6205 karma points MVP 5x c-trib
    Nov 01, 2018 @ 15:15
    Dan Diplo
    1

    One obvious advantage (apart from those mentioned) is that you are not editing files directly on the server. What do you do when your site is "live" and being used? Do you really edit files directly there, where a single typo could bring it all down?

    Running Umbraco locally allows you to develop in isolation of your production site as VS has its own local version of IIS web-server. Developing locally also means you can place your code in source-control, which is essential for modern development as it allows you to easily revert changes and track what has changed.

    Installing Umbraco from NuGet allows you to manage dependencies easier in the long run. You can upgrade Umbraco with a few clicks this way. You can also install many popular 3rd party packages via NuGet.

Please Sign in or register to post replies

Write your reply to:

Draft