Visual Studio Solution Architecture for developing a package?
A typical way I'd develop a site is by having my MVC project separate to an Umbraco website within my solution. I then have build events that copy the MVC built dll into the Umbraco bin directory.
I really like this way of working but now I'm looking to have a bash at writing some packages and want to see how other people architect their solutions. I was thinking to take a similar approach where I have my web(MVC project) alongside a package(MVC) project that when built both copy their respective dll's into the Umbraco bin directory.
In addition to the package dll I would also look to copy across all associated package manifest and all appropriate resources to the App_Plugins folder.
Does this sound right? How do other people do this?
In order to make testing easy, I included a web project with Umbraco installed using NuGet. That way, I don't have to include most of the files, and people get a full Umbraco install by building the solution (thanks to NuGet package restore).
Note that I currently have two solution files (one for the plugin, and one for the test website). I realize I could have gone with one, but I wanted to be sure to fully isolate them so I don't end up with (for example), and unintentional reference between the two of them. I did this both for myself and the hypothetical maintainers years down the road.
By the way, that GitHub repo above isn't really a package yet. I'm just using it as a testbed to flesh out the architecture of the package I intend on building.
For that, you'd probably just have to add the other project to the same solution as the website (and then reference the project rather than the built assembly). If there is just one project, that is easy. If there are multiple, that can be a pain.
Visual Studio Solution Architecture for developing a package?
A typical way I'd develop a site is by having my MVC project separate to an Umbraco website within my solution. I then have build events that copy the MVC built dll into the Umbraco bin directory.
I really like this way of working but now I'm looking to have a bash at writing some packages and want to see how other people architect their solutions. I was thinking to take a similar approach where I have my web(MVC project) alongside a package(MVC) project that when built both copy their respective dll's into the Umbraco bin directory.
In addition to the package dll I would also look to copy across all associated package manifest and all appropriate resources to the App_Plugins folder.
Does this sound right? How do other people do this?
I am testing a technique that copies files using a grunt task: https://github.com/Nicholas-Westby/uformsia/blob/master/gruntfile.js
In case somebody comes across this thread in the future and that file has changed, here are the contents:
If one were so inclined, one could create a watcher that automatically copies files when they are changed.
IIRC, I got the idea for this from Archetype, which is doing all kinds of neat stuff in the gruntfile.js: https://github.com/imulus/Archetype/blob/master/Gruntfile.js
In order to make testing easy, I included a web project with Umbraco installed using NuGet. That way, I don't have to include most of the files, and people get a full Umbraco install by building the solution (thanks to NuGet package restore).
Note that I currently have two solution files (one for the plugin, and one for the test website). I realize I could have gone with one, but I wanted to be sure to fully isolate them so I don't end up with (for example), and unintentional reference between the two of them. I did this both for myself and the hypothetical maintainers years down the road.
By the way, that GitHub repo above isn't really a package yet. I'm just using it as a testbed to flesh out the architecture of the package I intend on building.
Hello and thank you for your insight on the matter, I have been trying to figure out the best setup and workflow too.
What I can't figure though is how do you debug your code and hit breakpoints with 2 solutions?
Good point.
For that, you'd probably just have to add the other project to the same solution as the website (and then reference the project rather than the built assembly). If there is just one project, that is easy. If there are multiple, that can be a pain.
That's unfortunate as I really really like your approach, it's just much more elegant! Oh well one can't have it all I guess
Thanks Nicholas,
I'll take a look.
In the mean-time I managed to get something working within VS2013 with build events (xcopy).
Some updates?
VS Solution with
On build I have build events that get fired copying all relevant .dlls and view files into the Umbraco website project.
Never got around to checking our the Grunt solution.
MVC Project? Not Class Project?
Wow, this is on old thread!
MVC for Models, Services, Controllers and ViewModels.
The presentation stuff (actual Views) still stay within the Umbraco Website
is working on a reply...