In keeping with the vision to make Core function like Kernel, Contrib function like Libraries, and Features like Applications, I think it's time we start thinking about ways to distinguish between Features and non-feature modules.
I think the distinction is pretty well understood by most users of this module (perhaps not new users). In my mind, Features are prefabrications used to build sites more efficiently. For now, most of these prefabrications are used in very specific use cases and not shared; But I imagine in the future features will become more general and shared on drupal.org like contrib modules.
Before features become a central part of Drupal, there needs to be a clear line drawn between a "Feature" and non-feature modules. If not, the contrib projects will become muddied with no way for many drupal user to understand if the download is a going to be a out-of-the-box contrib like a Feature or a piece of framework like CCK and Views.
Dries said, we need to "Create better separation between framework and product". Features offers a great solution to the goal. I'd love to see Drupal 8 come with standard features (blog, forum...) using versatile modules (views, fields...).
This will also help the current contrib module developers to focus more on versatility and extensibility and less on "out of the box" experience. They won't need to deal with users new to drupal because the "Feature" interface should largely take it's place. We will begin to see much more modules like Views, CCK, Voting API which will help Drupal make even more complex websites while keeping the site building process efficient for all use cases.
Comments
Comment #1
yhahn commentedConcretely, what do you have in mind here?
Comment #2
philbar commentedA good starting point: Should we consider treating them differently then modules. Just like the distinction between modules and themes, we could introduce a third: Features.
The problem I have with the current documentation is that contrib and features are considered 2 different things. What happens when Features are contributed to drupal.org or other outlets? Won't this be a problem?
Also, we shouldn't muddy the concept of a "module" by adding the Feature concept into the mix. Below is how I imagine the whole Drupal experience in the future.
Website would be built down from each:
- Core (Framework)
- Module
- Feature
- Theme
- Distribution / Install Profile (Product)
The further down we go in adding each element, the less it become like "Framework" and more it becomes like a "Product". Make sense?
Comment #3
yhahn commentedIt's not clear to me what you are advocating in terms of actual actions here... do you mean that
features/directory in addition tomodules/andthemes/directoriesmodulesin the technical sense, i.e. their hooks should not be called by DrupalComment #4
philbar commented1, yes!
2, hopefully.
3, perhaps. I don't have a problem with the technical side of Features. But I think it would serve the total Drupal experience better for features to be technically similar to modules but not the same as modules.
Comment #5
Grayside commented#1 I am mixed on. There are already Features hosted on D.O. (Such as the debut features) muddying the waters. But if #1, what do you do about features packaged as sub-modules? I've taken to creating a
features/directory in some of my projects to contain Features that provide an out-of-the-box base application built on top of a module. And while a logical distinction on the filesystem is nice, Features are ultimately just another module. It's kind of site or distribution specific to gather them up into their own directory.To me, the bigger distinction is
contrib/and what I've started thinking of asextra/, which is where all non-D.O hosted projects that are not site-custom should go.#2 makes sense to me. Or possibly a secondary module taxonomy. D.O's module vocabulary is really garbled between what a module does and what it relates to. I'd like to see those separated, so you can have API modules, Application modules, UX Enhancement modules, etc more easily searched for, separate from "This is a CCK/Nodereference/OG/etc" module.
#3 is a bad plan that limits the versatility of Features. We don't need to double the entries for Features modules in the systems table just for hook_form_alter().
Comment #6
hefox commentedAs someone that uses features as modules (as in, I use feature exports, manual feature supplied hooks like hook_content_default_fields along, and other non-features hooks... in the same module sometimes), I'm pretty much against 1 and 3.
I like grayside's later option for two though; I want free tagging for modules (actually, I want uh... community driven tagging? for modules. Like hulu).
Comment #7
philbar commentedThe reason I'm for #1 is that there is a strong trend with Drupal modules towards more generic, API-driven modules (Views, CCK, Token, WYSIWYG...). If we start developing modules with packaged sub-features, we muddy the goal of the module project and we start adding potentially unwanted entries to users modules and features configuration pages.
It'd be like adding a Blog sub-feature to the Views module. First, everyone using Views would be stuck with the Blog feature regardless of if they use it or not. Second, the Views project tracker now has to deal with managing two projects: Views API and Blog feature.
If we separate the two domains, modules become focused on framework improvements to Drupal and features will be focus on ease of implementation.
Comment #8
philbar commentedI'm with you. This issue is to help create the plan to make this happen without sacrificing your workflow.
I'd be very surprised if Features doesn't make it into D8. When this happens, we'd surely want to separate module and feature. This way we don't scare new users by making them dig through module after module to find "Blog feature". And you won't need the redundancy listing in the modules config page for people who don't want to install the Features module because it would already come with Drupal.
Since D8 is a long way off, can we force a the .info file to have
package = Featuresso all Features fall under the "Features" fieldset in the module config page?Comment #9
philbar commentedSummary of action choices:
package = Featuresto .info file to group them in module configuration page.Regarding #2, I'm not sure new users to Drupal would think to use taxonomy to search for Features. While having them a project type with a nice description on the project page, it should be easier to find and use.
Comment #10
hefox commented1) Adding package would have to be optional (what is the default at the moment?). There's some discussion here #894572: Features with only module dependencies not recognized as features on adding something to .info to distinguish them as a feature.
2) The taxonomy already has been added, see #760878: Add a "Features" term to the taxonomy vocab for modules on d.o or http://drupal.org/taxonomy/term/11478; what I like is grayside idea of more broad/clear categorization so modules are easier to find in general, but that is not a features specific thing.
Comment #11
Grayside commentedNot all modules that might ship with features are epic API modules. I think if a contrib version of the Book module existed, it should ship with a feature defining a default/example Book content type. I think this is a best practice discussion, rather than something which should be mandated by infrastructure.
As @hefox said, this should not be mandated. The most important (IMO) categorization of a Features module is its relevance to the site, not the fact that it is a special class of module. (Random thought on package naming: D.O taxonomy used to provide the D.O packaging script with a fallback package name, instead of filing everything under "Other")
It's nice to see the taxonomy term. I noticed it before--based on initial usage, I thought it was for Features-integration modules. Now I see it is for the whole ball of Features-related wax, which takes us back to minimally useful terminology. Features-related modules and "Applications (such as Features-based)" are not the same thing in a site-building life-cycle.
EDIT: Removed redundant paragraph.
Comment #12
philbar commentedIf this is how we want to promote the use of features, then we definitely need a distinction from modules. Your suggesting every module should include a "Getting Started" feature which means my module config page will now be twice as long.
That being said, I don't know why this type of feature couldn't be it own separate project. If we shift the paradigm, then we stop looking for modules, and start looking for Features to provide functionality. Then there could be a couple types of Book based Features. One for "Documentation", another for who knows what...
Many of these types of modules only exist because there is no way to get complex API modules easily configured for certain use cases. Or they were created before these other API modules were available. The Blog (core) module being this case. Now that we have Features, the configuration difficulty isn't a problem any more.
Comment #13
philbar commentedQuote from Webchick: #760878: Add a "Features" term to the taxonomy vocab for modules on d.o
Another example of the confusion I'm referring to between this "Features" concept and modules.
Comment #14
philbar commentedBranched off this issue since we all seem to agree:
#909276: Add package = Features to .info file by default
Comment #15
q0rban commentedsubscribe
Comment #16
Grayside commentedI think an entire Project Infrastructure for a "Getting Started" feature can be excessive. The answer to Modules page clutter is to think about the Modules page itself.
#13: That's why I'm suggesting the way Taxonomies are used with modules on D.O should be rethought. In the mean-time, there probably is a need for a separate "Features integration" term.
Comment #17
philbar commentedFrom: http://drupal.org/comment/reply/760878/3439704#comment-3439704
(Moved here to keep a single discussion thread.)
This is true, if all we care about is the technical side of things.
But there is a semantic issue here: If modules are defined as something that "extends or alters Drupal's behavior", then a Feature is no more a module than a theme is a module. In fact, it could be argued that themes "extend and alter" Drupal far more than many features.
Really, the focus on these decisions should be new users. Configuration is one of the huge turn-offs of Drupal. If we have a features section of drupal.org where people can get Blog, Image Gallery, Forum... features without scaring them away with a huge list of non-features with names like "chaos tools", then I'm sure Drupal will gain a huge share in the CMS market.
Regarding the technical side, features are really just install/configuration scripts packaged to be modules. They can be changed to be unique from modules, but because the Drupal infrastructure wasn't in place for something like this, the author made them modules. This works for now, but isn't ideal.
Comment #18
webchickI'm not sure why I was directed here, but...
I'm caring about both the technical and the end user side. I do not want to become a project where there are 11 different names for "Extend your website's functionality". I don't want "Modules" and "Features" and "Components" and "Mambots" :P and...
To an end user, extra jargon is just a barrier. If we call all of these things "Modules," which they are, they instantly know, "Oh. That's one of those things I download and stick in my sites/all/modules directory and turn on with a checkbox and then configure somewhere in the admin panel."
Making a distinction between a module that provides an API like Voting API and a module that provides "building block" functionality like Views and a module that provides a "one-click photo gallery" like some Features-generated module can easily be handled in the Project's description. There is absolutely no reason to burden an end user with having to know that kind of distinction. They only need to know what it does, what its list of dependencies is, and how to go about configuring it.
Calling out the "one-click configuration" type of modules can easily be handled with a tag, which is what #760878: Add a "Features" term to the taxonomy vocab for modules on d.o is about.
Comment #19
kvantomme commentedThis is an infrastructure question, not really related to D7, but I think we should make the distinction. For me a feature is a bunch of exportables in a package, yes you can add actual actual custom code into a feature and yes you can add exportables to modules, but IMHO that is the grey area in between that clouds the bigger picture.
1) It would make it ok to contribute export-only-features, because most people think features are too simple to contribute as modules, even though they could be valuable at least as learning material.
2) It is too easy to make features to treat them as modules: we now have 6000 modules, if features really take off as contributions (which is a good thing) we would go to 10-20k in no time. Imagine having to sift through all that to find the actual modules (projects that contribute API's)...
Imagine having the top 10 content types on the CCK project page...
Comment #20
hefox commentedJust to be clear, features can be added to d.o; see the before mentioned issue queue post on the taxonomy term.
Comment #21
webchick1) It is ok to contribute feature-only modules. I have absolutely no idea where this FUD comes from. Feature modules are just regular modules, with a tag to denote them as a "Features package."
2) Why shouldn't there be 20,000 feature modules, if they're actually useful to the community? If there are feature modules that are super similar, we will use the normal community processes to encourage module maintainers to work together. The really useful "API-like" modules will always be on the first couple pages of http://drupal.org/project/modules because the 20,000 feature modules depend on them.
Yes, for you, with a 5-digit user ID, permanent member of the Drupal Association, who's been to 4 Drupalcons, who's been using Drupal since 4.something, I'm sure that's what a feature is. :) I'm similarly sure that to anyone who's seen Development Seed speak about features, or for people who are relatively clued into the Drupal community, that's what features are.
However, for the other 99.9999% of people who want to extend their Drupal site, they're just modules. Calling them something other than modules just adds confusion.
If Drupal core ever makes a distinction between modules and features, then it would make sense to do so in contrib. But it doesn't, and won't until at least Drupal 8.
Comment #22
philbar commentedThis is what the discussion is all about. I'm not looking for an instant fix, but rather a long term vision for Features.
I see Features as another layer to Drupal. From a purely user experience perspective (leaving the technical aside), features are distinct from other modules in the sense that they are packaged configuration. They are modules, technically; but functionally, they interface on top of other modules.
Features are basically like Views or CCK's export functionality except Drupal-wide (or at least someday). It was designed to be a module so people could adopt the technology quickly, before the infrastructure was there to support it. Clumping it together with other modules would be similar to saying Views or CCK export files are "modules". They function differently.
Features don't really extend Drupal, they just make a clone of another users configuration. This is why I don't agree with you that features should be treated like other modules.
Comment #23
Grayside commented@philbar That's a Developer's perspective not a Site-Builder's perspective. I bet you Site Builders see Feature stuff as modules, and weird API modules as annoying library requirements that happen to be called modules also.
There are countless modules that are a blend of both, and it is too soon to see how module practices shift on a universal level. Does everything with a Content Type cooked in count as a Feature?
EDIT: Snipped to avoid redundancy around D.O taxonomies and such.
Comment #24
webchickOk, then my stance is still no. A site builder doesn't give a crap what files are or are not in the module directory, what dependencies it has or doesn't have, whether the .module file contains hook implementations or ASCII art of pirates swashbuckling, or anything about how that module was created including whether or not the developer was playing Wu-Tang Clan in the background while building it. All of these details are completely, utterly irrelevant.
What they care about is what the module does for them, and whether it achieves their goals. And this can be derived from a combination of the project name + description + category + screenshots + documentation.
I would even argue that a developer doesn't care about these under-the-hood details, either. They're looking for code that is performant, well-documented, organized, etc. This is true regardless of how the module was created, and how many lines of code it has in its .module file.
Also, speaking as a developer, I have never once succeeded in creating Feature that is truly only configuration. The exportable support in contrib is simply not there yet, and there is almost always some elbow grease in terms of UX smoothing out as well which ends up manifesting itself as hook_form_alter()s and whatnot. I therefore fail to see what makes my "Feature" module different than modules I built 3 years ago that contained Views exports and whatnot. Creating such a false distinction is simply lying to people, especially since there are a lot of "one-click configuration" style modules that aren't based on Features at all.
So who, really, is this distinction trying to help? How does it do more good than harm?
It sounds like what you're actually after is making it easier for site builders to find modules that fit their needs. I absolutely agree with that goal. So let's improve the search tools on Drupal.org. Introducing vocabulary/concept complexity isn't the way to do it, IMO.
Comment #25
philbar commentedI mainly created this issue to help deal with the Innovator's Dilemma which Dries outlined in the 2010 State of Drupal address.
http://knol.google.com/k/philbar/simplifying-drupal-8-with-features/2vji...
What are you thoughts on Simple/Advance modes?
Comment #26
kvantomme commented@Angie: I guess my immediate objective would be to have a list of features that implement a certain module. But that could simply be a little list in the bottom of a project page with 10 most important projects that have this module as a dependency with a more link to see the gazillion of other modules (be it features or not features) that do so.
@philbar: Using features to codify advanced settings in a simple UI might work, but it's not going to be easy to get sufficient features to make this work, and have cohesive feature sets that all work together.
Comment #27
philbar commentedTo think about this from a different angle:
How can we keep the scary API modules (Views, Panels, Rules...) from hurting a new users first perspective on the easy of use of Drupal?
The answer to that, for me, is directing them to Features specifically rather than general modules (at least once Features take hold in the Drupal community). I don't think taxonomy terms are enough to allow us to keep new users from stumbling across scary API modules first.
That is why I propose making them a different project type.
Comment #28
mpotter commentedClosing this for lack of activity. I believe this is now handled by the latest dev version. Please re-open this issue if you can reproduce it in the latest version.