Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 320
user1618478 Avatar asked Feb 19 '23 05:02

user1618478


1 Answers

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.)

like image 111
Jukka K. Korpela Avatar answered Mar 05 '23 18:03

Jukka K. Korpela