02 May 2012

April 2012 delivered a fresh batch of promising and useful-looking new contributed modules to the Drupal world. Perhaps because the immediately-preceding DrupalCon gave developers some time to collaborate and work on their contributions more than they normally might, this month seems to have a notable number of interesting new projects, especially considering the relatively “mature” state of Drupal 7 at this point. To help keep abreast of some of the most interesting new developments we have planned a monthly article to showcase these new modules; this is the first edition of our “Modules of the Month”. At this point in the release cycle, newly released modules are mostly only being released for Drupal 7, but a few have also been released for Drupal 6 as well; where Drupal versions are not mentioned, you should assume the module is only for Drupal 7.

Caveat: I have tested some, but not all of these modules. Be especially careful if you choose to use any of the “pre-stable” releases on production sites. I should also note that some other awesome modules released in April may not be included—I did my best to select the modules I’d be most likely to use, but there are some “special use case” modules which were not covered, but which might be very useful for some sites. The 30-something modules included here have been sorted into very loose categories.

3rd Party Integration / Social Media

Twitter Follow Block

The Twitter follow block

The Twitter Follow Block module, by Pradeep Saran, provides a nicely styled box to show your Twitter link and followers in a jQuery-loaded block that can be placed in any region of your theme. You can configure the dimensions of the block (and thus, the number of “follower thumbnails” displayed) and you can choose from different color schemes to better match your current theme. It currently only displays the Twitter feed for one Twitter user, but what might be an interesting development would be a way to dynamically load the Twitter username (e.g. from a Profile field) so that the Twitter follow block would link to different users (based on the author of content currently viewed or the profile page being viewed, if applicable). The module is currently available as a “stable” 7.x-1.0 release and I look forward to seeing this get further developed.

Social Buttons

The Social Buttons module by Linnovate’s Raz Konforti, provides a field that can be added and configured for any content type (or any fieldable entity) and includes default button code for Facebook, LinkedIn, Twitter and Google+, but you can also easily add new buttons. Since it’s a field, you can also determine where and whether it is shown for each display (node view, teaser, RSS, etc). It has a 7.x-1.0-beta2 release as well as more recent commits to the developer branch.

Content Access Control

Hidden Nodes

The Hidden Nodes module, created by Bryan Ollendyke of Penn State University, helps allow staff to hide nodes from regular visitors while still allowing users with “staff” permissions (admin or author/editor -type roles) to see the content in the menu as it will appear when the content is finished. This helps get around the issues caused by the “black-and-white” absoluteness of published/unpublished status (and only being able to access content through the “administer content” system). It was created to integrate well with the Outline Designer module, another project sponsored by Penn State. Hidden Nodes has recently had its fourth beta release and is certainly an interesting project for streamlining team-based content workflows.

Restrict node page view

The Restrict node page view module, authored by Christian Johansson of Sweden’s Kodamera AB, helps prevent users from viewing content outside of its intended context. The example use case for this module involves a requirement to prevent users from directly viewing Views slideshow nodes (via their node/xxx paths), but of course there could be other content you want to restrict access to but still have its information available in a Views display, so direct access to the node by most roles can easily be blocked with this module. The initial release is shown as “stable”, and it’s simple enough, so may never require any fixes or updates. That said, I do hope that they modify the module so that full-node access is only restricted to selected node types (i.e. blacklist). It currently adds a set of permissions for all node types, which defaults to no view access for all roles and content types, which would be a pain on sites with lots of roles and content types, especially if the goal is only to restrict non-staff access to one limited node type out of many.

The permissions created by the Restrict Node Page Access module.
20 April 2012

How do I allow a user to create other users?

It’s a pretty common use case which requires a non-admin user role that can create other users for a Drupal site and I’ve frequently seen questions about how to best implement this. I recently also saw the suggestion to simply create a role with the 'Administer users' permission. At first blush, it might seem to work; if that’s the only “administer” permission they have, users with this role can only create basic users with the role “Authenticated user”, they cannot edit the user to add any other roles or upgrade their own role directly. In limited situations, this might even be appropriate.

