Introduction to the features module

Track: 
Implementation and Config
Experience: 
Beginner

Features is such a powerful module, that it's unbelievable that it will be celebrating its second anniversary during Drupalcon Chicago. The features module enables you, developer or integrator to bring some of the more important aspects of your site that only exist in the database and to bring that into controllable code.

When building a site, either through a distribution or by downloading core Drupal, you'll be using lots of files: Drupal, modules, themes, images, videos, etc. If you're following good software development practices, you'll be storing all of these under some kind of version control system (CVS, Subversion, git, ...). However, a major part of your site will only reside in the database: Views, CCK fields, content types, required modules. These elements of your site are an integral part of the development process and your site will probably lack a lot of it's functionality if the database is not present. This creates a problem when staging a site from the development environment to the live site: there are required elements in the database which need to be moved from one to the other, but there is also junk content (sessions, logs) that shouldn't. A similar problem occurs during support of an existing site, where changes to the database must sometimes be replayed manually on the live server for modules that don't allow you to import changes to it's structures easily.

The features module helps in overcoming this problem by converting these vital elements of your Drupal site and turning them into modules which can be version controlled just like any other module, and allow the developer to easily verify if there are any changes between the "official" version and the one currently in the database.

I will also address how to overcome some of the current weaknesses of the feautures module: variables and blocks. This way, 99% of a normal site can be version controlled.

Intended audience: 

Developers, implementers and integrators

Questions answered by this session
Question 1: 
What is the features module, and what does it do?
Question 2: 
How is a feature created?
Question 3: 
When should a feature be created?
Question 4: 
Can one get rid of the database?
Question 5: 
What other resources are available?
4.125
Your rating: None Average: 4.1 (16 votes)

Diamond Sponsors

 
Palantir.net
VPS NET

Platinum sponsors

 
Trellon
workhabit

Gold Sponsors

 
Drupal Connect
NorthPoint
Duo
Treehouse Agency
Microsoft
Chapter Three
HotDrupal.com