The new release of Drupal – Drupal 7 – gives a lot of new possibilities for developers. Many changes have been made to make the system more flexible and to improve performance of Drupal 7. Patches from more than 700 people in the community have been accepted. The main change in Drupal 7 that just about everybody has heard about is that many popular modules are moved into core, but many other improvements have been also made that make developer’s experience with Drupal even better.
In September 2007 the survey was conducted by Dries Buytaert to find usability problems in Drupal and to get to know users’ expectations about the future new release (more then 1000 responses collected). The mostly wanted features for core as selected by respondents (listed by importance – mostly wanted first):
- Better performance for authenticated users
- Get the Views module's query builder into core
- Improve node access system
- Better internal APIs (easier to use, consistency)
- Better external APIs (import/export, webservices)
- File API improvements
- A semantic core theme (like Zen)
- Smarter cache invalidation
- Mail subsystem (with queues and accounting)
- Support for MySQL master-slave configurations
- Further extend APIs to support internationalization
- Enhance code quality
Here are also the conclusions made after the survey about more important features to include in Drupal 7.
- Better media handling
- Custom content types in core
- WYSIWYG editor
- Better performance
- Better tools to structure/organize content
- Basic Views like module
- Automatic upgrade functionality
- Improved node access system
- Better internal APIs
- Better external APIs (import/export, web services)
“Fields on everything”
- What was in Drupal 5 and Drupal 6 in CCK (CCK is custom content types and custom fields) has been moved into core in Drupal 7. While installing modules is easy for Drupal experts, this improvement will save you time.
- More importantly: creating custom fields and types has become more flexible. Now everything in Drupal is called an entity: comments, users, taxonomy terms, categories are all entities and all these entities can accept fields. Once created, any field can be then re-used and added while creating new content.
- Comments and Users have become nodes. Comparing to Drupal 6, it means for example you have no need to install the module content_profile to customize Users profiles. Before in Drupal 6 Users had only 3 fields: email, login, password. Now you can easily add other fields like location, personal info etc. without installing additional module.
- New types of fields added: image field and field for uploading files (file fields have been previously provided by the contributed module FileField, fields to upload images - by the module ImageField)
Features for front-end developers and themers
- There are many improvements for front-end engineers in Drupal 7; the most important maybe that jQuery UI is in core now. Before you had to install this library.
- Color module in core
- Old table-based themes are removed from core. New theme "Stark" was added to the pack, this theme can become a good starting point for you to create new themes and makes analyzing Drupal's default HTML and CSS easier. This theme will probably satisfy those Drupal developers who voted for “semantic core theme” as the top priority feature in the new release of Drupal in 2007 – the research we mentioned in the beginning of the article.
- Administrative interface has got its own theme ("Seven").
- IDs of many blocks are changed and has become more meaningful, for example the ID of navigation block is changed from block-user-1 (in Drupal 6) to block-system-navigation (in Drupal 7) – much more easier to understand what the block is for. Some variables are renamed: $picture changed to $user_picture, $left and $right variables are now $sidebar_first and $sidebar_second; some functions are renamed, etc. New names look reasonable and consistent still it will take some time for a developer to get used to the new requirements. Complete list of changes in Drupal themes can be found here http://drupal.org/update/theme/6/7
- Some little inconvenience you may have while getting used to new names and requirements for Drupal 7 will be offset by advantages you get in Drupal 7 while creating a theme. One of the advantages is more flexible use of hooks. Some important hooks like hook_page_alter, hook_form_alter, hook_js_alter, hook_css_alter you can use now from theme – no need to create a module. Still, to use some other hooks like hook_menu_alter, for example, you'll need to use a module.
- In Drupal 7, $content became a region and is now mandatory in all themes. In Drupal 6, it was only possible to put blocks after the main page content in this region and to put blocks before the main page content developers needed to create a new region. Drupal 7 now makes the main page content its own block. This makes it possible to put blocks before or after the main page content in the region without hacking in a new region.
File and image handling:
- Files are now first class Drupal objects with file_load(), file_save(), and file_validate() functions and corresponding hooks.
- Files use PHP stream wrappers to enable support for both public and private files and to support pluggable storage mechanisms and access to remote resources (e.g. S3 storage or Flickr photos).
- Improved image handling, including better support for add-on image libraries.
- Protected cron.php -- cron will only run if the proper key is provided
- Implemented much stronger password hashes that are also compatible with the Portable PHP password hashing framework.
- New permission to run site updates
- Rate limited login attempts to prevent brute-force password guessing, and improved the flood control API to allow variable time windows and identifiers for limiting user access to resources.
- Added support for the SQLite database engine
- Theoretical support of any PHP supported database.
- Added query builders for INSERT, UPDATE, DELETE, MERGE, and SELECT queries.
- Support for master/slave replication, transactions, multi-insert queries, delayed inserts, and other features.
- Default to InnoDB engine, rather than MyISAM, on MySQL when available for greater scalability and data integrity.
- New translation interface
- Search module supports language-aware searches
- Individual fields can be marked translatable/untranslatable
- Support for message contexts (msgctxt) to make translation of short words like “View” much easier.
- Added support for default text formats to be assigned on a per-role basis.
- Improved time zone support
- News aggregator: Added OPML import functionality for RSS feeds; Added feed update options.
- Installer can be run from the command line
- Setting up automated task runs (cron) can now be achieved via Drupal's configuration alone, without having to install any scripts on the web server.
- Better Support for Multisite Installations
- Added RDF support
- Better support for search engine optimization and web linking
New Minimum System Requirements:
- Database: MySQL 5.0.15 or PostgreSQL 8.3
- PHP Version 5.2 or higher
- PHP Memory: 40M - 64M
Let’s get back to the most wanted features list from the survey made in 2007 we mentioned in the beginning of the article. Which of the features wanted by Drupal developers are implemented in Drupal 7? Are there things on the features list that hasn’t been taken into consideration or left for future releases?
We should say that many features indicated as priority have been implemented (Custom content types in core, Automatic upgrade functionality, better internal APIs). One of the things people wanted most is WYSIWYG editor and this is not included in Drupal 7. Node access system is not improved. Comments of Dries Buytaert on this matter: “Drupal core does not have a UI for node access so the contributed modules, not core, will take advantage of these improvements”.
We should say also the biggest change is improving usability: admin interface in Drupal 7 is much easier to understand for novice and non technical people who add content. And this is what content editors wanted most of all. If you are a developer interested more in feature rich and performance of Drupal, please pay attention to the fact your clients care mostly about clear interface and when your clients try admin interface in Drupal 7, they will be more satisfied with the job you do for them. So we propose you to review the article about usability improvements in Drupal 7.