best approach to design a rest web service with binary data to be consumed from the browser

My research results: Single request (data included) The request contains metadata. The data is a property of metadata and encoded (for example: Base64). Pros: transactional everytime valid (no missing metadata or data) Cons: encoding makes the request very large Examples: Twitter GitHub Imgur Single request (multipart) The request contains one or more parts with metadata … Read more

Using the Backbone.js router to navigate through views modularized with require.js

In case anyone else is looking for a solution to this problem like I was, I’m posting what I ended up doing. If you’re using the boilerplate backbone.js, then you will have an initialize() function in router.js. I modified my initialize() function to look like the following: initialize = function () { var app_router; app_router … Read more

rails and backbone working together

Before anything else I’d suggest taking a look at thoughtbot’s Backbone.js on Rails book, which is a great starting point, although aimed at an intermediate to advanced audience. I bought this book having already worked with rails but as a total backbone.js beginner and it has served me very well. Beyond that, there are some … Read more

Understanding the internal structural dependencies of MVC in Backbone.js

Since Backbone.js is not a framework as such, there’s no single “right” way to do anything. However, there are some hints in the implementation that help you to get the idea. Also, there are some general time-tested code organization practices which you can apply. But I’ll explain the views first. Views Views in Backbone are … Read more

Handling ajax with React

Just in case anybody stumbled upon this and does not know, jQuery makes it super easy to send AJAX calls. Since React is just JavaScript it will work just like any other jQuery AJAX call. React’s own documentation uses jQuery to make the AJAX call so I assume that’s good enough for most purposes regardless … Read more

Backbone 1.1.0 Views – Reading Options

If you want to access to passed options – just save them: initialize: function (options) { this.options = options || {}; } If you use ES6: initialize (options = {}) { this.options = options; } If you want to save passed options for all Backbone.View‘s you can override constructor like ncksllvn suggested below.