Drupal’s “administer users” permission Users with the administer users permission can edit any other user on admin/people

What might not be immediately apparent, however, is that a user with this permission can edit any other user’s account… and I do mean any. This means that, if their intentions are not pure, a user with this role could easily change the password (or any other fields) on a more privileged user, even user/1, and then log into that account. Once they’ve done that, there is really no limit to what they could do to your site. Even if they have no means to add modules, ones which might be used for particularly nefarious purposes, if you have a module like Backup and migrate available, they could download your database with all sensitive user data; and even if this module is not available to them, you most likely have Views, which they could also use to harvest all user email addresses or other private data fields. And then they could easily cover their tracks, too. If they don’t do anything obvious (like deface your site or start sending spam from it), and only change the password on the admin account, you might be puzzled by why you cannot log in with your normal password, and follow the normal procedure to reset your forgotten password, then forget all about it. Meanwhile, your “user moderator” has collected lots of sensitive data from your site and still has the means to do it again one day.

18 April 2012

We have officially joined the World Wide Web Consortium (W3C) and its MultilingualWeb-LT Working Group. The group will create a new standard to help language technologies (the ‘LT’ in MultilingualWeb-LT) perform better in a more and more multilingual Web.

There are plenty of reasons to support multilingualism on the Web. Despite English often being considered a ‘lingua franca’ on the Web, the reality is different. In the world there are many different languages and their speakers want content in their native tongue(s). These are not necessarily small language communities: there are over 500 million Spanish speakers in the world, over 10 million native Quechua speakers and over 20 million people who call Tagalog their mother tongue. Being able to provide content in multiple languages can open new ways of communicating with these people.

30 March 2012

We have a major upcoming project here at Cocomore which is in the initial planning phase. It’s too early to provide the finer details of the project, but it involves creating a product database for a large publishing house and Drupal 7 has been chosen as the project framework. By mid-June, we will likely have four developers working on it, full-time. Of course, anyone who deals with software development almost certainly knows the problems that tend to occur during the planning of large-scale, long-term projects like this one: in the beginning, the client is often not yet 100% certain of their needs or desired end results, so new requirements and ideas arise in the middle of project development. This means that projects built to the initial specifications often fail to completely meet the client’s needs, which can be disappointing for everyone involved.

Hoping to avoid this scenario, we (our software development team, and project and senior management) proposed implementing the project using Scrum. This allows us to flexibly respond to changes in requirements and keeps the customer closely tied to the project development process so we can avoid unpleasant surprises at the end of development. At a recent Cocomore “KnowledgeLab”, I presented a brief overview of Scrum methodology, a topic which is certainly too broad to cover, in-depth, in an hour-long presentation. So I limited the scope of my presentation to the most essential elements of the Scrum process: roles, events, and artifacts; then used Lego Scrum to try to better illustrate the model. This article provides an overview of the same basic concepts covered in our workshop session and describes how I helped immerse team members who had not previously worked with Scrum in the concepts and processes. We have been using Scrum for other “ambitious” Drupal projects and plan to provide in-depth case studies for some of them, with details about more specifics related to Drupal; this article provides a general foundation for understanding these upcoming case studies.

Scrum: a process model for agile software development

Agile software development is characterized primarily by an iterative procedure with alternating planning and development phases. The advantage this provides is that parts of the system are developed early on and can be tested before implementation of other parts. This reduces the risk that project development heads in the wrong direction. Rather, responding quickly and flexibly to changes in the requirements, the components of a system can be redefined to best meet a client’s real needs.

agile_workflow_with-url_03.png

19 March 2012

mlw-logo-lt.pngWe (Carsten and Carina) have been sent out to tell the Drupal community about our latest project which has potentially huge implications not only for Cocomore, but for Drupal as well.

08 March 2012

