Blog

Posts about javascript

Realtime Replay Logs with Redis

Posted by Peter Baumgartner on October 24, 2012. Filed under javascript, pro tip

First off, realtime websites are hard. The current toolset is rudimentary. When I first started building Ginger, I thought I must be doing it wrong because of all the trial-and-error and pieces I was building from scratch. After watching Geoff Schmidt’s keynote at DjangoCon, I realized it’s not that I’m dumb, it’s that everyone is reinventing their own wheel. His co-creation, Meteor, promises to fix that, but until then, we’re stuck with the tools we have.

One thing nearly every realtime site needs is a replay log. Public networks are inherintly unstable (doubly so for mobile). If a client disconnects for a short period of time, users will expect to receive any data it missed when it reconnects. That’s where a replay log comes in. It keeps a log of all activity and, when a client reconnects, it streams all the data it is ...

View comments View full post

Backbone.js for Django Developers

Posted by Peter Baumgartner on June 5, 2012. Filed under django, javascript

Our new product Ginger relies heavily on Backbone.js for most of the client-side functionality (you can read about our full web-stack here). Our JavaScript guru Marco built the initial prototype and then was pulled away by client work. I reluctantly filled in, but my background is primarily in Django. My JavaScript experience was minimal (primarily stitching together jQuery plugins to get the desired effect).

After a month or two of being submersed in Backbone, I’ve seen the light and am now relatively competent. When I got started I was completely lost. Here are some things that probably would have helped me back then. Whenever possible, I’ve linked to the source of the Backbone Todo example for code samples.

Terminology

In many ways, Backbone and Django are similar. They’re both MVC-like, but some of the terminology they use is different. Here’s a quick map:

  • Backbone ...

View comments View full post