Copied to clipboard

Flag this post as spam?

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


  • Owain Williams 481 posts 1413 karma points MVP 7x c-trib
    Aug 01, 2016 @ 16:18
    Owain Williams
    0

    Move from compiled solution to source code

    Hi I thought I had posted something like this in the past but I can't find it.

    I currently have umbraco 7.4.2 installed and running on my live site but I want to move from the compiled version of Umbraco to the source version just so I can learn more about Umbraco, MVC, and look at building my own packages and extending Umbraco.

    How would I go about moving from compiled to source.

    I'm guessing initially download the source of 7.4.2, download my production database, run visual studio and point the installer at my database but what do I do about all the packages I have installed? Can I just download them in the plugin folder and we should be up and running or have a missed something?

    Cheers.

  • David Peck 690 posts 1896 karma points c-trib
    Aug 01, 2016 @ 16:46
    David Peck
    0

    You might as well start here: https://github.com/umbraco/UmbracoDocs

    This sounds like a bad idea to me though. It's going to make it harder to upgrade, use nuget and generally make things more complicated.

  • Owain Williams 481 posts 1413 karma points MVP 7x c-trib
    Aug 01, 2016 @ 20:30
    Owain Williams
    0

    What would you suggest then to get back to source code from a pre-compiled setup?

    Use nuget and rebuild the site from the bottom up?

  • Owain Williams 481 posts 1413 karma points MVP 7x c-trib
    Aug 03, 2016 @ 09:28
    Owain Williams
    0

    I can't be the first person to decide to move from a precompiled setup to source code. Am I?

    How did others successful migrate all their data / templates / plugins to the source version?

  • David Brendel 792 posts 2970 karma points MVP 3x c-trib
    Aug 03, 2016 @ 14:29
    David Brendel
    0

    Hi Owain,

    I don't think that anybody is using the source of umbraco to build their own site. This sounds like a bad idea for me.

    When you want to get familiar with the source then download it and have a look.

    But running an actual site with the source feels more than wrong and I don't have one good point in mind why you should do that.

    Regards David

  • Owain Williams 481 posts 1413 karma points MVP 7x c-trib
    Aug 03, 2016 @ 14:33
    Owain Williams
    0

    Thanks. It was so I could develop my own site, build new features etc. Work with the MVC site of Umbraco rather than just what is compiled and uploaded to my webspace.

    I could then keep it in source control as well.

    Once I was ready to deploy, I would compile the project and upload.

  • David Brendel 792 posts 2970 karma points MVP 3x c-trib
    Aug 03, 2016 @ 14:43
    David Brendel
    0

    For umbraco features I would work with the source and them doing some pull request.

    If its about features for the Website then you should use the extension points that Umbraco offers and there are plenty. Even for packages you wouldn't work with the source itself.

    Not quite sure what you mean with mvc site as you can create controllers and using mvc by inheriting from the controllers umbraco provides.

  • Owain Williams 481 posts 1413 karma points MVP 7x c-trib
    Aug 03, 2016 @ 15:10
    Owain Williams
    0

    By the sounds of things I need to read some more of the documentation to make sure I am doing things correctly!

    In short - I want to be able to code my own packages and extend umbraco. Where do I start? :)

  • Nik 1614 posts 7260 karma points MVP 7x c-trib
    Aug 03, 2016 @ 16:43
    Nik
    0

    Hi Owain,

    As others have said, you don't need to build your sites using the Umbraco source. It would be detrimental to most (if not all) websites you were to make.

    Umbraco is fully extensible and that is one of the major selling points of it. I would start by looking at surface controllers, api controllers and the other various elements.

    As for building packages, again this shouldn't depend on anything in the Umbraco source. There are different approaches for making packages, one of the simplest involves using the built in package creator in the back office. That can export document types, templates etc into an Umbraco package. Alternatively, there is a huge number of blogs talking about creating more complex packages from some great members of the community.

    You're question of where to start, I recommend starting with a specific idea ;-)

    If you can implement that idea in a clean site, then you should be able to package it up.

  • Amir Khan 1287 posts 2744 karma points
    Aug 03, 2016 @ 17:18
    Amir Khan
    0

    Hi Owain,

    Have you taken a look at how accessing content created in Umbraco works or tried installing a starter kit / packages with custom backoffice areas? I think the issue here is just a misunderstanding of how Umbraco works / what the best ways to interact with its data are.

    If you want to create a custom backoffice section, for example, you could do it all in angular without touching the core. Generally, you won't need to touch the core of Umbraco for anything since its built to allow access to essentially every part of it via APIs. We have maybe one or two legacy sites out there where we did modify the Umbraco core in a pinch, but its always resulted in maintenance headaches.

    -Amir

  • Owain Williams 481 posts 1413 karma points MVP 7x c-trib
    Aug 04, 2016 @ 10:00
    Owain Williams
    0

    Thanks everyone - I'll get my thinking hat on and think of a basic idea to try and build and go from there. I welcome any suggestions :)

    I'll take on all the comments and get reading up about the different options and have a play around with the API.

    I guess my confusion comes from when I use Nuget to download Umbraco in to Visual Studio I get the Model folder, View folder and Controller folders which I am used to but on my live site which I installed via the zip file, I don't have these folder available to me so do I have two different versions to work with or if I download my live site, can I still use MVC or again, am I misunderstanding how to use Umbraco?

  • Steve Morgan 1349 posts 4458 karma points c-trib
    Aug 04, 2016 @ 12:55
    Steve Morgan
    100

    Hi Owain,

    I think your post title has confused a few people here. When you say compiled solution you mean you've deployed and configured Umbraco from the downloadable zip rather than nugetting down Umbraco and compiling your own solution in Visual Studio.

    There are three "levels" of how to use Umbraco..

    • Use the zip - simple sites that only require templates, partial macro views etc (I think you did this)
      • Using Visual studio and nugetting down and creating a solution so you can compile Surface and Custom controllers with and debug etc but not touch the core Umbraco code (I think this is what you want to do)
      • Go to the Umbraco source and dabble.. (here be dragons!)

    No-one would do option 3 to build a site (unless they are hacking core) but that is what all the answers have assumed you're trying to from your post title!

    I think what you want to do is move a site that you started by method 1 and have the goodness of Visual studio to create custom MVC goodness - right?

    In that case.. I've done this a few times before the process (from my memory..) nuget down Umbraco into a new solution (match the Umbraco version you've used - ask if you're not sure how to get a specific version or upgrade your "live" site first) . Build it and let the installer run on a dummy SQL db that you can delete later. Stop the website / debugger.

    Copy and restore your live db and copy your files down over the top of the Visual studio solution (most importantly the Views, media, Appplugins folders (not the bin, Umbraco or UmbracoClient folder) then change the db connection string in the web.config to point to your locally restored DB copy. You should probably delete the Appdata/umbraco.config and everything in Appdata/Cache and /TEMP to get it to rebuild the cache and indexes correctly when it starts up.

    If you've installed any packages you might need to nuget them down or hack the dlls into the bin.

    It's perfectly do-able though.

    Steve

  • Owain Williams 481 posts 1413 karma points MVP 7x c-trib
    Aug 04, 2016 @ 13:02
    Owain Williams
    0

    Thanks Steve, you are spot on with your assumptions. I have done method 1 and want to do method 2.

    I'll try your steps and hopefully that will get me on the right track :)

Please Sign in or register to post replies

Write your reply to:

Draft