First off: great work to the friendly primates (and apparently at least one penguin) at Funny Monkey for this very nifty distro!
I notice that all Voicebox Features are essentially dependencies of one another. That is, only the UI Features can be selectively disabled. This makes it difficult to turn off just the "Issues", or "Imported Posts" features, for example. There are several of us at Koumbit who are still trying to wrap our heads around how to properly architect a Features-based distro to allow for such encapsulation; so I'm well aware that it isn't obvious. However, if you haven't already, I'd recommend exploring how this is done in OpenAtrium.
This flexibility, IMHO, would make of Voicebox an excellent platform to help bootstrap any number of community-oriented sites.
Comments
Comment #1
bonobo commentedSee these posts for some of our thinking on how we architected the features:
http://funnymonkey.com/building-features-for-install-profiles
http://funnymonkey.com/features-dependencies-and-ui
You should also run through the minimal install, and work on enabling the features individually.
And please, report back with suggestions/improvements. We tried to address this issue, and we did a decent job of it, but we are definitely aware that the issue of full reusability and the issues around dependencies isn't solved.
RE: Open Atrium, etc - we spent a fair amount of time looking at Open Atrium, Managing News, and other install profiles as part of our research.
The dependencies in VoiceBox get tangled once you start using the UI features, as there are IA elements that cross functionality from one feature into another. For example, the desire to show a tagcloud of tags from both imported content and site discussions means that the UI for that functionality requires both the imported content and the discussion feature.
Some of these elements can be sidestepped/minimized (or at least, the issues from them can be seen more clearly) by stepping through the minimal install.
We're also looking forward to the port to D7, as these issues might be easier to address there.
But in any case, we are wide open to suggestions. Keep the issue reports/tickets coming. Also, if you are going to be in Chicago, most of our team will be there, and we'd love to talk.
Comment #2
ergonlogicThanks for the links, I'm sure they'll shed some light on this.
I hadn't seen the minimal profile in the Aegir interface. In fact, digging into this a bit more, I see this was accomplished with profile_tasks within the same voicebox_profile.profile. I'll try to grok how you've done this, and why, along with the implications for Aegir-based installs.
For a bit of background here, I've been strongly advocating VoiceBox as the second distro (after Open Atrium, btw) to support on our (Koumbit's) Aegir-based hosting service, http://AlternD.com. We've only recently refocused our Aegir efforts on supporting distros, rather than our bread and butter custom dev work, so there's still lots to be done. However, one of our primary concerns in choosing which distros to host, is the amount of work required to shoehorn them into Aegir. Ideally, this would be "none". So far, VoiceBox has achieved this very well, in that I've been able to build the platform directly from your makefile, through the Aegir interface, with only one notable bug (#1059006: /files/ctools/css permissions broken), which appears to be on Aegir's side anyway.
That said, I don't think interactive profile_tasks are supported under Aegir, though I'll discuss it further with the Aegir devs. Have you considered using Profiler? Besides moving lots of .profile stuff into an easily maintained .info format, it also supports derived profiles, akin to sub-themes. This might be a sustainable way to share configs and code across profiles, while still exposing them explicitly to Aegir. Again, I haven't actually read through voicebox_profile.profile yet, so this is just an initial idea.
Either way, I'll build a site manually with the minimal profile, and see how the Features can be fit together. From my reading of the docs on community.openatrium.com, encapsulation of the tag-clouds example might be achieved with some drupal_alters in the .module's of the features in question. Again, I haven't looked closely enough yet, but I'll discuss it with our "features team" and see if we can't help come up with a good solution.
I agree that a D7 port may make some of the concerns moot.
We'll have a whole contingent of Koumbiteers (8 or 9) in Chicago, so we should definitely try to hook up.
Comment #3
bonobo commentedThis sounds awesome.
We're trying to do some similar things internally as well.
It'd be great to compare notes, so neither of us need to reinvent the wheel, or build the same wheel independently.
Or something like that :)
Look forward to talking more - and like I said earlier, keep the issues/requests coming.
Comment #4
ergonlogicA couple notes from reading through voicebox_profile.profile and the .inc's:
* It looks like the "minimal" profile just turns off (or rather, doesn't turn on) all the UI features. I should be able to achieve something similar with a regular Aegir site build and turning off all the UI features myself, right? Then I should be able to see what dependencies remain between the features themselves.
* A lot of work here appears to be setting up wysiwyg. Have you seen: http://www.lullabot.com/articles/wysiwyg-feature? Apparently, it's feasible to build a wysiwyg feature these days. YMMV.
* Another nifty thing about profiler is that it will recursively activate module dependencies. So, by bundling everything into features, you can just activate those, and don't need to be so explicit about dependencies and their order of activation.
* Profiler also allows for defining themes, roles, terms, variables, &c.
Comment #5
bonobo commentedWe put a lot of work/thought into where in the stack the WYSIWYG belonged. We saw the Lullabot article but building the feature relied on a patch in #624018: Exportables and Features support for WYSIWYG 7.x, and that felt like too unstable a foundation for an install profile. The lack of support for machine names for both roles and input formats (combined with our use of Better Formats module) complicated building a feature for WYSIWYG editors in D6.
We definitely need to check out Profiler - it sounds useful. IIRC, it was still under heavy development when we were building out VoiceBox, so we opted not to use it. From what you're saying, it might be time for a second look.
Comment #7
bonobo commentedRemoving tag.
Comment #8
ergonlogicRe: WYSIWYG, I agree that a module requiring a relatively untested patch, and with dependencies on a couple other modules in beta, would have been pretty unstable. Also, non-existent Features support for Better Formats at the time, couldn't have helped.
FWIW, I submitted #1060846: Exportables and Features support for 6.x, hoping to focus efforts on a 6.x solution for WYSIWYG API. Also, #616496: Features integration shows some promise for adding Better Formats to the mix.
Comment #9
jgraham commented@4: Like you mentioned the minimal install profile does skip enabling the UI features. If you review voicebox_profile_profile_tasks() a bit further you'll see just above where the UI features get enabled there are 4 lines of enabling modules/features. You can think of each line as dependent on the previous with the interdependency complexity growing at each step. Like you have noticed and bonobo mentioned above several of the UI features are "cross" feature dependent. We intentionally broke the ui features out separately so that the underlying features would be more generally useful. Like bonobo mentioned we put a lot of effort into this, but realize that it's not perfect and are more than willing to adjust to constructive criticism or improved methods.
I would suggest reviewing the two dependency trees in the post bonobo linked to here specifically what the dependency tree looks like without the UI features and with the UI features the light grey boxes represent the "bundles" and the inner nodes represent the individual features. *caveat: those dependency trees are slightly out of date, but still give a very useful overview.
In decreasing order of complexity try disabling features in the following order stopping at each stage to see where things are at; *_ui; *_navigation; *_views. Disabling the UI and navigation features will result in a fairly independent set of features.
Profiler is definitely on my list to review and integrate into the workflow here. If for no other reason the inheritance of profiles gets us a lot.
Enabling modules via profiler and features, is certainly a plus. However, we found several issues around the install profile, clearing the cache and not preserving settings such as what themes are enabled. Several of these were issues in core that look to be largely resolved in D7. The toolset for installation profiles in D7 is so much more mature and robust as compare to D6 we are certainly looking forward to seeing how much can be cleaned up when we migrate to D7.
Like bonobo says, quite a few of the primates will be in Chicago so it would be a great opportunity to work together to resolve any outstanding issues or share experience.
Again, thanks for the thoughtful feedback it is very helpful.
Comment #10
ergonlogicAs for Features-encapsulation, I've read the articles you linked to, poked around in the VoiceBox features some more, and a couple questions come to mind.
Following your advice (sorta) I deactivated all the UI features, and was then able to deactivate several other features. My goal was to remove Imported Content and Issues, just keeping the Discussion/Channels/Bio/Posts functionality. This doesn't appear possible currently, since Channels depends on Imported Content, and Channel UI depends on Issues, among other things.
This doesn't come as too much of a surprise, as it's well documented in the graphs you provided (here and here). Do you have any suggestions on how to work around this? This isn't for an immediate site-build or anything, but rather trying to understand how you would approach such a project.
I note also, that none of the features in VoiceBox have any code in their .module's, except the UI-generated include (e.g.:
include_once('voicebox_homepage.features.inc')). It seems to me that better encapsulation and easier context IA could be achieved by adding something like:I think such an approach would remain consistent with the goals you outlined. I'd appreciate hearing your thoughts on the matter.
Comment #11
ergonlogicOops, cross-posted there...
Thanks jgraham. I'll explore the VoiceBox features further, as time permits. So are you suggesting rebuilding the _navigation and _ui features in order to accommodate arbitrary functional feature combinations?
BTW, all these comments and questions are intended to be constructive, rather than critical. I look forward to meeting you all in Chicago :)
Comment #12
jgraham commentedRegarding removing imported content and issues; I'm not positive on this, but it might just work. Several of the views would need updating to resolve the now missing content types. You could try adjusting the .info to see what you can accomplish by removing the hard dependencies.
Regarding how to approach a project, that's probably best for a face-to-face as there are plenty of facets that should be part of the evaluation, decision making, and implementation processes.
What you describe in your snippet in comment 10 is certainly interesting but requires more careful thought. It certainly avoids the dependency soup issue, but it also complicates the process of determining what is absolutely necessary for a site's functionality. For example, the above snippet is just bloat if you don't have the atrium module enabled. Memory footprint is a contributing factor into how scalable a drupal site is, those little bits of graceful functionality enhancement have a cost. Of course this is not to say the benefits don't outweigh the drawbacks (additional memory footprint, more manual code writing), but rather that it should be evaluated relative to the goals of the product, feature, module, etc. to determine the appropriateness of the solution.
Comment #13
jgraham commented@11, Exactly, we posited that the UI and navigational elements were the most likely to cause dependency complexity, need customization, or be completely unnecessary on a site-by-site basis. As such they were extracted so that they could be disabled refactored etc. This has the added benefit that you should be able to now remove or replace some lower level functionality at the cost of having to only rebuild the navigational and UI features.
So your thought is exactly what we had envisioned.
Comment #14
ergonlogicIt seems to me that there are basically two uses for distributions:
Since these goals can sometimes (or even often) come into conflict, which of these do you see as VoiceBox's primary objective? From the goals outlined here, I'd have thought the former, but the last comment hints more at the latter.
This is one of the issues Koumbit's features team has been struggling with of late. My personal bias is towards the turn-key/SaaS model, with the self-contained clicky on/off features found in Open Atrium. Since many, if not most, Drupal shops' revenues are heavily weighed towards custom site-building and development work, I'm probably in the minority on this issue.
So, with that in mind, it's easy to see why I prefer the hook_context_default_contexts_alter() kind of approach. I don't think performance would be too negatively affected, as this hook "acts on the collected array of default contexts before they are cached" (ref: context/README.txt). However, I agree whole-heartedly that this approach "requires more careful thought." All the more so, since it would likely require a significant re-working of the architecture of the distribution.
BTW, there's a nicely detailed write-up here.