Feb 10

Weekend Links

A few bits and pieces that have crossed my browser in the past couple of weeks (though mostly sifted through yesterday).

The NoSQL (or LessSQL) movement has garnered a lot of attention over the past few months, but numerous people have pointed out that MySQL can be adapted to cover many of the most common use-cases. Flickr’s Kellan kicked off a series of posts on that topic with Using, Abusing and Scaling MySQL at Flickr and Richard Crowley responded with OpenDNS MySQL abuses. On the other side of the coin, Luke Melia has a write-up of how he uses Redis to build a “who’s online now list” and Sean Cribbs’ (fairly convincing) Why Riak should power your next Rails app is worth a read even if you’re not a ruby developer.

It’s good to see that the twitter engineering team have started blogging. They’ve also extracted and released the code they use to extract key terms from tweets (links, @replies, etc).

Thanks to Ajaxian I spotted Plupload – “a generic component that allows you to create a rich upload experience on the back of a variety of transports. Whether it be HTML5, Gears, Silverlight, Flash, BrowserPlus or normal forms, you can get an upload experience with drag and drop, progress, client side image resizing and chunking.” The file upload experience is one clients are constantly asking me to improve, so this could come in very handy.

There was a flurry of posts this week about whether web designers need to know HTML, with a number of good contributions. Elliot Jay Stocks kicked things off and I principally noted contributions from Mark Boulton and Rachel Andrew. It seems that the key is that designers need to understand the capabilities and constraints of the medium, and having a basic grasp of HTML and CSS is a quick route towards that, though as Mark points out there are plenty of others.

From Mobile World Congress comes a projection that “cell phone subscriptions [are] to hit 5 billion globally” this year, and 1 billion mobile broadband subscriptions. Another MWC announcement Vodafone’s launch of the “world’s cheapest phone” puzzled me. At $15 it’s $5 more than the phone I bought during our last trip to the US.

I use god on a number of servers to monitor the various moving parts of my apps. For the most part it does a good job and recent patches that squash a memory leak have been very helpful, but it sounds as if Bluepill might be worth a look as a possible alternative. Hugo Bara├║na has written up a tutorial on monitoring delayed_job using it.

May 08

Book Review: Learning Website Development with Django

Reviewing The Definitive Guide To Django a few months ago I noted that the key place that book lacked was in examples. As befits the work of the creators of a framework, it did very well at explaining the underlying philosophies and working through all manner of implementation details, but it wasn’t the book for those who just want to dive in and build something. If that’s how you like to use technical books, then Learning Website Development With Django may be more what you’re looking for.

Following the iterative development of a delicious/digg hybrid social bookmarking application, Ayman Hourieh’s book moves quickly through a range of Django features, from setting up your initial models, and using the built in user and admin sections, to supporting AJAX with jQuery, speeding up your app with caching and (briefly) writing automated tests. The pace is fairly measured and Ayman Hourieh does a good job of explaining what’s going on at each step. An experienced web developer should find most of the information they need to get up and running with django, ready to get to work on their own apps.

Perhaps appropriately, where this book is lacking is in explaining how the different parts of the framework fit together. There’s plenty you can pick up by inference, but there are no detailed explanations of, say, the routing system that maps URLs to code. This book’s weaknesses are the former volumes strengths, and while you’ll find much repeated between them a combination of the two is likely to be a good way to get a fully rounded sense of what django is and how you can use it.

Disclaimer: I was sent a copy of this book for review by the publisher. You can find it at packt, amazon US, amazon UK and all sorts of other places.

Mar 05

And so it begins… SAJAX

It was only a matter of time before libraries emerged to make use of XMLHTTPRequest increasingly transparent to web developers. Jesse Garrett’s coining of the term ‘AJAX’ (Asynchronous JavaScript + XML) seems to have quickly caught on, and last night Anil posted on ProNet about a PHP toolkit called SAJAX.

SAJAX is a nice first generation library. It allows the developer to register functions in their PHP and then produces javascript to allow the resulting page to make use of those functions. It’s lightweight (146 lines) and easy to use. The key thing that’s missing at the moment are a couple of wrappers that would allow it to integrate with templating systems — the only output functions print the javascript directly.

I’m wondering how long it’ll be before we start to see libraries that help build complete UIs based around the AJAX approach; building classes similar to those of DB_DataObject_FormBuilder and automatically enabling AJAX behaviours for the updates. That would certainly allow for rapid development of interesting applications.

UPDATE: I’m told that version 0.6 of SAJAX will offer some wrappers to return the javascript into variables. That version is due on Monday, and will also include a perl module.