At the latest Rhein-Main region Drupal meetup, and then at the recent DrupalCamp in Essen, I gave presentations about installing and configuring the latest version of the Eclipse IDE (Eclipse Indigo / 3.7.x) for Drupal development, with coverage of commonly-used plug-ins, and identified some features which enhance a Drupal development workflow. This article is related to that presentation and covers some tips for the PDT (PHP Development Toolkit), productivity shortcuts, and configuration requirements for coding in accordance with Drupal standards. The Aptana Studio (as an Eclipse plugin) is not covered in great depth; much of it differs from PDT and PDT-supporting plugins, so it may be covered in a separate post.

Disclaimer: I am not an expert Eclipse power user, nor am I a Drupal development expert, however I have taken the time to look at the latest developments and to experiment, so while this material might be especially helpful for people new to Drupal development who are just starting to use Eclipse and configuring it for the first time, I hope that even experienced Eclipse users may find some useful tips in this article. Before I started my internship for Cocomore, back in October 2010, I think I’d used Eclipse for one course in Java development, but it had been some years, and since then I’d used NetBeans in other courses, but whenever possible I still used my editor of choice, TextMate, which I still find most useful for those times when I just want to make a few simple edits. But there are times when a full-fledged IDE is the right tool for the job and when that’s the case, it helps to have your IDE properly configured and to be proficient in its use. Writing this guide has helped improve my knowledge of Eclipse and I hope reading it will help yours.

Eclipse configured for Drupal development

This article is long enough I could have broken it into separate pages in a Drupal “book”, but I’ll provide some quick links for those who just want to jump to a particular topic. So the following is a brief outline of this article:
  • Some Pros and Cons of Eclipse
  • Installing Eclipse
  • Eclipse Plugins useful for Drupal Development
  • Uninstalling Eclipse plugins
  • Configuration of Eclipse for Drupal Coding Standards
  • Drupal templates for Eclipse
  • Creating custom templates
  • Keyboard shortcuts for a better workflow

29 February 2012
Florian Lorétan holds out the official DrupalCon Munich promotional beer coaster

Over the past weekend at DrupalCamp Essen, I had the opportunity to sit down with Florian Lorétan, who has been instrumental in organizing and coordinating all the work which goes into bringing the next European DrupalCon to Munich, Germany. Since the last time we’d spoken, at Drupal City (the Drupal Camp held in Berlin, September 2011, less than a month after the initial announcement in London), there had been a lot of new developments. I asked Florian to catch us up.

Lowell: I’m Lowell Montgomery from Cocomore and I’m here in the BoF room at DrupalCamp Essen, speaking with Florian Lorétan, Munich’s community representative and a co-founder of Wunderkraut, about new developments in the planning of DrupalCon Munich. So what’s the latest news, Florian?

Florian: There are a lot of things going on right now. One of the big things we have on our plates right now is just making all these developments communicable. There’s a lot of work being done on the website, both on content and also on making the content look good — so it’s styling all the content types, different views, new content types, different blogs — and making sure that the sponsors get the attention they deserve on the website and also preparing for the session poll results which will open in a few weeks. One of the things that needs to be communicated are the featured sessions. We have some very exciting speakers coming from the outside — some very exciting topics, too. This is not completely final; but we do have some sessions which are confirmed, so this will probably be going up on the website in the next couple of weeks.

Lowell: So before DrupalCon Denver, then?

Florian: If it’s ready before DrupalCon Denver, we’ll put it on the website then, but at the latest it will be there at Denver.

Lowell: And you mentioned that the sponsor slots are pretty much all filled?

