Software, life, and random thoughts
Home/Tags/backbone/

Tag : backbone

  1. I finally got to mess around with PhantomJS and Jasmine, and couldn’t find a resource that gives clear, concise, accurate information, without language specific or build tool specific coupling, so I decided to write it myself. Fortunately, it is way simpler than I thought. PhantomJS PhantomJS is a standalone, cross platform command line application…
  2. One of the good things about Backbone.js is it doesn’t tell us how to do things. It leaves it for us to decide what are the best practices for writing views (or any components). This is also one of the worst things about Backbone. it makes it almost too easy to take the wrong path, and write views that will be hard to maintain. The principle we…
  3. In my previous post, I covered the structure of a Backbone.js application using RequireJS. The next thing (or if you are a TDD fan, the first thing) we do is to run some tests on it. According to Coda Hale: Writing tests for your code may not reduce the number of bugs, but it will make fixing the bugs you inevitably find easier. Obviously, we can…
  4. Backbone gives us a very powerful set of tools. It gives us models, views, and routes - all event driven, consistent and beautifully embrace underscore.js functionality. Being a library rather than a framework, Backbone doesn’t give us application structure. That “glue” we need too initialize the app and glue all the pieces together. Since coding…
  5. PubSub (or the observer pattern) is obviously the hottest pattern in client side development, and I would like to take a shot at trying to refine the best practices for using it in a flexible and robust way. The definition provided in the original Gang of Four book on Design Patterns states: “Define a one-to-many dependency between objects so that…
  6. Lets say you have a Backbone.js based messaging system on your application, and you want to stay synced with the server so you could alert your users when a new message arrives. You would like to call the server once every couple of seconds and ask for status updates. Or maybe your model represents an on going background task, you want to poll for…
  7. I am working on a backbone based search page, and was trying to figure out what would be a simple way to have both a state model and a URI that represents that state of the page (the search string, search parameters, user preferences, etc.). Thinking of mixing backbone routes and the application models seemed like an overkill, and would force me to…
  8. A simple yet powerful way to create backbone model calculated fields or “macros” For one of our applications, we needed a way to store “macros” in backbone models, that will return a calculated value, based on values we have in the model fields. I came up with a quick solution that seems to be good enough so far. the concept is, the same way you…

©2023 Uzi Kilon