An overview of Backbone.js
With a simple application like the one we wrote with jQuery, the logic can turn into spaghetti-code rather quickly. We need to implement good practices to organize our code. Which practices do we implement? One of the first libraries to try to answer this question is Backbone.js.
Backbone.js is one of the earliest JavaScript libraries to implement a Model View Controller (MVC) architecture. MVC organizes code by separating data and business logic (the Model
) from the output (the View
) and updates both through a separate component (the Controller
). With MVC, you don't write a complicated JavaScript function that gets input from some text blanks, adds the contents together, and saves the results. Those three actions can ...
Get Mastering ArcGIS Server Development with JavaScript now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.