Backbone View

Sunday, 27 October 2013

backbone view
What is a Backbone View ?
Backbone views are used to reflect what your applications’ data models look like. They are also used to listen
to events and react accordingly. This tutorial will not be addressing how to bind models and collections to views
but will focus on view functionality and how to use views with a JavaScript templating library, specifically
Underscore.js’s _.template.

We will be using  jQuery 1.8.2  as our DOM manipulator. It’s possible to use other libraries such as MooTools
or Sizzle, but official Backbone.js documentation endorses jQuery. Backbone View events may not work with other libraries other than jQuery.

Backbone View

SearchView = Backbone.View.extend({
        initialize: function(){
            alert("Alerts suck.");
        }
    });

    // The initialize function is always called when instantiating a Backbone View.
    // Consider it the constructor of the class.
    var search_view = new SearchView();
Regards
owntutorials.com  | Teach your self
http://www.maximetech.com | MaximeTech – A Way To Smarter Technologies
http://adpin.ws  | URL Shorten Service.

No comments:

Post a Comment

 

Total Pageviews

Blogroll

Most Reading