This project is read-only.

On the quest for a cleaner Orchard development experience - how to do it tidily?

Topics: Announcements, Core, Writing modules, Writing themes
Oct 25, 2014 at 11:03 PM
You can see my Tidy Orchard Development Tookit demo on last week's Community Meeting: it's demonstrates an experimental Orchard development environment where your own stuff (modules, themes, configs, the solution file) is completely separated from the rest of the Orchard source (that sits in a subfolder).

This is not only cleaner (in the sense that your own code files are not mixed with Orchard's) but it also allows you better source control for your own modules and themes (since e.g. all your modules can be in a single repository; having multiple modules in a single repo is not something that is easily done today). Furthermore updating Orchard is trivial (just overwrite its folder, or if you pull from the central repo, just pull in the changes) and you could even have a single, central location on your computer to store the Orchard source and then use it from multiple projects (sparing you storage space and build time).

What is today in Tidy Orchard Development Toolkit mostly works but is tedious to set up initially and in no way a production-ready solution. But it tackles the important question of our development story, what, in my opinion, has room for improvement. Being able to completely separate your files from Orchard's would be an aspect to make this development story better.

What do you think? Is this a direction worth exploring? Could such a way of development something that could be supported by Orchard OOTB?

As a food for thought, this is what some other CMSs do (I just took a quick glimpse):
So it seems for developers using the full source all three examples use the same technique as Orchard, Drupal being a bit cleaner. I don't know about other files than custom extensions like config files, what is another issue with Orchard.
Oct 26, 2014 at 1:22 AM
I really like the idea to have only one Orchard Source (or maybe one Source of each Version) on your pc. Currently I include the whole Orchard CMS into my projects VC. It will be also very if these feature will ready for production (if possible) because it would made Upgrade less painful.

I would love to see these feature added to Orchard out of the box.

Thumbs up from my side!
Oct 26, 2014 at 7:48 PM
Ironically we are working hard to ensure that you can have separate modules in separate repos. We have 5 separate teams of developers contributing isolated modules that deliver applications into Orchard. We want each to be able to be deployed to production without interfering with the other. To achieve this we have:

1) Created a nuget package that covers the same work as codegen /module
2) Used symbolic links to trick a standalone orchard distribution (not source) that the repo is "underneath" the modules folder
3) used various powershell scripts on nuget package install for the modules and setup of a local orchard copy to get all the symbolic links right
4) Use a lot of continuous deployment with TC and Octopus to deploy this stuff (You may have seen Chris Payne demo this at the latest Orchard Harvest

This allows a significantly better delivery experience that we had previously (a single orchard source with about 25+ custom modules, and 120+ projects in the soln. Its currently in prototype, but seems a pretty good way to deliver

Piedone - it might be worth a skype call to walk you through what we are doing and why. It might provide some ideas. I'll drop you a line on Monday maybe?
Oct 26, 2014 at 8:16 PM
@benschi: thanks for your input. Including the whole Orchard source in your source control is one of the main points here indeed. You can of course do this with workarounds but if you want to just clone a single repo when you start your project on a new machine (or a new developers sets it up) then you have to include Orchard as a subrepo/module, what you can't do currently.

@Paul: thanks for explaining your way. Sure, I'd be happy to see it in action so I can understand your workflow better, please ping me on Monday.

It seems to me that at the root what we're looking after (among others) is a way to define custom module and theme folders? There is partial support for this today (IExtensionFolders) but the strings "~/Modules" and "~/Themes" are hard-coded in many places that prevent you from e.g. using templates from modules stored in a different folder than /Modules.

Being able to use arbitrary extension folders (defined in e.g. Web.config, HostComponents.config) would be a step forward. Still, since it's a web app operating with virtual paths you'd have to place your extensions under Orchard.Web (though you could do that into new folders). This would also partially enable you to store Orchard in a subfolder of your application, thus getting closer to the Tidy setup.