Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9178093
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T17:28:19+00:00 2026-06-17T17:28:19+00:00

I come from a very strict OOP flash background, and I’m really trying to

  • 0

I come from a very strict OOP flash background, and I’m really trying to get deeper into backbone, my question is this:

If I have classes for all views (much like in flash), are there any uses/benefits of the _.template functionality for me, or can i just overlook it for now?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T17:28:21+00:00Added an answer on June 17, 2026 at 5:28 pm

    Markup templating, whether with underscore or any other templating framework, is most definitely useful.

    It seems that you see View classes and templates as somewhat of a either-or proposition., but that’s not really the case. They solve a different problem altogether; they complement each other, not replace.

    A view class (Backbone.View in your case) scopes and encapsulates the view-related logic and event handling. This is great practice, and should be used whether or not you decide to use a templating engine.

    Templates on the other hand simply transpose your data to the HTML, nothing more or less. This is something your view needs to do, and the way I see it, there are a few ways of achieving this:

    • Build HTML by string concatenation
      • "<div>" + this.model.name + "</div>"… ugh)
    • Fill DOM nodes with jQuery
      • $(".name").text(this.model.name) ad absurdum…
    • Use some kind of data binding
      • Nice, but Backbone doesn’t support this out of the box.
      • Plugins do exist, though (Backbone.ModelBinding, Rivets, Stickit…)
    • Use a templating engine
      • Lighter and simpler than databinding
      • Keeps representation separate from logic

    Choice is yours, but I wouldn’t go without either a data binding or a templating framework. The templates provided by underscore are powerful, but I prefer semantic, logic-less templates such as Handlebars.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I come from a Java background, and am very used to wrapping code into
I come from a ECMAScript background (seems to be very C/C++). Thus, I learned
I come from a Java background and am getting more into .NET, what are
I come from a PHP background and I'm just getting my teeth into some
I come from a Java background and I am now trying to study PHP
I'm hoping someone can help with this very newbie question. I've just come from
I've been trying to get started with Mono & GTK# (I come from a
I come from a long Java background and very new to C#. I was
I'm very new to Padrino (I come from a PHP background), and ruby web
I come from a C++ background and I've been working with C# for about

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.