Visual Studio - Setting up a separate project for MVC custom code in solution
Hi,
When I build Umbraco v7 sites I just create the MVC Models, Views, Controllers folders, store any custom classes under App_Code and put custom angular bits under the App_Plugins. This seems to be how it's done in the videos.. though I'd happily take any feedback here.
This works well but Visual Studio 2013 runs a like a dog. I've seen some people create separate projects to hold their custom code under a solution - from Googling you create a MyProject.site and nuget Umbraco into it and then create a separate project for your custom code.
All seems straight forward except I'm missing some Visual Studio referencing magic (and/ or build events?) at this point to make this build and work. I can easily add a reference in the Umbraco project to the custom one but how do I add the reference to the necessary Umbraco files so that I can write my custom code with intellisense goodness - can I just add Model, Views (with a Partials sub dir?) .. etc folders in this?
Are there any special build and deployment considerations with this approach?
Is this Hybrid Framework the way you would recommend doing new development in Umbraco v7?
Steve, like you I have heard people refer to having 2 projects for Umbraco to keep the "custom code" separate. What did you decide to do? Any insights you have would be greatly appreciated as I am working in Umbraco for the first time on the current project I am working on.
At cogworks we have separate projects, if starting out I highly recommend hybrid jeoren and Jeavon know what they are doing and have out together really nice solution in hybrid.
No - I kept it in one project. Unless I'm debugging I just keep running the site without debugging enabled (ctrl + F5) and it's swift. I also had an issue in visual studio which seemed to cause it to slow down - nothing to do with the Umbraco project.
I feel like there is definitely a lot of scope of doing things better though. Waiting for a wet weekend to have a proper look at the Hybrid framework - I usually like to keep things vanilla though to avoid barriers in upgrades.
Visual Studio - Setting up a separate project for MVC custom code in solution
Hi,
When I build Umbraco v7 sites I just create the MVC Models, Views, Controllers folders, store any custom classes under App_Code and put custom angular bits under the App_Plugins. This seems to be how it's done in the videos.. though I'd happily take any feedback here.
This works well but Visual Studio 2013 runs a like a dog. I've seen some people create separate projects to hold their custom code under a solution - from Googling you create a MyProject.site and nuget Umbraco into it and then create a separate project for your custom code.
All seems straight forward except I'm missing some Visual Studio referencing magic (and/ or build events?) at this point to make this build and work. I can easily add a reference in the Umbraco project to the custom one but how do I add the reference to the necessary Umbraco files so that I can write my custom code with intellisense goodness - can I just add Model, Views (with a Partials sub dir?) .. etc folders in this?
Are there any special build and deployment considerations with this approach?
Steve,
Take a look at http://our.umbraco.org/projects/developer-tools/hybrid-framework some really good pointers on best way to work with umbraco and mvc.
Regards
Ismail
Ismail,
Is this Hybrid Framework the way you would recommend doing new development in Umbraco v7?
Steve, like you I have heard people refer to having 2 projects for Umbraco to keep the "custom code" separate. What did you decide to do? Any insights you have would be greatly appreciated as I am working in Umbraco for the first time on the current project I am working on.
Thanks,
Paul
Paul,
At cogworks we have separate projects, if starting out I highly recommend hybrid jeoren and Jeavon know what they are doing and have out together really nice solution in hybrid.
Regards
Ismail
Hi Paul,
No - I kept it in one project. Unless I'm debugging I just keep running the site without debugging enabled (ctrl + F5) and it's swift. I also had an issue in visual studio which seemed to cause it to slow down - nothing to do with the Umbraco project.
I feel like there is definitely a lot of scope of doing things better though. Waiting for a wet weekend to have a proper look at the Hybrid framework - I usually like to keep things vanilla though to avoid barriers in upgrades.
HTH
Steve
is working on a reply...