Copied to clipboard

Flag this post as spam?

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


  • Paul 2 posts 73 karma points
    Jan 26, 2018 @ 16:37
    Paul
    1

    Project Structure - Decoupling Back Office Site From User Facing Site

    I'm currently working on integrating Umbraco into an existing site. One of the things I'm struggling with the the best way to structure my project(s). Ideally, I'd like to have one project that represents the website and another specifically for the Umbraco back office.

    I'm also interested to see how people have structured their existing sites around Umbraco, as I would like to keep my non-Umbraco portions of the website separate from the Umbraco generated views and such. The easiest way I can think of to do this would be to create a separate area for the non-umbraco code, but I'd much rather have all of the Umbraco code in it's own project/area.

    Has anyone dealt with this before, and if so, do you have an examples/advice for me?

    Thanks

  • Paul 2 posts 73 karma points
    Jan 29, 2018 @ 17:07
    Paul
    0

    This is my first post and it just got approved, so I'm going to bump it.

  • Steve Morgan 1348 posts 4457 karma points c-trib
    Jan 30, 2018 @ 09:15
    Steve Morgan
    0

    Hi,

    Most solutions I create and come across do this - all with slight differences so I'm not sure there is a definitive best practice.

    The general approach is to create a visual studio solution. Name the project that Umbraco is going to sit in something like MyProject.Web. Install Umbraco via nuget as usual. Then create (an) additional C#.net class project(s) for your custom code - either one for all or multiple e.g. one for .Models .Services .Repos etc etc (add to flavour).

    In these Nuget in Umbraco.Core then in your Umbraco .Web project add a reference to these and all is well. Make sure you set the .Web as the start up project too.

    You can get some issues with the Models builder if your models don't sit in the Umbraco solution but this can be fixed by changing the output of your Models Builder to a separate project and then having them references by the .Web and .Models.

    HTH

    Steve

Please Sign in or register to post replies

Write your reply to:

Draft