AngularJS vs Backbone.js: What are the differences?
AngularJS and Backbone.js are both open source tools. AngularJS with 59.6K GitHub stars and 28.9K forks on GitHub appears to be more popular than Backbone.js with 27.5K GitHub stars and 5.72K GitHub forks.
Lyft, MIT, and Vine Labs are some of the popular companies that use AngularJS, whereas Backbone.js is used by reddit, SendGrid, and Trello. AngularJS has a broader approval, being mentioned in 2793 company stacks & 1806 developers stacks; compared to Backbone.js, which is listed in 1066 company stacks and 213 developer stacks.
What is AngularJS?
What is Backbone.js?
Need advice about which tool to choose?Ask the StackShare community!
Sign up to add, upvote and see more prosMake informed product decisions
Sign up to get full access to all the companiesMake informed product decisions
Sign up to get full access to all the tool integrationsMake informed product decisions
The front end for Heap begun to grow unwieldy. The original jQuery pieces became difficult to maintain and scale, and a decision was made to introduce Backbone.js, Marionette, and TypeScript. Ultimately this ended up being a “detour” in the search for a scalable and maintainable front-end solution. The system did allow for developers to reuse components efficiently, but adding features was a difficult process, and it eventually became a bottleneck in advancing the product.
Today, the Heap product consists primarily of a customer-facing dashboard powered by React, MobX, and TypeScript on the front end. We wrote our migration to React and MobX in detail last year here.
When the data request returns, Backbone.js gets busy. The idea with Backbone is that we render each Model that comes down from the server with a View, and then Backbone provides an easy way to:
1) Watch for DOM events within the HTML generated by the View and tie those to methods on the corresponding Model, which re-syncs with the server
2) Watch the model for changes, and re-render the model’s HTML block to reflect them
Neat! Using that general approach, we get a fairly regular, comprehensible, and maintainable client. We custom-built a client-side Model cache to handle updates and simplify client-side Model reuse.
AngularJS is a structural framework for dynamic web apps. With AngularJS, designers can use HTML as the template language and it allows for the extension of HTML's syntax to convey the application's components effortlessly. Angular makes much of the code you would otherwise have to write completely redundant. We can use Angular to build any kind of app, taking advantage of features like: Two-way binding, templating, RESTful api handling, modularization, AJAX handling, dependency injection, etc
The main web store is a Backbone.js single page web application, and so it hits API endpoints to do all the calls, and we use those same API endpoints for the consumer iPhone app, the consumer Android app, and the consumer mobile web app. It worked out really nicely, us just building one API and just all these clients, including the web client, using that.
All of our frontend code is on AngularJS. Directives, controllers, and services really help in organizing code in order to keep things maintainable, and two-way binding makes data input easy. The large ecosystem of modules for directives is fantastic, too.
When ever I need heavy user client side apps this is my tool of choice. There are a ton of JS frameworks out there, picked this one because of philosophy they are trying to put out there and great community. Two way data binding FTW!
The front end was built on an Angular template supplied by the client. We leveraged Angular's flexibility and speed to delivered complex matrices of data quickly and with great finesse.
We use Angular.js to build our front-end framework known as Frontkit, so our apps can get started faster with reliable, interactive components.
Major part of our UI application uses Backbone models and views extensively. Though there's a plan to migrate to React and Redux.