How do I install/use the backbone.js framework?

12,520

JOPLOmacedo’s first comment contains the essential answer, but I’ll elaborate it a bit:

Download jquery.js from the jQuery site, underscore.js from the Underscore.js site, and Backbone.js from the Backbone.js site. Use the “development versions” first, as this may help you in debugging. You can place the .js files in the same folder as your own test files, to keep things simple. (Later, you will find it better to place them in a separate folder.

In your HTML code, write (e.g. after all content, right before the end tag <body> if you use one:

<script src="jquery.js"></script>
<script src="underscore.js"></script>
<script src="backbone.js"></script>
<script>
// Your own JavaScript code here
</script>

This should get you started. You can use e.g. the relatively simple Hello world code in the Hello Backbone.js tutorial to check that the installation is OK, before working on your own code. (The tutorial uses remotely hosted versions of the .js file, which is another possibility.)

Share:
12,520
Admin
Author by

Admin

Updated on June 04, 2022

Comments

  • Admin
    Admin almost 2 years

    I'm new to JavaScript and was wondering how you install the backbone framework so that you can use it with javascript.