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?
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.
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
This is my first post and it just got approved, so I'm going to bump it.
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
is working on a reply...