Copied to clipboard

Flag this post as spam?

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


  • Graham 4 posts 94 karma points
    Nov 25, 2020 @ 13:53
    Graham
    0

    Hosting and updating Umbraco 8 site Models and Views

    I am an experienced .NET developer and I am developing my first Umbraco site.

    I am using Models Builder API and when I make changes to document types via /umbraco I can regenerate the models in Visual Studio.

    When I update templates in /umbraco these changes are reflected in my Views in Visual Studio, or vice-versa when I update the Views in Visual Studio.

    I will be hosting the site on an existing server (IIS) and I am expecting the initial deployment to be problem free (just upload the published code + database and change some settings).

    However I have not been able work out how I manage the site going forwards with regards the Views/Templates and Models/Document Types.

    For models, should I make changes on the live site and then update my models in Visual Studio using the extension? Or should I do it locally and republish?

    For templates, if changes are made on Live, how do I update the Views on my local machine? Or if I change the Views on my machine, is it just a case of republishing the site to make them live? Should I make this a one way street, and if so should it be always Local => Live or always Live => Local?

    What does everyone else do? Is there any documentation on this?

  • Marc Goodson 2141 posts 14344 karma points MVP 8x c-trib
    Nov 25, 2020 @ 18:30
    Marc Goodson
    100

    Hi Graham

    Theres plenty different ways to do it, but it largely depends on your developer workflow, and how you prefer to work, whether you are using source control and a build server pipeline - or whether you'll need to make dev changes on the live site via a mobile phone etc etc

    But from what you've described so far, it's fair to say you are using Visual Studio and compiling the Models into code, so for ongoing developments, it seems to me it will make sense to continue to work locally whilst you develop new features.

    The trick then comes for how to move things between two different environments in Umbraco, eg if you create a new DocumentType, or add a Property to one, that configuration is stored in the database - and you can't just copy up the database, as that is where the editors are updating content.

    There is a third party plugin to the rescue called uSync!

    https://our.umbraco.com/packages/developer-tools/usync/

    The free version of this writes out to a folder on disk whenever changes are made to the structure of your Umbraco site (not content), these XML files can then committed into git, or just copied up to your live site along with your coding changes, compiled models,

    Then uSync on the live site can 'suck' in the changes from disk and apply your document type changes to your live environment.

    There is also a paid for version of uSync called uSync complete:

    https://our.umbraco.com/packages/developer-tools/usynccomplete/

    That has a wonderful UI that allows you to connect environments together and move changes (and Content) between your local and live environment.

    But generally in answer to your question, people generally either use uSync or build on top of the hosted Umbraco Cloud service, that has a similar mechanism for moving stuff between different environments.

    regards

    marc

  • Graham 4 posts 94 karma points
    Nov 25, 2020 @ 20:01
    Graham
    0

    That's great thanks Marc, uSync sounds like just what I need, and I love that the changes can be tracked in Git too.

Please Sign in or register to post replies

Write your reply to:

Draft