Media

RDF in Drupal: Super-Simple Primer

Published June 17, 2009

If you've read the first couple of installments of this series, you should have a pretty good idea of what the "semantic web" is by now. By providing precise meaning to a site's content, applications can take advantage of these machine-readable hints to link data together across sites in a myraid of ways. Before you jump in the deep end of the semantic web pool, there's a few more things you should have a clear understanding of. As I previously defined, RDF stands for Resource Description Framework . This is a family of standards for describing content on the web. The vast majority of current and future Drupal implementations of RDF are actually RDFa ( Resource Description Framework in Attributes ), a set of extensions to XHTML. RDF is normally implemented using XML; while this is possible with Drupal, RDFa allows Drupal to implement RDF as part of the standard content displays.

RDF in Drupal: Benefits to Casual Web Surfers

Published June 16, 2009

Even if you're not ready to implement RDF into your Drupal site, there's still a number of reasons why you should be excited about the Semantic Web. The fact that data will be linked from web site to web site (regardless of the underlying technology running the site) will lead to powerful Semantic Web applications - most of which haven't even been imagined yet. First and foremost, search will be revolutionized. Imagine being able to search for a specific person - not just the person's name. This is a subtle but important distinction. Currently, when you type "Dave Matthews" into your favorite search engine, the results you see are based on the words "Dave" and "Matthews". You'll see results about Dave Matthews, about people with the name "Dave" and/or "Matthews", about the orgin of the words "Dave" and "Matthews", etc... The search engine doesn't know that you're looking for a specific person with the name "Dave Matthews". With the Semantic Web, you'll be able to specify, "find me the person with the name 'Dave Matthews'". You'll even be able to perform "deeper" searches by specifying things like "find me all events having to do with Drupal taking place between now and July". Other than search, the Semantic Web will also provide you with the ability to do stuff with this data. For example, let's say you perform the Drupal events search from the previous paragraph and you're looking at the results. Because the data returned will have meta-data attached to it, future software tools will allow you to click on a returned event, and see if you're available on that date and time. If so, another click will seamlessly add it to your calendar. If you're familiar with Mac OS X , it's like data detectors on steriods. Really good steriods.

RDF in Drupal: What is it and Why Should We Care?

Published June 15, 2009

RDF. Semantic Web. Giant Global Graph. Food for Robots. By now you've probably heard all of these phrases, but relatively few of us have actually done anything with them. For example, I try to follow all the RDF modules on Drupal.org , read all the blog posts regarding Drupal and RDF but I've yet to implement anything having to do with RDF on any of the sites I develop or maintain. Why is this? Am I behind the curve? The answer is two-fold. First, I have yet to have any clients specifically ask for RDF functionality in their web sites. Secondly, I hadn't been convinced that recommending that my clients spend the time and money to implement an RDF solution is a sensible move for them. The reason I decided to research and write this series of articles is to figure out if and why I should recommend implementing RDF functionality to my clients. Prior to performing the research for this series, my knowledge of RDF was limited to water-cooler-conversation type knowledge. Big on bulletpoints, small on details. I was aware that RDF will, in the future, be used by search engines to provide better search results. I was also aware that by "tagging" web site content with RDF would enable a "richer" experience. The one example I would relay to people was a vCard -powered business card embedded on a web page using microformats that allowed the user's computer to do something with the contact information. Amusingly, it turned out that my one RDF example didn't even involve RDF, and that the vCard format was actually called hCard when used as a microformat. I had a lot to learn.

The Phantom Nodes

Published May 12, 2009

This article is also available in French from KolossalDrupal.com . I need to speak to the Jedi Council. The situation has become much more complicated. This is pretty much what I thought to myself a few weeks ago when a project I was working on presented me with an interesting problem. I had just finished importing data from an external source into Drupal when I learned that in addition to the brand-new 3,000+ nodes, we somehow also had to take into account several thousand more "aliases" for each node. Keep in mind that I'm not talking about "aliases" in the normal Drupal sense... In this case, each imported node had the possibility of having multiple titles and each title needed to be available in various Views and discoverable via Drupal's core search mechanism. It was a requirement that we didn't just duplicate node content and give each duplicate a new title. We needed "phantom" nodes.