[…] For Munich, we still have Silver (very limited), Bronze, Sponsor Lunch, Sponsor Coffee Break, Sponsor a contest (like Tropo's hackathan or Twilio contest) [ … ]
Megan Sanicki, from email update, 29 Feb, 2012

Florian: All the top ones are sold out; Diamond, Platinum, Gold, and I think Silver, too, is sold out. The day stage sponsors, the beer garden sponsor, the coffee sponsor; are also given away. With Wunderkraut, we’re also happy to get the contribution lounge and contribution sprint sponsorship slots, which is something that fits for us, but it’s also a one-of-a-kind sponsorship of our community. I think that it’s been going very quickly; we weren’t expecting things to go that fast. Megan Sanicki is responsible for all the finances and sponsorships for DrupalCon and she’s has been doing a fantastic job at it. I think it’s really great that the sponsors have shown such incredible enthusiasm. I think it’s an indicator of how much interest there is in the conference and I hope that the attendees show as much interest as the sponsors have.

Lowell: That’s great news. But there are still unlimited Bronze sponsorships available, though, right?

Florian: Indeed there are. And it’s still a great way for Drupal-related companies to help make this an event which everyone in the community can afford to attend, while also getting good value. I’m not sure of the exact pricing and details right now, but on the DrupalCon Munich website the sponsorship packages are fully described. There may also still be some other opportunities for special sponsorships, but the opportunities for getting a booth or table are getting very limited, if not completely sold out.

Lowell: So one thing I really wanted to ask you about is: how can people who aren’t already involved in the planning do something to help make sure this the most awesome DrupalCon Europe to date?

25 February 2012

What makes a memorable Drupalcamp

A group of us Cocomore Drupal developers and themers have taken a weekend trip to attend DrupalCamp Essen, 2012. The venue is the Unperfekthaus, an interesting, artsy building which feels like a hip café spread across several stories of a building — but is also part hotel, part restaurant, part art studio/gallery, and part club. Some rooms are furnished with sofas and there is a top-floor room illuminated by natural sunlight, at least during the daytime, with a translucent glass ceiling, like a greenhouse, covering most of the room. Mirrored disco balls and lighting offer proof that hosting a couple hundred geeks is not the most glamorous use the room gets. This is our primary session room. The other “second track” room is a “performance hall” with a stage area and no windows; the presentation slides are easier to see, but people are less likely to hang out and socialize. And there are other rooms where community discussions and BoFs are being held. All in all, it’s a comfortable, cosy environment — a good choice for an event with a bit fewer than 200 people — and lends a unique atmosphere to the event with plenty of space for more intimate conversations rather than simply presentations. morning-greeting-drupalcamp-essen-2012_img7063.jpg

With the Drupal community growing as large as it is, the irony of the success of this event, in part due to the pleasant venue, is that had the event been promoted much at all, especially to regions outside Germany, there would have been too many attendees to support such a venue. Even the larger DrupalCamps are still able to use less “corporate” locations, often at universities or similar sites, and can be more flexible about scheduling and run with a bit less rigorous planning — all of which is not to say that a lot of work didn’t go into the organization of this event; it clearly did and is much appreciated by the whole local community, many of whom are also currently actively involved in all the lengthy steps of organizing the fast-approaching European DrupalCon 2012, coming to Munich in less than 6 months now, with attendance likely to be at least an order of magnitude greater than this DrupalCamp’s, many more “tracks”, and a duration more than double that of this weekend-long DrupalCamp.

Using cTools plugins to enrich a ‘Hello World’ module

The first session I attended (in German) was presented by Ricardo Kelling, of Comm-Press, about developing modules which leverage the power of cTools. Of course I was aware of cTools since Views and Panels, both of the popular modules written by the prolific Earl Miles (aka merlinofchaos on Drupal.org), have now been abstracted to move common functions into it, so cTools is now a requirement for their use. And of course I knew cTools offered a developer API to allow others to take advantage of these useful functions. But I’m still a relative n00b when it comes to the coding behind Drupal, so it was good to just get an overview of what is available in cTools (a lot!). Of course a 45-minute session is not enough to cover more than the most basic of concepts (Ricardo demonstrated using cTools plugins to create a simple “Hello world” block which had multiple language versions, each of which could be independently selected and edited), but it’s left me inspired to take some time to explore the API in greater depth.

21 February 2012

Story header graphic logos associated with the Drupal 8 initiatives

I was already planning to provide an overview of what’s been going on in the various Drupal 8 initiatives even before last week, when Dries announced the timeline for Drupal 8, which includes a “feature freeze” for Drupal 8 in only a little more than nine months from now, and planned release at the DrupalCon Europe, in late August 2013.

Drupal 7’s Plateau of Productivity?

I think we reached the Plateau of Productivity for Drupal 6 sometime in late 2009, about 18 months after its release. At that point there was no advantage to developing in Drupal 5, and Drupal 7 was still a long way off. --Dries Buytaert, June 8, 2011 (about 5 months after Drupal 7’s release)While most of the top Drupal 6 modules are now available, in some state or another, for Drupal 7, and I would certainly choose Drupal 7 for a large Drupal-based project that is not expected to be deployed for some time, from the outcry of protests I think there are a lot of people who would not agree that Drupal 7 is yet at its Plateau of Productivity. I would choose development in Drupal 7 for most projects, but there is still plenty of reason for site builders to work with Drupal 6, especially if they need particular features (e.g Nodewords / Metatag functioning properly, among others) and if they need to deploy the site now, with those features ready for use. Dries indicated that he thought Drupal 6 reached its Plateau of Productivity in late 2009, about 18 months after its initial release. At that point, there were fewer than 20,000 sites using Drupal 5 and more than 200,000 sites using Drupal 6. While this order-of-magnitude-greater-usage is not likely to ever be seen comparing Drupal 7 vs Drupal 6 usage (at least not before Drupal 8 is released), I do think that it’s significant that Drupal 7 usage has finally overtaken Drupal 6. That said, I don’t think we are truly at Drupal 7’s Plateau of Productivity, the point where building a new site on Drupal 6 would be “pointless”. Both in terms of time-after-release and usage statistics, it is arguably premature to say we are quite to that point yet.

Quibbling aside, I also don’t think it matters whether we believe we have reached the Plateau of Productivity for Drupal 7, or not — and it certainly doesn’t matter whether we are all in agreement about that. I do think Drupal 7 is very “ready for use”, though and I do think we are ready to see core development for Drupal 8 get kicked into high gear and I don’t think it will significantly delay the development of certain lagging contrib modules or resolving core issues in Drupal 7 which are the final barrier, in my view, to truly reaching its Plateau of Productivity. Additionally, many of the fixes and features going into Drupal 8 are regularly being back-ported to Drupal 7, and there is increased discussion of relaxing the criteria for what can be back-ported to Drupal 7, so I see the increased attention to Drupal 8 core development as exciting: a win-win for the whole Drupal community. We now have a release date for Drupal 8, which is important for business decisions, and a better timeline to facilitate a roadmap for the final stages of determining feature inclusion.

Drupal 8 Core Initiatives

Currently there are 6 official Drupal 8 Core Initiatives which are working on various aspects of desired improvements to core. There are others likely to be added to the list as soon as a bit more progress has been made on the current list and/or as qualified individuals step up to take on some of the other “top 10” desired improvements we had on our collective community wishlist. Some of the improvements require fixes to issues plaguing Drupal 7 and 6 and have been backported. Most of the others involve dozens, if not hundreds, of related issues. Following is a brief summary of each of the current core initiatives and what their priority goals are for Drupal 8. In the interest of brevity, the explanations leave out a lot of juicy details, but for those who haven’t been paying close attention and who might like to get involved, I hope this summary is useful:

Web Services and Context Core Initiative

The Web Services and Context Core Initiative (WSCCI, pronounced “Whiskey”), formerly referred to as the “Butler” project, is a core initiative led by Larry Garfield of Palantir.net, aka “Crell” on Drupal.org. While the traditionally typical HTTP request has been for HTML pages, the modern Web has brought with it the need for HTTP services which deliver information which is not necessarily in the form of HTML. This is especially true for mobile applications, but also applies to feeds and other communications via HTTP. The goal is to “take Drupal from being a first-class Web CMS to being a first-class REST server which includes a first-class Web CMS”. Really, this initiative spans a huge range of related issues and without writing an article many times the length of this one, I could not possibly cover everything, but…

03 February 2012

While this article focuses primarily on the state of Drupal “contrib” (modules and themes which are not part of the “core” Drupal download), it also takes a look at the greater “State of Drupal” in terms of sites known to be running on some version of Drupal, comparisons of the rate of uptake after Drupal 6 and Drupal 7 release, and a small case study involving attempting to perform a “major upgrade” from Drupal 6 to Drupal 7 on a site using a significant number of contributed modules.

The recent history of Drupal core usage

dries-quote_drupal-growth.pngAs a starting point, I think it is helpful to look at the recent history of Drupal core usage and compare the uptake of Drupal 6, after its release, with the uptake of Drupal 7. On June 22nd, 2008, when Drupal 6.0 was released, there were already significantly more sites using Drupal 6 than Drupal 5 (almost 32,000 on Drupal 6 vs almost 17,000 on Drupal 5). Both core versions of Drupal steadily gained users for a time, with Drupal 5 reaching a peak of about 24,000 sites about 7 months later, but by that time Drupal 6 was running on more than 100,000 sites. By late July 2009 (a similar point to now in terms of months after the major version release), Drupal 5 usage had dropped to about 20,000 sites and Drupal 6 was running on more than 160,000 sites; more than eight times as many installations. Since then, Drupal 5 usage has tapered to about 7,000 sites; a bit more than 1% of total Drupal usage (please note: it’s likely that many of the existing Drupal 5 sites do not report usage back to Drupal.org).

Now let’s look at the usage of Drupal 6 and Drupal 7 since the time of Drupal 7’s release. Drupal 6 peaked with about 355,000 sites, shortly after Drupal 7’s release in January 2011. At that time Drupal 7 was running on about 24,000 sites, a fraction of Drupal 6 usage at that time. Since then, while sites running on Drupal 7 have steadily increased to their present values, about 280,000 sites, Drupal 6 has hovered around the same value, drifting between about 320,000 and 350,000 sites, but not yet significantly dropping. Almost 13 months after Drupal 7’s official release, we still have more sites running Drupal 6 than Drupal 7 (and I suspect that a significant percentage of the Drupal 7 sites are in development rather than production). But what does this really say? Let’s look a bit closer at the numbers and trends:

Note: I banged this graph out in Excel since the Google chart of Drupal usage, normally displayed on project pages, seems to fail as “too large to process” for “core” usage statistics.

drupal_usage_june-2008_to_jan-2011-sm.png

Drupal usage has grown by leaps and bounds since Drupal 6’s release. In June 2008, there were fewer than 50,000 sites using Drupal 5 and 6 combined. Now, a bit more than three-and-a-half years later, there are more than 615,000 sites running on some version of Drupal — more than a 12-fold increase in that time period! A year ago, this figure was less than 400,000, so Drupal 7 sites make up a large proportion of the more-than-200,000 Drupal sites added since then. The growth was steeper after Drupal 6’s release, but we still did not have 200,000 sites, total, by July 2009. In any case, it’s safe to say that for most use cases, we have the modules necessary to build a good site based on Drupal 7, so if you are hesitant to use it, don’t be. There are many great advantages to Drupal 7 and with the continual improvement of the contributed modules, we should probably build new sites on Drupal 6, only if modules critical to the use case are lacking for Drupal 7 (or if the “new” site is another site in an existing Drupal 6 “multi-sites” installation). Even if a “critical” module exists for Drupal 6 and not yet for Drupal 7, it may still be worth building the site on Drupal 7 if you have the coding experience to port the Drupal 6 module to Drupal 7, which would help alleviate the current issue that many significant modules are not yet available for Drupal 7.

State of Drupal 7 contrib (modules)

Good news: Almost all “Top 100” Drupal 6 Modules are ported to Drupal 7

state_of_top_100_modules-sm.pngThe good news, especially for site builders creating a new Drupal 7 site, is that most of the top 100 modules are ready for use on Drupal 7. Nine of them are redundant (now included in “core”), 43 have “stable” releases, 23 have beta or RC, 11 have an alpha release, and 9 are in “dev” status, while a couple others recommend using another module which performs similarly.