Things have been insanely busy around here at ZURB this past year. As you recently read, we did more open source projects than ever before. Yet we still managed to squeeze in time to make some changes to ZURBlog so that it looked freakin' awesome on any device, which you astute web surfers may have noticed. Over the course of several months, we worked vigorously to build a brand-spanking new and sexier blog with nifty features, such as the ability to comment on posts with Facebook and finding older posts faster.
Our old blog just wasn't performing up to snuff. That's because our old system was based on Rails 2.3 and chained to the behemoth ZURB.com master repository, which several programmers had hacked over in the course of five years. As a result, our code base had grown to a gargantuan scale over the years and was all interconnected. A slight change would be enough to crash the entire application, and that would bring an engineer who deployed the latest change to tears.
We realized that making any changes to the blog would require some hacktackulous programing.
So the team deliberated. Briefly. Then it hit us! We needed to move everything off ZURB.com, transforming it into a static site that would become the central hub for everything ZURB. The rest of the site — the portion that required a more dynamic experience — would be deployed as individual applications thanks to a nifty feature called sub-URIs.
Our blog would be the first to adopt this new structure, ushering in a new era of blogdom.
Rails Action Caching
Besides severing the blog's ties to ZURB.com, we wanted to boost the speed into warp. So we upgraded to Rails 3 and built the blog with action caching.
The old blog, bless its heart, had to make the trek from your computer to our server, where it plummeted into the bowels of the ZURB.com database to fetch your post — for each and every page request.
Rails action caching enabled us to halve the request time, which prevented a bunch of unnecessary trips to the database, and made for a happier reading experience.
Nix Out Third Party APIs
As part of the rehabilitation process, the dodgy and sly third party APIs — Twitter, Delicious , and Flickr — had to be quarantined and given second-rate seating. Something we wanted to avoid was making direct requests to the Twitter and Flickr APIs, which our old blogging system did continuously and without persisting any data in a database.
We know ... this was silly, but we've since come to our senses.
Before, if Twitter went down ' which, by and large, happens almost every day ' our site would take a beating. We remedied this by using the amazing wheneverize to schedule all of our processes and run them in the background. The new code fetches new Twitter updates and Flickr photos every few hours and stores them in the database.
Hot New Features
Yes, we've sped up the old blog, but we also added some hot new features. You can now search through our growing collection of posts, leave a comment through Facebook, and spread the word through better social interactions. You can also read the blog on your mobile phone, tablet, and desktop thanks to Foundation.
Built on Foundation
Using Foundation's grid system, we were able to see what the blog would look like across those devices. The blog's new layout was built nearly identical to the old one, but we gave it a more modern polish and also made it easier to search through our previous posts.
Searching with Sphinx
We're currently somewhere around 800 post and we're posting more and more everyday. So we thought it was necessary to make it easier for our users to search for our snazzy CSS3 buttons article through the blog rather than going through Google.
The new search functionality is built on the ever popular Sphinx via the Thinking Sphinx Rails gem by Pat Allan over at Freelancing Gods.
Besides making searching easier, we've made it a snap to leave a comment through Facebook. With more and more people using Facebook to comment, we could no longer avoid building a Facebook presence. (You can also comment using Yahoo or AOL!)
We must say, it has paid off. It has allowed us to quickly engage with our Facebook contingent, syncing up with our friends and customers through another channel.
The only major concern we've had with Facebook comments is keeping our comment count in sync via the Event.Subscribe method that Facebook suggests. Sometimes that method just doesn't fire correctly, and our comment count gets out of whack and has to be manually updated.
But that shouldn't stop you from commenting below and telling us what you think about the changes we made to the new blog.