Looking for good times at Drupalcon DC

<a href="http://dc2009.drupalcon.org/?ref=default"><img src="http://www.bywombats.com/files/badge_basic.gif" alt="" title="" align="right" style="border:0px;" /></a>I'm guessing I'm not the only one <a href="http://dc2009.drupalcon.org/attendees?keys=&tid=428">looking for good times</a> at next year's <a href="http://dc2009.drupalcon.org/">Drupalcon in Washington, DC</a>. If you'd place yourself in that category and aren't using your profile to look for something a little more substantial, why not join the crowd?

Seriously, I can't wait to hit up the conference once again and meet up with "the regulars" I can successfully spot in a crowd. Judging by the speed of registration this early in the game, I imagine picking a few familiar faces out of a crowd might be all I spend my time doing!

In between people spotting, the Ubercart team will be there to spread some Ubercart love and continue to build relationships within the community. There's plenty of work to be done and, for those inclined, work to be had. After hours I might just have to run around town to visit the bits and pieces of my family in the area. While I'm hacking on Drupal, they're hacking on wireless networks and government contracts. I'm willing to bet they haven't been to a party like Drupalcon, though. <img src="http://www.bywombats.com/sites/all/modules/smileys/packs/example/cool.png" />

Kudos to the team behind the site, as it's one of the sharpest Drupal sites I've visited.

Defining Classes in Modules "Leanly"

Through some personal development efforts and work on Ubercart, I've been confronted lately with how to best use classes in my Drupal modules. For this post, I'm really just curious how others are defining and using classes in their modules and if the "lean" approach I've outlined below is reasonable. (i.e. Is what I'm doing to ensure Drupal loads less code even worthwhile?)

The general idea I'm following is that I want as little unnecessary code to be in my .module file as possible. To that end, I'm following Drupal's core practice of using .admin.inc and .pages.inc files to hold page callbacks. I believe Views does something similar (coupled with some auto-inclusion), and we're using this in some places in Ubercart.

Now I'm doing some experimental development on making something like a shopping cart a class. I've used a method in my FreshBooks module (w.i.p.) where I define the class in a .class.inc. So, in the module I obviously can't use $object = new ClassName();, but instead I create a small function in the .module that includes the .class.inc and passes the arguments on to the constructor when it creates and returns the object. From there on out it's using an object like normal.

This means I can have a thousand lines of code tucked neatly into a .class.inc file that needn't be loaded and parsed on every page request... just those where the class is actually needed. It also helps me personally to isolate all this code in a single file when developing/debugging. It seems like this segmentation would provide a performance boost, but I don't know what sort of tests to do to establish that. Should I just assume less code loaded is better? What about the require_once() bits from Rasmus' Drupalcon session?

What about possible pitfalls? Another module can't simply extend my class right off, but it could just as easily include the .class.inc before trying to do so. Would the hassle and file access outweigh the memory difference? Thoughts?

Article declares Ubercart part of "A new breed of open source shopping carts"

I got a Google Alert and an e-mail from Wim Mostrey upon returning from lunch today both linking to <a href="http://www.internetnews.com/ec-news/article.php/3773621/A+New+Breed+of+O... article</a> posted on the IT news site <a href="http://www.internetnews.com">InternetNews</a>. The topic of the article is open source shopping carts, and the author reviewed <a href="http://www.ubercart.org">Ubercart</a> alongside of <a href="http://www.prestashop.com">Prestashop</a> and previously <a href="http://www.magentocommerce.com">Magento</a> as part of a new breed of carts. As you might guess... that makes me happy. <img src="http://www.bywombats.com/sites/all/modules/smileys/packs/example/smile.png" />

The Ubercart "brand" continues to stand up independently while at the same time spreading awareness and good karma for <a href="http://drupal.org">Drupal</a> through non-traditional channels like this article and the recent nod in PC Magazine. The review was pretty encouraging, and the author managed to relate the back story of Ubercart quite well without having to consult me regarding the oft confused tale.

What's more, a good majority of her Ubercart review focuses on the strengths of Drupal as a content management system. She points out the advantages of Drupal's modularity and highlights several major contributed modules like CCK, Views, and Userpoints. I'm grateful yet again for the strengths of Drupal as a base for an e-commerce suite.

<a href="http://www.internetnews.com/ec-news/article.php/3773621/A+New+Breed+of+O... out the article</a> if you feel inclined and post your feedback here.

Stopping Spam with Mollom... woohoo!

Ahh, the sweet taste of freedom. Or is that the aftertaste of my strawberry/pina colada smoothie? No matter. I've kept a blog for a couple years now. I'll be honest - at first it was just so I could write little stories about the girl I liked (who is now mi esposa). Now I do it to spread some Drupal love, and my wife laments the absence of posts about her.

As the blog grew along with Ubercart, so did the spam. I kept a handle on it by requiring approval for anonymous comments, but those days are behind me. I finally got around to touching up the site and added in <a href="http://mollom.com">Mollom</a>. It hasn't disappointed me yet! I can look in the logs and see the dozen or more spam comments it stops a day. So far no legitimate poster has been turned away, and the spambots are cowering in fear.

<img src="http://www.bywombats.com/files/blog_images/Photo%2097.jpg" width="300" />

Now Walsch (the grey one...) guards my house from unwanted guests and Mollom guards my blog. I can finish my smoothie in peace... and spend my time writing modules instead of dealing with spambots. Now to get it stopping contact form spam on Ubercart.org...

Pages