Using Node Reference Fields with the Node Import Module

Published May 8, 2009

This article is also available in French from KolossalDrupal.com . The extremely useful Node Import module has been around for over 4 years now - which is an eternity in Drupal-land - but in recent days other newer , shinier import modules have hit the scene. While these modules certainly are useful for many applications, sometimes the tried-and-true works just fine. In this article, I'm going to show you how to use the Node Import module to import data in CSV format (comma separated values) and map that content to existing content types that include node reference, text, and integer fields - including multi-select checkboxes.

On Drupal Performance: Testing with Apache Benchmark

Published April 26, 2009

Sometimes in our lives, we all have pain, we all have sorrow. And sometimes we also have to launch Drupal sites into the wild blue yonder. It's during these times that we separate the grown-ups from the n00bs, and we see how well our site performs under heavy load. Many of us didn't need to worry about speed, page size, and server load in our younger years when we were building sites for Uncle Don and Aunt Sue, but eventually you get that big client, and you need some help. Testing your site's performance There are several ways to test, and a few metrics to acquaint yourself with. Not all metrics are created equal, but all of them are important at one time or other. In Part I of this post, you will be reading about testing with the Apache Benchmark tool on the command line.

Getting Started with the Blueprint Theme

Published April 26, 2009

This article is also available in French , courtesy of KolossalDrupal.org . When it comes to starter themes in Drupal, there are two names that seem to always rise to the top: Zen and Blueprint . This article is about the latter, and how to get started with it. So, why is Blueprint a good starter theme? First and foremost, it's incorporates the Blueprint CSS Framework , an open-source project all on its own. The framework was designed to speed up CSS development time - specifically "layout" CSS where various HTML elements are positioned on the page. It also provides "sensible typography", a stylesheet for printed pages, and other features. The "layout" aspect of Blueprint is based on a grid-based system that breaks up the page into any number of columns that are very accessible from CSS. This is where the true power of Blueprint appears. What advantage does this give you as a Drupal theme developer? First and foremost, it cuts down on your development time by virtually guaranteeing that (providing you use the Blueprint CSS as designed) cross-browser CSS "float" issues are a thing of the past. Need a page layout that breaks up an entire page into any number of blocks? No need to get the Panels module involved, it's easy to do with Blueprint. You can Panel-fy pages without all the overhead (or learning curve).

Adding Rounded Block Borders to Your Site's Theme

Published April 7, 2009

Rounded corners are all the rage - and they have been for quite some time in web design. The way they "soften" up a design make them quite attractive to designers and decision-makers. Unfortunately, implementing rounded corners in a web page is not nearly as easy as it is to implement in a mockup using an image application. When talking about rounded corners, there are 2 distinct user cases to be considered - the first is when creating rounded corners only on the top corners of an area - this is commonly seen on tabs and block headers. The alternative use case is when all four corners of an area are rounded - this is usually seen in blocks and around content areas. This article will focus on the the case where all four corners need to be rounded. The result will be a method of adding the ability to optionally apply a rounded border to any block on your site in a way that doesn't break when the block is resized. By the end of the article, you should be able to add this option to just about any Drupal theme - the relevant files you'll need are available for download at the end of this article.

Magically Disappearing Default Search Text

Published April 4, 2009

Keeping a site's design as clean as possible is something all (well, okay, maybe not "all") designers and developers strive for. One relatively easy thing that you can do towards this goal is removing the supporting (and often unnecessary) text around your site's search field. I'm talking about the "Enter search terms" or "Search this site" text that floats innocently above or next to the text input box. Is this really necessary? I don't think so. A much cleaner way of presenting a search box is with some default text inside the input field that automatically disappears when the user moves the cursor into the field.