Friday, 11 December 2015

Exercise-4: Use Backbone Boiler plate code

Solution

Create index.html using following code and place it in web root of your node server. Preview same in browser

Note that code in green is installed and maintained using bower 
Create a folder "js" in web root of your node server  and create a simple javascript file "main.js"
Inside "main.js" write code console.log(Backbone);
Preview the file from chrome browser and right click inspect. Check the Backbone object attributes / methods

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">

</head>

<body>

<script src="lib/jquery.min.js"></script>
<script src="lib/underscore-min.js"></script>
<script src="lib/backbone-min.js"></script>
<script src="js/main.js"></script>

</body>

</html>

Exercise-3: Intsall client side libraries

Solution


  1. Install Bower globally 
  2. Navigate to your project directory
  3. Using bower install client side libraries ( Underscore, Backbone, Jquery)

Backbone Basics : Topics

  1. Install Express
  2. Client Side Libraries
  3. Use BackBone boilerplate code
  4. Associate a View with existing DOM (Document Object model)  Eelement
  5. Create a View Element that will create DOM element on fly
  6. Loading a Template ( This is not the most efficient way, but let us understand the fundamentals. Going forward we will include template in a seperate HTML file)
  7. Listening for Events
  8. Model
  9. Add custom methods to Model
  10. Listening for changes to Model 
  11. Interacting with remote server




Exercise-2- Install Express Framework

Solution

Follow Link