Copied to clipboard

Flag this post as spam?

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


  • Andrew Hawken 59 posts 116 karma points c-trib
    Sep 10, 2015 @ 11:09
    Andrew Hawken
    0

    Umbraco Development Workflow

    As a relative Umbraco newbie I'm struggling with Umbraco development workflow and I'd really like some pointers.

    Here's what I'm trying to do and the friction points...

    I create a new project in VS2013 and create a web project, nuget in umbraco and press go. This builds me a site, with the SQL in App_Data.

    I fiddle around with this site - maybe make some changes catching backend events (in visual studio), and setup some templates and css and document types (in umbraco and maybe VS. as the code editor is better). Great. All working locally.

    Lets do a git commit. No idea what a decent .gitignore is for this, so I probably commit a load of things I shouldn't. (is there a standard one?)

    Now I want to publish to an Azure web app. So I script the current database and setup one on Azure and fire the structure / data into that. That's data taken care of. I setup an Azure app and publish into that. I've muddled through that by adding a load of folders into the project in order that they get published. That was a mess, but somehow (after I use the Azure portal to set the connection string.) I've got a working site.

    Great. But now I'm confused. How do people go about making changes to code and templates. If I make changes to templates on my published site, then they are just made "live" with no hope of source code control. If I make them locally, then how do I publish those?

    I'm sure there is a tried and tested workflow - some best practices for this, if someone could point me in the right direction?

  • Zack 12 posts 112 karma points
    Sep 10, 2015 @ 12:14
    Zack
    0

    While using VS2013 this tutorial should assist you with the basic's of creating, editing, marcos, partial views

    https://www.youtube.com/watch?v=Z5hKnDI0NIw&list=PLLYO0Qmbv5pvGjpI6Cyg3mVBoYtG_LK63

  • Andrew Hawken 59 posts 116 karma points c-trib
    Sep 10, 2015 @ 12:50
    Andrew Hawken
    0

    Thanks

    I've just watched that first video and I'll work through the others as they look very useful (and that first one does just say to include all-the-things into VS).

    However, the coding I seem to be able to understand, its the source code control and publication workflow I'm more worried about at this stage. (Maybe more videos will reveal some of that)

  • James 251 posts 1169 karma points
    Sep 10, 2015 @ 13:48
    James
    0

    Hello,

    It depends entirely on the changes you are making and whether they affect only the views/ templates/ dlls or whether they affect the database too (Doc types).

    You should make any development changes on your local copy and check them in/ commit them to source control.

    Once you are ready to publish to live, you can use Visual studio and right click your project + publish. It will automatically recognize what you have published already on Azure and only publish changes.

    This works OK if all you are changing is templates + dlls.

    If you are making changes to the database i'd recommend putting a content publishing freeze on your site (with the client). Pulling down the latest DB and making the changes there, then re-scripting it back up to Azure.

    It can be an arduous process but your only other option is tools like : uSync or Redgate SQL Source Control.

    It's important to just keep all your environments synced up. But unless you have one of the above tools in place, you're going to be pulling your live DB down to your local environment a lot :).

    You can also release development as packages (package up the stuff you have done in the back end and install the package on live). Bit of an odd way of doing things but it can be useful in certain circumstances.

    Hope this helps.

    J

  • Alex Skrypnyk 6132 posts 23951 karma points MVP 7x admin c-trib
    Sep 11, 2015 @ 12:16
    Alex Skrypnyk
    0

    James, Thanks, Great suggestions we are using the same instruments.

    Can you tell something about Redgate SQL Source Control ?? I didn't use it, is it good for Umbraco ?

    Thanks, Alex

  • Alex Skrypnyk 6132 posts 23951 karma points MVP 7x admin c-trib
    Sep 11, 2015 @ 12:13
    Alex Skrypnyk
    0

    Hi Andrew,

    Welcome to Umbraco community.

    Let's talk about your questions .

    1) Great. But now I'm confused. How do people go about making changes to code and templates. If I make changes to templates on my published site, then they are just made "live" with no hope of source code control. If I make them locally, then how do I publish those?

    We don't do any changes on the live environment. This is really problematic to do changes on the 'live' and deploy then. You can close access for live users yo template section as solution.

    2) Save Database to the disk and upload it to the git isn't perfect solution. It's better to use SQL server for dev and 'live' environment.

    Merging data between servers very convenient to do with uSync.

    Thanks, Alex

  • Andy Butland 422 posts 2334 karma points MVP 4x hq c-trib
    Sep 13, 2015 @ 21:10
    Andy Butland
    0

    Just to add I saw from the discussion here, there's a Gitignore sample here.

    Andy

  • Andrew Hawken 59 posts 116 karma points c-trib
    Sep 14, 2015 @ 09:50
    Andrew Hawken
    0

    Thanks to all of the above. So in summary

    1. Make all template changes locally. Template and Macro changes are not database dependent and can be published safely.
    2. Make all document changes locally after declaring a content freeze. Make changes and republish.
    3. Make content changes only on the live site.
    4. Tools such as Redgate Data Compare and Source Code Control will help the data migration.
    5. uSync is also recommended for data migration. (Courier 2 as well)
    6. There is a sample .gitignore which needs to be added to your standard VS one.

    Is there a definitive list of folders / files that should or should not be published?

  • Alex Skrypnyk 6132 posts 23951 karma points MVP 7x admin c-trib
    Sep 14, 2015 @ 09:58
    Alex Skrypnyk
    0

    Hi Andrew,

    Yes you are right. One more remark.

    1. Umbraco has uSync ContentEdition for syncing content.

    2. Macro's changes need to be migrated to live enronment too.

    Thanks, Alex

Please Sign in or register to post replies

Write your reply to:

Draft