In this post, we describe some of the issues facing large or complex software projects using Drupal's CCK content type extension facilities. We then propose a remedy in the form of CoCKTaiL, a high-level language for CCK types and associated UI elements and relations. Tools and potential applications will be described in future work.
IntroductionDrupal's Content Construction Kit (CCK) is a powerful feature, much loved by Drupal developers, who use it to rapidly define data types and relations for applications. Using a UI, developers can easily create new content types by specifying fields, UI widgets, relations, and more.
The ability to interactively create new types and supporting UI's is a great timesaver in the early stages of many Drupal development projects.
For larger projects, however, the nature of the design and implementation process for CCK types leads to difficulties in evolving and maintaining projects which include CCK components, and these difficulties contribute to the lifecycle cost of large Drupal applications.
While it's a bit late and almost the entire readership of my blog already knows this, last week I gave an interview to Jeff Robbins of Lullabot, for podcast #58. I hadn't been on the Lullabot podcast since the very first one, and that time it was an interview at Vancouver that wasn't quite as comfortable.
At last night's DBUG meetup, I gave a presentation about RESTful Web Services and Drupal. It's the first time I've given that presentation and it was still a little rough.
With about 15 people in attendance and nary a snore to be heard, I consider the presentation a success, espite having a nasally voice and a sore throat that caused me to stop for frequent sips of hot tea.
There's a lot of room for improvement in that presentation, though, much of which I realized while I was talking. Next time I give the presentation, I'll have had more time to prepare and I should have a fully-functional web service to demo plus a few other goodies to show off.
I've attached a PDF of the slides I used for the presentation for anyone interested.
The other day we had a discussion on #drupal about the speed of various foreach constructs and webchick said I should blog this. First of all, let me give you a crash course on PHP references. Imagine variables values as drawers and names as labels on the drawers. One drawer can have more than one label and that's what we call a reference. So when you write $a = &$b then PHP slaps a label on the drawer that holds the value of $a. Now, if you unset($a) then PHP removes the "a" label from the drawer, however the "b" label is still on it.
The winners of the 2008 Knight News Challenge were announced, and they are a fascinating group.
Read Ben Melançon’s Millions headed Drupal’s way for a good overview with relation to Drupal.
I was fascinated to read The WSJ interview with Alberto Ibarguen, Knight Foundation president and CEO. The following is his answer to the first question asked by WSJ’s Tom Weber:
Buzzwatch: What did you notice about the focus of entries this year compared with last year?
Mr. Ibarguen: We jumped from 1,600 applications to more than 3,000, with roughly half from overseas. And we had many more applications from young people, which we had particularly targeted.
A couple of weeks ago we announced a Drupal module, then this week I spotted another Piwik module being developed by Hass. I immediately sent the following contact message
Last night we migrated our Linode for Gamers With Jobs to a new Xen VPS and we've noticed a significant performance boost. We did, however, start encountering a random issue with segmentation faults in Apache. If you haven't seen this happen before, it tends to begin innocently with one Apache process dying, and therefore giving errors (usually WSOD), but quickly balloons into dozens of dead processes. It essentially hoses Apache.
Apparently the issue is due to eAccelerator, so I reinstalled it and cleared its caches in the hope that it might limit its occurrence. Just in case, though, 2bits has a great fix for it, using the logwatcher script by Firebright, Inc. I was able to quickly get it going, and the only difference is that I used the Debian init.d script provided by Derek Laventure to run it.
I will soon (hopefully within the next 2-4 weeks) be releasing Kupo. This will be my first publicly available Drupal theme via drupal.org.
I know that testing of Drupal themes and modules is generally an iterative process which happens once the theme or module is available for download, but thought that it made sense to catch any blatantly obvious problems before an initial release.
So, please feel free to click around the new theme and let me know what you think and/or find.
Trellon is one of the sponsors of the third annual DrupalCamp Toronto, which will take place on May 23rd and May 24th at the Faculty of Information Studies on the University of Toronto campus (map).
Live from the Interactive Media Conference in Las Vegas, the John S. and James L. Knight Foundation's News Challenge announcements looked a little like the Drupal show. It may not be millions of dollars, but millions more people are likely to be using new local, cutting edge community news Drupal sites within a couple years.
Among the winners:
Other projects may well use Drupal, and they are all amazingly awesome in any case. The caliber of people this round may be indicated by another winner, with Martin Moore, Sir Tim Berners-Lee, who uses Drupal to blog. And he did some other thing about inventing the World Wide Web.
David Goode is a new addition to Development Seed and to the Drupal community. He'll be working with us this summer until he goes off to college in the fall. I think we'll be able to make him a full Drupal convert by then : )
One module that has frequently been put forward as a candidate for improvement in Drupal is the search module. Two reasons for this are its ranking system, which can be less than ideal, and its tendency to bog sites down and slow load times since it indexes and searches on the same SQL database that the site uses for all other operations. However, there is another option that's available to Drupal users: Solr. Running on its own Java daemon, Solr is a well-established, fast, and powerful indexing and search implementation accessed over HTTP. What it isn't is fully integrated with Drupal - yet.
Recently I have come across several creative Drupal related movies that I decided to share. If you have any others feel free to comment.
Recently a client asked for a simple yet flexible and scalable solution to modify the user profile output for a particular role (client is using the profile module). The client also wants to grant this role full html privileges with certain profile fields.
I finally found some time to commit the "big pile" of shareomatic module code into the Drupal CVS tree.
I must say that I was positively surprised by the release process one has to go trough in order to release a Drupal Module. It reminded me of the release process we use internally :)
It's so nice to have many theming sites. Provided they are Drupal themer sites:
Although some of their demos have the "Mambo license" menu item running, which is quite frankly not a testament to their understanding of Drupal. However, starting off from a ported theme could still be nice, those buying Drupal themes might not want to fiddle as much customizing the theme further.
However, starting off from a ported theme, with invalid xHTML and almost none of the detail will give you frustration and the customer service would be better off noneixsting because then it'd be at least clear what's on. There is one thing to do with TemplateMonster: avoid. Support those who work with Drupal, for Drupal!
I've been doing some statistical analysis of Drupal sites in preparation for a new site I'm launching. The results are very interesting. Here are some version statistics, based on 1,370 Drupal sites with accessible changelog.txt files.
In case you're wondering about the freshness of this data, the majority of sites surveyed were launched in the last 12 months, including sites published as recently as 2 weeks ago. The version numbers recorded reflect the Drupal version the site is running today.
The URLs were collected from DrupalSites.net, the largest public database of Drupal sites. Their list is constantly updated with user-submitted sites (with more than 1000 new sites added in the last year), and in theory, should be statistically neutral, as the motivational factor for publicizing a site is not dependent on which version of Drupal you use.
I have verified these results against some creative Google searches, and the numbers correlate very well. I have high confidence in the accuracy of these numbers as an overall representation of the Drupal install base.
Looks like people are finally realizing the enormous business opportunities lying in doing themes for Drupal sites. There is the http://www.topnotchthemes.com/ team building truly nice themes with support for common modules, knowing Drupals ins and outs.
At the same time http://www.templatemonster.com/ is picking up Drupal in their CMS section, selling Drupal themes for all kinds of focus areas. Although some of their demos have the "Mambo license" menu item running, which is quite frankly not a testament to their understanding of Drupal. However, starting off from a ported theme could still be nice, those buying Drupal themes might not want to fiddle as much customizing the theme further (update: and there are possibly other problems my soft blogging style did not uncover here, see: http://www.drupal4hu.com/node/146 and http://www.drupal4hu.com/node/141 for notes).
Working on a site using the jstabs module this evening I came across a bit of a challenge passing named anchors to the #redirect element of a form. The desired url for redirection in this case was /user/myuser#profile-tab-7.
Asking in #drupal led to the following tidbit from chx. (This is one of the many reasons Drupal is wonderful since Google searching didn't produce results and my experiments and requests of friends didn't produce the answer.) Anyway the challenge is that #redirect causes the form to call drupal_form_redirect() which in turn calls drupal_goto(). The drupal_goto() function takes the path, query and fragment as it's first three arguments.
drupal_goto($path = '', $query = NULL, $fragment = NULL, $http_response_code = 302)
How then to pass these from #redirect. Putting the values in a string doesn't cut it as the special characters end up getting encoded in the URL and it doesn't work. The answer chx pointed out is to use array() to pass the values. The resulting code ends up looking like this:
$form['#redirect'] = array('user/' .$user->uid, NULL, 'tabs-profile-7 ');
On May 27 and 28th, the third NetSquared will take place in San Jose California. The idea behind NetSquared is to explore the use of the Web and emerging technologies to foster social change.
Our mission is to spur responsible adoption of social web tools by social benefit organizations. There's a whole new generation of online tools available – tools that make it easier than ever before to collaborate, share information and mobilize support. These tools include blogs, wikis, RSS feeds, podcasting, and more. Some people describe them as "Web 2.0"; we call them the social web, because their power comes from the relationships they enable.
I have been asked to present on Drupal as it relates to social change and the non-profit community. My background is heavily rooted in the non-profit world, having worked for various arts based non-profit companies. I also studied arts, technology, theatre, and non-profit management at Virginia Tech. My presentation will occur on the 27th between 4:45 and 5:45 pm.