There are mainly seven modules in the Backbone.js Architecture: HTTP Request, Router, View, Events, Model, Collection and Data Source. A user request is made using a router. The response to these requests is displayed by a user interface, often called Views. The View module in the Backbone.js view does not only display the response. It also specifies how to display and what to display from the concerned application. Instead of having HTML markup for the application, the View offers to the user with the model’s data. Being unaware of the HTML and CSS, the View displays the looks of the concerned data model. If a change has occurred in the model, each view can be updated independently, and thus this process does not require the reloading of the whole page.
In simple words, the View displays the response to the users’ requests and also specifies how to display and what to display from an application. There are certain methods to manipulate, modify and utilise the Backbone.JS View.
|To be used as a DOM element attributes on the view class.
|To represent the jQuery object for the view’s element.
|To be used as a selector that contains $ function and runs queries within the view’s element.
|To bind elements to the specified DOM elements with callback methods to handle events.
|To define which element to be used as the view reference.
|To extend the Backbone.view class to create a custom view class.
|To instantiate the view by using new keyword.
|To remove a view from the DOM.
|To store the logic for rendering a template.
|To specify the existing DOM element to a different DOM element.
|To create reusable copies of markup and to provide access to the instance data, while rendering the view.
|To remove delegate events from the view.