VOOZH about

URL: https://www.geeksforgeeks.org/javascript/backbone-js-rendering/

⇱ Backbone.js Rendering - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Backbone.js Rendering

Last Updated : 23 Aug, 2022

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:

👁 Image
 

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:

  • view: The view is a class inside the backbone.js library.
  • render(): It is a method which is part of the view class and used to render HTML content on the view layer of the application.

Example 1:

Output:

👁 Image
 

Example 2:

Comment