

They contain no data but build the html to be sent to the document object model or DOM. Views render themselves according to the change events sent from the model or models. Handles the interactivity of the web application and the user input. ViewĪ view is the presentation of the data that is represented by the model in a certain format. Models are used anywhere in the application where data is needed. When the data is changed, the model triggers an event that updates the controller. The model works independent of the user interface while managing the logic and data of the application. Providing data to the view it is the central element of the design pattern.

The dynamic representation of the coded object containing key/value bindings also referred to as data. MVC is a pattern that is very popular in javascript because of its ability to separate the data and the user interface while keeping applications synchronized. Traditionally, this pattern takes developed program logic and divides it into the four interconnected components. MVP is a common design pattern when developing an UI. The design paradigm implemented by utilizing Backbone.js is called MVP(Model–view–presentation). Conveniently Backbone is configured with a RESTful API for access to HTTP methods. Backbones organizes the data we build, creates models to populate that data, and synchronizes that data to and from the server.Īs said on "Its objective is to provide "the minimal set of data-structuring (models and collections) and user interface (views and URLs) while leaving the developer the choice of extensions for enhanced functionality." Frameworks such as Angular and React are more popular at this time but many web applications utilize backbone and can be expected to continue to do so until change is required. As the features or functionality of the app changes the written javascript can become difficult to read, debug, and refactor when necessary.

Backbone provides structure that makes developing appilcation's frontend less complicated.
