Just found out a nice article about getting started from scratch on mobile using backbone.js. While normally I would not advocate rolling your own “framework”. I feel like mobile doesn’t need much to get going (at least with droids and iphone) and it can be a good thing to learn how that work since mobile is probably going to be a big part of the future.
Here a part of the article and the link:
Let’s make a collective… Read the rest
Personally the template engine provided with underscore cover most of my use cases and is enough for me, but there is one thing that I have found very unpleasant, you cannot pass undefined keys to it. Here an example:
… Read the rest
Yeah that’s a long title, Backbone provides one default url for all your types of request with your models. But what if you want to be able to change your url model that is synching with your api depending of the type of request? Well that’s what we are here to do.
Sync is a nice utility used by backbone when you request your server to sync your model. Each time your request a change, backbone call sync,… Read the rest
One backbone.js behavior that was kind of upsetting me recently is the fact that it re-syncs your model after you save it on the server.
You know, you just set a model you changed, save it on the server in the background and continue your day in your application. Backbone however awaits patiently the response from the server api, and if the response does not correspond with your current model state, it sets the response attributes back to your… Read the rest
Thanks to Developwithpassion we have a new screencast this week. This presentation specifically focus on models and collections and how we can use them to encapsulate data and behavior in our client-side applications.
Be sure to check Developwithpassion website!
There’s been a lot of debate about code organization in the Backbone.js community for some time. It’s a complex problem that does not warrant a universal solution. All applications are not created equal and the reality is that the answer probably consists of a collection of patterns that can be used as necessary given the situation. At the end of the day the goal should be to create a code-base that is easy to understand, implement and maintain.
We here… Read the rest
Backbone is not for everyone or every situation, they are some things it does very well, and others that other frameworks do better. I really wanted to give a shout out at some resources that have been popping up recently about this, here we go!
1. Todo apps comparison
If you are the kind of people that would choose by looking at the code this is perfect. This github repository contains a todo app example for each popular MVC… Read the rest
“I asked Matt if it was ok to repatriate this article since his blog is now offline (will be back soon), Backbone is not portrayed in a good manner here, but I can understand his frustrations and found his point of view interesting” – Cedric Dugas