![]() |
VOOZH | about |
Backbone.js uses MVC Architecture for handling user interface, data modeling, and business logic separately. Each entity in MVC architecture is separated from the other, so when business logic is not dependent on the user interface, it becomes easier to work with the user interface.
For rendering the purpose view is used in backbone.js, where each view can manage its own rendering and interaction with a user by manipulating its own DOM element. Rendering in backbone.js is isolated in every view.
The architecture of backbone.js:
For rendering on the view layer of backbone.js, we need to extend a custom view class and then call the render method for rendering content for user interaction.
Syntax:
view.render()
Parameters:
Example 1:
Output:
Example 2: