scrollHeight, scrollTop, and outerHeight: Making sense of JavaScript scrolling geometry with JQuery

This article is written for those who find themselves working on two problems: (1) Getting information about the scrolling state of an html element. (2) Using JavaScript to do so....

→ read more and comment...

Unicorn, I18n and it's Thread

We're in the process of switching over to Unicorn here at Revelation and yesterday we started to notice some strange behavior with I18n. The I18n locale we set in a previous request was persisting to the next. Digging into I18n we found out why: I18n holds the current locale on a thread-local variable, and unicorn does not start a new thread for each new request, so the current locale or any other thread-local variable will persist across requests. Here's a quick example to show the different behavior of Mongrel vs. Unicorn with thread-local variables....

→ read more and comment...

Mongrel vs. Passenger vs. Unicorn

We tested mongrel, passenger and the new kid on the block unicorn. Our goal in testing wasn't to test a simple rack or rails app. Our app is complex. We wanted to see what each of these servers could do with a very complicated action in our app. One that has before_filters, nested partials, big sql lookups, and so on. We also wanted to test this in an environment that was as close to our production stack as possible. So all of our testing was against our staging server, under ssl with a full stack and a copy of our production database...

→ read more and comment...

YUI uploader testing with Blue-ridge

The Revelation development team has been working hard to bring video uploading and encoding to Revelation. Whenever we do anything around here we always think 'TEST TEST TEST'! We decided to use YUI's uploader, which means that much of our uploading functionality was going to be in JavaScript. In the past we've toyed around with tools like Screw-Unit or just basic Selenium tests to make sure our JavaScript is tested. For video uploading, however, we really needed to find robust full-featured and CI compatible JavaScript testing framework. We landed on Blue-ridge. The best thing about Blue-ridge is you can do some pretty powerful JavaScript testing without a browser. Blue-ridge achieves this feat by running in Rhino. Rhino is a Java-based JavaScript interpreter written by the guys over at Mozilla. Rhino is capable of rendering a full DOM implementation that runs completely in JavaScript by loading a special version of Env.js, which results in a pure JavaScript browser. Pretty crazy!...

→ read more and comment...

Everything you never wanted to know about nginx

This is the end of a very long week indeed. We've been working hard adding video to our application, and learned quite a few things about Javascript's foibles and other equally impossible things to do with nginx....

→ read more and comment...

Welcome to Revelation Labs!

First, let me introduce the development and design culture we've started here at Revelation. We practice eXtreme Programming or XP. We believe in short iterations and continually delivering business value in the form of working software. We believe in testing, or more specifically, in writing tests...

→ read more and comment...