drupal

Version Controlling your sites folder, Subversion

While at the DC DrupalCon, I was in a lecture of how to boost you Drupal efficiency through various means and tools. One of course is to have all your code in a some version control system. Drupal.org uses CVS, while many people use Git or Subversion, and there are others besides.

When using a multi-site setup, there is a need to be a bit more careful so that an update to one site doesn't affect other sites. Of course you should be using the sites folders for all the different sites in your multi-site setup (such setup is beyond the scope of this article).

One way for me to keep track of all my code is to have the main code (Drupal core and the sites/all folder) in one repository. Then place each specific sites folder (sites/example1.com, sites/example2.com.....) each in their own repository. This way you cleanly separate your code out, and prevents UPDATES from hitting more code than you want it to.

Doing this in SVN can be a little tricky, since I have gotten into crazy LOCKs and Conflicts. Here is how I did it.

  1. Checkout/Create your main repository and add the normal Drupal core, along with the sites/all folder (add in all the common modules and themes as normal.
  2. Commit this to the repository.
  3. Create empty sites folder as needed, leave empty (sites/exmaple1.com ...).
  4. Use the Ignore command on each of these folder.
  5. Commit these updates to the main repository (now all new files added to these folders will be ignored by the main repository.
  6. Checkout/Create new repositories for each of the sites folders, add your files/modules/themes.
  7. Commit each sites folder to its repository.

That is how to cleanly establish sub-repositories inside of a larger one, each exist independently of the others. Now code and commit at your leisure while as you follow the rule of always version controlling your code.

Turning off aliasing in l()

It is always a good things when a site grows large enough to worry about performance issues. With more users and longer reports, one site I regularly work on was having an issue building a reservation report page. Quickly I turned on Devel with its query log, checked the main query that builds the report, put it through EXPLAIN and optimized a few keys. But no real improvement was made.

So I looked again at the query log, and noticed that drupal_lookup_path() was being called 1000 times (as many results in the report, and yes the Project manager wants them all on one page). So I am making 1000+ individual queries to the url_alias table, each taking only a few ms, but added together it is slowing down the report.

This is what the offending line looks like:

... = l($reservation_id, 'reservation/info/'. $reservation_id);

I finally realized that I don't need aliasing on those links. They simply link to the information page of a particular reservation (reservation/info/34038) which will never, and should never be aliased.

Now my code looks like:

... = l($reservation_id, 'reservation/info/'. $reservation_id, array('alias' => TRUE));

A months worth of data now renders in seconds, instead of over a minute.

DrupalCon SFproposal support

It is surely time to bring the North American DrupalCon back to the West Coast. Visit the DrupalCon San Francisco proposal page and express your support.

And grab a badge while you are there.

Hosted Memcache??

Gear6 is creating a hosted memcache layer, http://www.gear6.com/web-cache/overview/scale-your-web-site-applications..., that may help bring memcache to sites that don't want to set up their own memcache servers. They are hoping that be a capacity player for large companies that already have memcache server farms, as well as opening up this technology to new, mid-tier websites. I am hoping this and other like services will quickly be assimilated into the network of Drupal integration modules for performance.

And by the way, the corporate and Gear6 Community sites were built with Drupal.

Flying out east for DC Drupalcan

Though Washington DC isn't as far as Boston from the SF Bay Area, the travel time will be longer with a stop over. But the North American DrupalCon is always worth the travel. Head over to the schedule to work out your days there.

While I am there one goal is to seek out people who are considering Drupal/iPhone app integrations. http://www.zivtech.com/blog/simplest-drupal-iphone-app is a start and I hope to see more progress one this front.

DrupalCon already filling up

So I was on the DrupalCon Twitter feed, waiting to grab a half off ticket for the first 100 registrants. Kept refreshing, waiting for the announcement to sign up. Then I was distracted by a question on IM, came back in 10 minutes and missed it. All 100 spots taken in the first 10 minutes.

Oh well, I still got in at the $175 rate. Glad to know that there is this much excitement five months out of the next DrupalCon (March 4-7, 2009). Sign up at http://dc2009.drupalcon.org/ and start submitting and reviewing session proposals.

Drupal gets UserFriendly!

The User Friendly comic strip has been around over 10 years as fun take inside the world of an IT firm. But now the author the UserFriendly comic has teamed up with Manning Publications to illustrate its new Hello! Series of books, of which Hello! Drupal will be an early release. The first chapter is free online, so you can see what illustrations may look like (early draft).

It is good to see more publishers taking on Drupal books, as Manning is hoping to get two out the door in early 2009, and O'Reilly is publishing Using Drupal. And of course Apress and Packt Publishing continue to push out Drupal books and Prentice Hall is evening getting into the mix with Front End Drupal.

AboutAirportParking.com - Drupal turns a business opportunity into Reality

A new case study has gone public concerning the making of About Airport Parking.com. It is true that AboutAirportParking.com will not be the next world changing website, but is a clear example of how Drupal can bring commercial ideas into reality quickly and efficiently.

Read the case study at http://drupal.org/node/308875 which has the following highlights:

  • Drupal used to solve commercial opportunities
  • Module Highlights - How it was done
  • To CCK or not to
  • API references - More on some customizations and how we did it
  • Continued Development opportunities - Plans for the future

Hopefully the reading is enjoyable, and the information is useful.

Didn't make it to DrupalCon Szeged, no problem

Many like me couldn't make it to the DrupalCon in Szeged this last week. But there is no reason not to partake of the great sessions and keynote speakers. All the videos are now posted on the main session listing page. For many other sessions, the slides are attached.

Thank you to all of you videographers who took the time to setup up the cameras.

Hello! Drupal Announced

Through many crazy paths and a book proposal that some have seen already, I am embarking on writing Hello! Drupal for Manning Publications, the creator of the popular 'In Action' series. Manning has an Early Access program where some of the unedited chapters are available for free, and all chapters are available to anyone who pre-orders through the site.

Currently Chapter 1, 'Drupal, A Hammer that hits many Nails' is available to the public. I also plan on writing many tutorials here as well on the Handbook pages that intersect with the material that will be found in the full book.

Manning also said they can setup a direct affiliate program earning 15% of sales for Drupal.org and any partners who buy through the Drupal.org affiliation.

At the Sunnyvale 2007 DrupalCon, there was a conversation about the competitive and complimentary nature of the different OS CMSs out there (Drupal, Joomla, Wordpress...) and how through all the efforts the complete solution space will be search out. In the same way the more books that are being written about Drupal, the wider the reach for readers, regardless if some of the books overlap in content around the edges.

Hello! Drupal will be an introductory book, that assumes no Drupal or developer experience. A book for the unskilled technology enthusiast. Not everyone has the time or budget to make an awesome Warner Bros. Records kind of site, as there are plenty of mom-pop stores, independent authors, churches, local charities and bloggers who want more than a blog who can leverage Drupal to create their first web presense, and this book will help them do that.

I believe that Drupal covers a great and growing swath of the solution space for CMS/CMFs, and likewise this book will broaden the user base of Drupal for many first-time website builders.

From the Manning announcement page...


Drupal.org, the official home of Drupal on the web, describes Drupal as an "Open Source content management platform." That's a really boring description for a really cool piece of software.

How cool is Drupal?

  • FastCompany.com uses Drupal to react automatically to reader behavior and present the most relevant news and features.
  • Popular Science magazine uses Drupal as an online publishing platform.
  • Yahoo! and AOL use Drupal for internal websites because of its flexible permissions system and user-friendly content updating features.
  • Amherst University uses Drupal for a public-facing website and academic support services that add to classroom and distance-learning experiences.
  • MTV, Sony, and Warner Brothers use Drupal for sites that blend rock-solid content management with advanced multimedia.

Whether you have a full staff and a bottomless budget like MTV, or you're just starting your first website, Drupal is a great way to bring your ideas to life. Hello! Drupal will help you get going, fast.

Hello! Drupal is a fun, engaging tutorial that introduces Drupal and shows you how to build Drupal-powered sites quickly and easily. This friendly, fully-illustrated book starts with the absolute basics for the new Drupal user—setting up your computer to use Drupal, building your first pages, creating user accounts, and so forth. By following a series of interesting examples, you'll learn to manage both small and large blocks of content as well as how to add navigational features like tags, menus, catalogs, and search.

With the fundamentals well in hand, you'll learn to build rich interfaces that include color, motion, and sound. You'll also pick up valuable techniques for building and supporting user communities. Along the way, you'll find out how to participate in the large community of Drupal users around the world.

Hello! Drupal is for readers with little or no experience with Drupal. If you've done websites using another technology, this book will help you use what you already know in Drupal. If you're brand new to the web, Hello! Drupal is a great place to start your adventure.


Syndicate content