When developing a Drupal site, there's a constant sense of deja-vu. "I know I've done this before!" As with many things in life, it becomes a race to do it faster this time than you did the last.
For small chunks of code, or "snippets", there are many tools a developer can utilize to ease the repetitiveness of coding. Editors, such as Textmate, offer developers a built-in and customizable arsenal of code routines that, when used properly, make life a whole lot easier. (Check out the Textmate PHP Drupal bundle).
For larger aspects of a development project, however, the task of harnessing re-usable code becomes more complicated. Also, there is a fair amount of site configuration (read "mouse clicks") needed to set up even one section of a Drupal site.
Take, for instance, a directory of people that includes a listing page and individual bio pages. When approaching this using Drupal, there are many components involved. Furthermore, there are many ways a Client could request the data be presented -- the Client may want to break people up into various groups, create a glossary-style listing with alphabetical pager links, or what-have-you... However endless the permutations, there is a common thread; there is a shared foundation of code and logic that can be re-used. The Drupal Features module seeks to provide that foundation, and so far, it's looking rock solid.
Still in beta, the Features module bundles one site aspect, which may depend on components of various modules, as a package of code, which can be deployed over and over again. Then, once deployed, the site aspect can be customized to meet the needs of that particular project.
This may sound a bit abstract, but let's go back to our example above: the directory of people. The developer sets up the essentials: the basic content fields that describe a person (name, bio, picture, etc.), the taxonomy terms that group people together, and the logic that presents a list of people in alphabetical order. He or she then uses the Features module to package these essentials into a bundle of re-usable code. The next time a directory of people needs to be set up, the packaged "feature" can be deployed, providing the basis for a directory listing. With that as a starting point, the site's developer can go in and customize the various components to meet the needs of the Client.
I've used the Features module a bit, and my initial impression (as you can probably already tell) is that this module is well on its way to becoming a powerful time-saver in Drupal development.
Posted at 10:15 pm by Conor McNamara
Contact DPCI to learn more about our Web content management systems,
digital asset management solutions,
online collaboration software,
custom development,
multi-channel publishing systems, and
workflow management solutions.