javascript Tag

Saturday-Night-Fever-2

The Kick-Off Meeting

It went something along the lines of:
  • Client: "We have a new requirement for you.."
  • Shiners: "Shoot.."
  • Client: "We'd like you to come up a solution that can insert 2 million rows per hour into a database and be able to deliver real-time analytics and some have animated charts visualising it. And, it should go without saying, that it needs to be scalable so we can ramp up to 100 million per hour."
  • Shiners: [inaudible]
  • Client: "Sorry, what was that?"
  • Shiners: [inaudible]
  • Client: "You'll have to speak up guys.."
  • Shiners: "Give us 6 weeks"
We delivered it less than 4.
One of the many ways in which EmberJS, AngularJS, and BackboneJS differ is in how they treat their models. AngularJS uses dirty checking on Plain Old Javascript Objects (POJSO); whereas EmberJS and BackboneJS both use accessors (getters and setters) on wrapped objects.We will be exploring the ways in which these two approaches differ, and the implications these differences have when it comes to choosing which Javascript framework we we should write our single page apps in.
Clock partsUnit-testing Backbone Views is hard. You need to cover enough for the test to be meaningful (for example DOM updates and server calls), without getting too tangled up in gory details. In this post I'll talk about how we use QUnit and Sinon.JS to unit-test our Backbone views.There's already material out there on using these frameworks together, so I'm not going to get into setting things up. However, having done it for a year now I feel I've learnt enough additional tips, tricks and traps to warrant sharing them with the world.This post will cover the three things you have to think about when testing Backbone Views, then talk about three strategies for simplifying your tests. I'll also share some more general thoughts on Backbone's suitableness for building large apps.
melbjsMelbJS held an event last Wednesday, and the turnout was amazing in spite of the dreary weather. If I recall rightly, it was the biggest turnout for this event to date.It must have been the impressive line up of speakers:  there were full presentations by Neil Jenkins, James A Rosen, and Ryan Seddon, and a couple of lightning talks by Tommy-Carlos Williams and Mark Brown. In this post I'm going to cover a couple of talks that I found interesting.
The-Usual-Suspects-1995-Movie-Image-1One problem with single-page apps is that application state can stick around for longer than it would in a more traditional request-response web app. Because your users aren't refreshing the page very often, you can have JavaScript objects sitting around in the browser for hours, or even days and weeks.At Shine, we've been working on a large Backbone.js application recently and found that identity issues relating to long-lived objects caused a number of subtle and not-so-subtle bugs. For us the solution was to introduce an identity map.In this blog entry I'll talk about what an identity map is, why you'd want to consider using one, and will introduce you to an implementation that we've put on Github.