To explore the tech world, though mostly focusing on web development, Drupal in particular.

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.

Mentioned in the Sacramento Bee

I was recently interviewed for an article in the Sacramento Bee, http://www.sacbee.com/101/story/1217660.html concerning our Dog Parks site. It is always nice to be recognized for the hard work my wife and I have put in.

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.

Syndicate content