SlideShare a Scribd company logo
1 of 147
Single Page Web
    Applications
CoffeeScript + Backbone.js + Jasmine BDD



             @pirelenito
        github.com/pirelenito
              #tdc2011
Who am I?
What can you expect?

• What I am doing?
• Why is CoffeeScript so awesome?
• The era before Backbone;
• Fix browser spaghetti code with Backbone;
• Be professional: with Jasmine BDD;
Assumptions

• You know your Javascript;
• and your JQuery;
• You developed for the web before.
What I am doing?
Fullscreen Map
Geo CRUDs
No refreshes
Fullscreen Map
Geo CRUDs
No refreshes




CoffeeScript
Backbone.js
Fullscreen Map
            Geo CRUDs
            No refreshes




            CoffeeScript
            Backbone.js
     JSON

Rest API    Ruby on Rails
Why is CoffeeScript so
      awesome?
I like to choose my
        tools!
I can to that on the
       Server!
Browser?
Javascript Only!
Browser?
Javascript Only!
NO MOAR!
Too error-prone.
Semicolon insertion

return     return {
{             a: 10
   a: 10   };
};
Semicolon insertion

return ;   return {
{             a: 10
   a: 10   };
};
Global variables
function messWithGlobal() {
  a = 10;
}
Global variables
function messWithGlobal() {
  a = 10;
}

messWithGlobal();
alert(a);
Global variables
function messWithGlobal() {
  a = 10;
}

messWithGlobal();
alert(a);
Global variables
function messWithGlobal() {
  a = 10;
}

messWithGlobal();
alert(a);


function messWithGlobal() {
  var a = 10;
}
}
  square = function(x) {
     return x * x;
  };
  list = [1, 2, 3, 4, 5];
  math = {
     root: Math.sqrt,   Too verbose!
     square: square,
     cube: function(x) {
       return x * square(x);
     }
  };
  race = function() {
     var runners, winner;
     winner = arguments[0], runners = 2 <=
arguments.length ? __slice.call(arguments,
1) : [];
     return print(winner, runners);
  };
Awesome platform.
“I Think Coffeescript is
   clearly good stuff”
                       Douglas Crockford




             Javascript Programming Style And Your Brain
Remember this?
return     return {
{             a: 10
   a: 10   };
};
Coffeescript:
return       return a: 10
  a: 10
Coffeescript:
return       return a: 10
  a: 10




  It has no semicolon!
How it fixes globals?
Never write var again!

 messWithGlobal = ->
   a = 10
Never write var again!

 messWithGlobal = ->
   a = 10



messWithGlobal = function() {
   var a;
   return a = 10;
};
Compiles with scope

a = 10
Compiles with scope

a = 10




(function() {
  var a;
  a = 10;
}).call(this);
You want global?
           Go explicit!
window.messWithGlobal = ->
  a = 10
You want global?
           Go explicit!
window.messWithGlobal = ->
  a = 10


(function() {
  window.messWithGlobal = function() {
     var a;
     return a = 10;
  };
}).call(this);
Functions as callbacks
$('.button').click(function() {
  return alert('clicked!');
});
Functions as callbacks
$('.button').click(function() {
  return alert('clicked!');
});




$('.button').click -> alert 'clicked!'
Block by identation
 if (somethingIsTrue) {
   complexMath = 10 * 3;
 }
Block by identation
 if (somethingIsTrue) {
   complexMath = 10 * 3;
 }



 if somethingIsTrue
   complexMath = 10 * 3
Classes
class MyClass
  attribute: 'value'
  constructor: ->
    @objectVariable = 'Dude'

  myMethod: ->
    # this.objectVariable
    @objectVariable
Classes
class MyClass
  attribute: 'value'
  constructor: ->
    @objectVariable = 'Dude'

  myMethod: ->
    # this.objectVariable
    @objectVariable

object = new MyClass
object.myMethod()
object.objectVariable # Dude
object.attribute
Compiled class:
(function() {
  var MyClass;
  MyClass = (function() {
    MyClass.prototype.attribute = 'value';
    function MyClass() {
       this.objectVariable = 'Dude';
    }
    MyClass.prototype.myMethod = function() {
       return this.objectVariable;
    };
    return MyClass;
  })();
}).call(this);
Ranges
list = [1..5]
Ranges
list = [1..5]




var list;
list = [1, 2, 3, 4, 5];
Expressions!
vehicles = for i in [1..3]
  "Vehicle#{i}"
Expressions!
vehicles = for i in [1..3]
  "Vehicle#{i}"


vehicles
['Vehicle1', 'Vehicle2', 'Vehicle3']
More awesomeness...
number = -42 if opposite

math =
  square:   (x) -> x * x

race = (winner, runners...) ->
  print winner, runners

alert "I knew it!" if elvis?

squares = (math.square num for num in list)
Don’t use --bare
Namespaces are cool
class namespace('views').MyView
Namespaces are cool
class namespace('views').MyView



new oncast.views.MyView()
Namespaces are cool
class namespace('views').MyView



new oncast.views.MyView()



@.namespace = (name) ->
  @.oncast ||= {}
  return @.oncast[name] ||= {} if name
  return @.oncast
No more hidden bugs
 on my client code!
CoffeeScript will make
you a better Javascript
     programer.
The era before
  Backbone.
Rails did the rendering
           Rails




        Coffeescript
Rails did the rendering
                           Rails




$('.new').load "/cars/new", prepare




                       Coffeescript
Rails did the rendering
                           Rails




$('.new').load "/cars/new", prepare




                       Coffeescript
Rails did the rendering
                           Rails
                                      <form>
                                        <input name='name'>
                                        ...
                                      </form>


$('.new').load "/cars/new", prepare




                       Coffeescript
Rails did the rendering
                           Rails
                                      <form>
                                        <input name='name'>
                                        ...
                                      </form>


$('.new').load "/cars/new", prepare




                       Coffeescript
Advantages

• Simple;
• Used tools we knew;
• i18n.
Coffeescript Actions

ActionActivationHandler    One active at time




EditRefAction         ListRefAction      ...
Mapped an action on
our Rail’s Controller
Action Abstraction

• Would handle the ‘remote’ rendering;
• Initialize the rich components on the
  DOM;
• JQuery heavy.
Problems?
One Action at a time!
Difficult to keep thinks
        in sync.
Difficult to keep thinks
        in sync.
   No real state on the browser.
Slow (web 1.0)
“Not surprisingly, we're finding
  ourselves solving similar
   problems repeatedly.”
                                                          Henrik Joreteg



http://andyet.net/blog/2010/oct/29/building-a-single-page-app-with-backbonejs-undersc/
Fix browser spaghetti
code with Backbone.
Why Backbone?
Gives enough structure
Very lightweight
Easy to get started!
Why not GWT(for instance)?
Doesn’t hide the DOM
 You are doing real web development.
Works nicely with
 CoffeeScript
  Inheritance.

 https://github.com/documentcloud/backbone/blob/master/test/model.coffee
Works nicely with
  CoffeeScript
   Inheritance.
class Car extends Backbone.Model


    https://github.com/documentcloud/backbone/blob/master/test/model.coffee
Ok, but what is it?
Four Abstractions

• Collection;
• Model;
• Router;
• View;
Models / Collections
class Reference extends Backbone.Model
  urlRoot: "/references"
Models / Collections
class Reference extends Backbone.Model
  urlRoot: "/references"


class References extends Backbone.Collection
  model: Reference
  url: '/references'



        Model   Model   Model
                                Collection
Fetch Collection
# creates a new collection
references = new References

# fetch data asynchronously
references.fetch()
Fetch Collection
# creates a new collection
references = new References

# fetch data asynchronously
references.fetch()


               [{
                   id: 1
      JSON         name: "Paulo's House",
                   latitude: '10',
                   longitude: '15'
                 }]
Model attributes
Model attributes
# get reference with id 1
reference = references.get 1
Model attributes
# get reference with id 1
reference = references.get 1

# get the name property of the model
name = reference.get 'name'
Model attributes
# get reference with id 1
reference = references.get 1

# get the name property of the model
name = reference.get 'name'

# change the name property of the model
reference.set name: 'new name'
Model attributes
# get reference with id 1
reference = references.get 1

# get the name property of the model
name = reference.get 'name'

# change the name property of the model
reference.set name: 'new name'

# save the model to the server
reference.save()
Why use model.set ?
reference.set name: 'new name'
Events!
reference.bind 'change', (name)-> alert name
Events!
reference.bind 'change', (name)-> alert name

reference.set name: 'new name'
Events!
reference.bind 'change', (name)-> alert name

reference.set name: 'new name'
Views
class SaveButtonView extends Backbone.View
  className: 'save-button'
  tagName: 'div'
  events:
    click: '_click'

  render: ->
    $(@el).html "<input type='button'
                 value='Save'></input>"
    return @

  _click: ->
    @model.save()
Views
class SaveButtonView extends Backbone.View
  className: 'save-button'
  tagName: 'div'
  events:
    click: '_click'

  render: ->
    $(@el).html "<input type='button'
                 value='Save'></input>"
    return @

  _click: ->
    @model.save()
Views
class SaveButtonView extends Backbone.View
  className: 'save-button'
  tagName: 'div'
  events:
    click: '_click'

  render: ->
    $(@el).html "<input type='button'
                 value='Save'></input>"
    return @

  _click: ->
    @model.save()
Views
class SaveButtonView extends Backbone.View
  className: 'save-button'
  tagName: 'div'
  events:
    click: '_click'

  render: ->
    $(@el).html "<input type='button'
                 value='Save'></input>"
    return @

  _click: ->
    @model.save()
Views
class SaveButtonView extends Backbone.View
  className: 'save-button'
  tagName: 'div'
  events:
    click: '_click'

  render: ->
    $(@el).html "<input type='button'
                 value='Save'></input>"
    return @

  _click: ->
    @model.save()
Views
class SaveButtonView extends Backbone.View
  className: 'save-button'
  tagName: 'div'
  events:
    click: '_click'

  render: ->
    $(@el).html "<input type='button'
                 value='Save'></input>"
    return @

  _click: ->
    @model.save()
Using a View
Using a View
# creates a new instance of the view
view = new SaveButtonView()
Using a View
# creates a new instance of the view
view = new SaveButtonView()

# render it
view.render()
Using a View
# creates a new instance of the view
view = new SaveButtonView()

# render it
view.render()

# append the content of the view on the doc
$('.some-div').html view.el
‘Events’ is the magic
     element!
‘Events’ is the magic
     element!
   They will keep you in sync!
View   Model
Click!




View     Model
Click!

         event changes the model


View                               Model
Click!           model.set name: 'new name'


         event changes the model


View                               Model
Click!           model.set name: 'new name'


         event changes the model


View                               Model
         event changes the view
Click!               model.set name: 'new name'


            event changes the model


View                                  Model
             event changes the view




         keeps everything in sync
Routers
class ReferencesRouter extends Backbone.Router
  routes:
    'references': 'index'

  initialize: (options)->
    @listPanelView = options.listPanelView

  index: ->
    @listPanelView.renderReferences()
Routers
class ReferencesRouter extends Backbone.Router
  routes:
    'references': 'index'

  initialize: (options)->
    @listPanelView = options.listPanelView

  index: ->
    @listPanelView.renderReferences()
Routers
class ReferencesRouter extends Backbone.Router
  routes:
    'references': 'index'

  initialize: (options)->
    @listPanelView = options.listPanelView

  index: ->
    @listPanelView.renderReferences()
This is just the basics!
Lessons Learned
DOM is not always
  your friend!
DOM is not always
         your friend!
# will be 0 unless it is attached to the
# document
$(@el).height()
Always do
       view.render()




        Before
$('.some-div').html view.el
Always return this.
Always return this.
new SaveButtonView().highlight().render().el
Routers should only
      route!
Routers should only
         route!
index: ->
  @listPanelView.renderReferences()
You don’t need an
Action abstraction!!!
The View will represent
 one model/collection
       forever!
Broken events
# append the view's element to the document
$('.div').append view.el

# remove it
$('.div').empty

# add it again
$('.div').append view.el

   View events (click, change) will no longer work.
Collection.getOrFetch
class Posts extends Backbone.Collection
  url: "/posts"

  getOrFetch: (id) ->
    if @get(id)
      post = @get id
    else
      post = new Post { id : id }
      @add post
      post.fetch()

   post
             http://bennolan.com/2011/06/10/backbone-get-or-fetch.html
View.fetch
Backbone.View::fetch = (options={})->
  return @ unless (@collection || @model)

 _(options).extend
   complete: =>
     @removeLoading()

 @renderLoading()
 (@collection || @model).fetch options

  return @
View.fetch
Backbone.View::fetch = (options={})->
  return @ unless (@collection || @model)

 _(options).extend
   complete: =>
     @removeLoading()

 @renderLoading()
 (@collection || @model).fetch options

  return @
                             view.fetch()
Lazy fetching
class LazyFetchView extends Backbone.View
  render: ->
    if @model.isFullyFetched()
      # if the data is ready we render it
      $(@el).html ...
    else
      # otherwise we fetch the data
      # rendering the loading indicator
      @fetch()
    return @
Be professional: with
   Jasmine BDD.
Why Jasmine?
BDD
BDD
rspec like!
given a delete button view
when the user clicks the view
then it should delete the model
Jasmine:
              given a delete button view
              when the user clicks the view
              then it should delete the model


describe 'DeleteButtonView', ->

 context 'when the user clicks the view', =>

   it 'should delete the model'
describe 'DeleteButton', ->

 context 'when the user clicks the view', =>

   it 'should delete the model'
describe 'DeleteButton', ->

 context 'when the user clicks the view', =>

   it 'should delete the model', =>
     expect(@model.delete).toHaveBeenCalledOnce()
describe 'DeleteButton', ->

 context 'when the user clicks the view', =>

   it 'should delete the model', =>
     expect(@model.delete).toHaveBeenCalledOnce()



                  http://sinonjs.org/

        https://github.com/froots/jasmine-sinon
describe 'DeleteButton', ->
  beforeEach =>
    @model = new Backbone.Model
    @deleteButton = new DeleteButton(model: @model)

 context 'when the user clicks the view', =>

   it 'should delete the model', =>
     expect(@model.delete).toHaveBeenCalledOnce()
describe 'DeleteButton', ->
  beforeEach =>
    @model = new Backbone.Model
    @deleteButton = new DeleteButton(model: @model)

 context 'when the user clicks the view', =>
   beforeEach =>
     sinon.spy @model, 'delete'

   it 'should delete the model', =>
     expect(@model.delete).toHaveBeenCalledOnce()
describe 'DeleteButton', ->
  beforeEach =>
    @model = new Backbone.Model
    @deleteButton = new DeleteButton(model: @model)

 context 'when the user clicks the view', =>
   beforeEach =>
     sinon.spy @model, 'delete'

     @deleteButton.render()
     $(@deleteButton.el).click()

   it 'should delete the model', =>
     expect(@model.delete).toHaveBeenCalledOnce()
Run it headless!


      Text




       http://johnbintz.github.com/jasmine-headless-webkit/
http://tinnedfruit.com/2011/03/03/testing-backbone-apps-
                  with-jasmine-sinon.html
Further reading

• https://github.com/creationix/haml-js
• https://github.com/fnando/i18n-js
• http://documentcloud.github.com/underscore/
• https://github.com/velesin/jasmine-jquery
So long and thanks for
      all the fish!
         @pirelenito
     github.com/pirelenito
      about.me/pirelenito

More Related Content

What's hot

HTML5: friend or foe (to Flash)?
HTML5: friend or foe (to Flash)?HTML5: friend or foe (to Flash)?
HTML5: friend or foe (to Flash)?Remy Sharp
 
IndexedDB - Querying and Performance
IndexedDB - Querying and PerformanceIndexedDB - Querying and Performance
IndexedDB - Querying and PerformanceParashuram N
 
Good karma: UX Patterns and Unit Testing in Angular with Karma
Good karma: UX Patterns and Unit Testing in Angular with KarmaGood karma: UX Patterns and Unit Testing in Angular with Karma
Good karma: UX Patterns and Unit Testing in Angular with KarmaExoLeaders.com
 
Single Page Web Apps As WordPress Admin Interfaces Using AngularJS & The Word...
Single Page Web Apps As WordPress Admin Interfaces Using AngularJS & The Word...Single Page Web Apps As WordPress Admin Interfaces Using AngularJS & The Word...
Single Page Web Apps As WordPress Admin Interfaces Using AngularJS & The Word...Caldera Labs
 
Workshop 27: Isomorphic web apps with ReactJS
Workshop 27: Isomorphic web apps with ReactJSWorkshop 27: Isomorphic web apps with ReactJS
Workshop 27: Isomorphic web apps with ReactJSVisual Engineering
 
Future of Web Apps: Google Gears
Future of Web Apps: Google GearsFuture of Web Apps: Google Gears
Future of Web Apps: Google Gearsdion
 
Symfony tips and tricks
Symfony tips and tricksSymfony tips and tricks
Symfony tips and tricksJavier Eguiluz
 
Caldera Learn - LoopConf WP API + Angular FTW Workshop
Caldera Learn - LoopConf WP API + Angular FTW WorkshopCaldera Learn - LoopConf WP API + Angular FTW Workshop
Caldera Learn - LoopConf WP API + Angular FTW WorkshopCalderaLearn
 
Rails 3: Dashing to the Finish
Rails 3: Dashing to the FinishRails 3: Dashing to the Finish
Rails 3: Dashing to the FinishYehuda Katz
 
[Srijan Wednesday Webinar] Rails 5: What's in It for Me?
[Srijan Wednesday Webinar] Rails 5: What's in It for Me?[Srijan Wednesday Webinar] Rails 5: What's in It for Me?
[Srijan Wednesday Webinar] Rails 5: What's in It for Me?Srijan Technologies
 
Intro to Ember.js
Intro to Ember.jsIntro to Ember.js
Intro to Ember.jsJay Phelps
 
The Best (and Worst) of Django
The Best (and Worst) of DjangoThe Best (and Worst) of Django
The Best (and Worst) of DjangoJacob Kaplan-Moss
 
Intro to React
Intro to ReactIntro to React
Intro to ReactTroy Miles
 
Workshop 3: JavaScript build tools
Workshop 3: JavaScript build toolsWorkshop 3: JavaScript build tools
Workshop 3: JavaScript build toolsVisual Engineering
 
Introducing Assetic: Asset Management for PHP 5.3
Introducing Assetic: Asset Management for PHP 5.3Introducing Assetic: Asset Management for PHP 5.3
Introducing Assetic: Asset Management for PHP 5.3Kris Wallsmith
 

What's hot (20)

HTML5: friend or foe (to Flash)?
HTML5: friend or foe (to Flash)?HTML5: friend or foe (to Flash)?
HTML5: friend or foe (to Flash)?
 
IndexedDB - Querying and Performance
IndexedDB - Querying and PerformanceIndexedDB - Querying and Performance
IndexedDB - Querying and Performance
 
Good karma: UX Patterns and Unit Testing in Angular with Karma
Good karma: UX Patterns and Unit Testing in Angular with KarmaGood karma: UX Patterns and Unit Testing in Angular with Karma
Good karma: UX Patterns and Unit Testing in Angular with Karma
 
Single Page Web Apps As WordPress Admin Interfaces Using AngularJS & The Word...
Single Page Web Apps As WordPress Admin Interfaces Using AngularJS & The Word...Single Page Web Apps As WordPress Admin Interfaces Using AngularJS & The Word...
Single Page Web Apps As WordPress Admin Interfaces Using AngularJS & The Word...
 
Workshop 27: Isomorphic web apps with ReactJS
Workshop 27: Isomorphic web apps with ReactJSWorkshop 27: Isomorphic web apps with ReactJS
Workshop 27: Isomorphic web apps with ReactJS
 
Future of Web Apps: Google Gears
Future of Web Apps: Google GearsFuture of Web Apps: Google Gears
Future of Web Apps: Google Gears
 
Intro to Ember.JS 2016
Intro to Ember.JS 2016Intro to Ember.JS 2016
Intro to Ember.JS 2016
 
Symfony tips and tricks
Symfony tips and tricksSymfony tips and tricks
Symfony tips and tricks
 
Caldera Learn - LoopConf WP API + Angular FTW Workshop
Caldera Learn - LoopConf WP API + Angular FTW WorkshopCaldera Learn - LoopConf WP API + Angular FTW Workshop
Caldera Learn - LoopConf WP API + Angular FTW Workshop
 
Play vs Rails
Play vs RailsPlay vs Rails
Play vs Rails
 
The JavaFX Ecosystem
The JavaFX EcosystemThe JavaFX Ecosystem
The JavaFX Ecosystem
 
Rails 3: Dashing to the Finish
Rails 3: Dashing to the FinishRails 3: Dashing to the Finish
Rails 3: Dashing to the Finish
 
Writing Pluggable Software
Writing Pluggable SoftwareWriting Pluggable Software
Writing Pluggable Software
 
[Srijan Wednesday Webinar] Rails 5: What's in It for Me?
[Srijan Wednesday Webinar] Rails 5: What's in It for Me?[Srijan Wednesday Webinar] Rails 5: What's in It for Me?
[Srijan Wednesday Webinar] Rails 5: What's in It for Me?
 
Intro to Ember.js
Intro to Ember.jsIntro to Ember.js
Intro to Ember.js
 
The Best (and Worst) of Django
The Best (and Worst) of DjangoThe Best (and Worst) of Django
The Best (and Worst) of Django
 
Intro to React
Intro to ReactIntro to React
Intro to React
 
Workshop 3: JavaScript build tools
Workshop 3: JavaScript build toolsWorkshop 3: JavaScript build tools
Workshop 3: JavaScript build tools
 
Thomas Fuchs Presentation
Thomas Fuchs PresentationThomas Fuchs Presentation
Thomas Fuchs Presentation
 
Introducing Assetic: Asset Management for PHP 5.3
Introducing Assetic: Asset Management for PHP 5.3Introducing Assetic: Asset Management for PHP 5.3
Introducing Assetic: Asset Management for PHP 5.3
 

Similar to Single Page Web Applications with CoffeeScript, Backbone and Jasmine

SproutCore and the Future of Web Apps
SproutCore and the Future of Web AppsSproutCore and the Future of Web Apps
SproutCore and the Future of Web AppsMike Subelsky
 
Crossing the Bridge: Connecting Rails and your Front-end Framework
Crossing the Bridge: Connecting Rails and your Front-end FrameworkCrossing the Bridge: Connecting Rails and your Front-end Framework
Crossing the Bridge: Connecting Rails and your Front-end FrameworkDaniel Spector
 
Ruby on Rails - Introduction
Ruby on Rails - IntroductionRuby on Rails - Introduction
Ruby on Rails - IntroductionVagmi Mudumbai
 
[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVCAlive Kuo
 
HTML5 for the Silverlight Guy
HTML5 for the Silverlight GuyHTML5 for the Silverlight Guy
HTML5 for the Silverlight GuyDavid Padbury
 
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQueryRemedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQueryTatsuhiko Miyagawa
 
Doctrine For Beginners
Doctrine For BeginnersDoctrine For Beginners
Doctrine For BeginnersJonathan Wage
 
[Bristol WordPress] Supercharging WordPress Development
[Bristol WordPress] Supercharging WordPress Development[Bristol WordPress] Supercharging WordPress Development
[Bristol WordPress] Supercharging WordPress DevelopmentAdam Tomat
 
jQuery & 10,000 Global Functions: Working with Legacy JavaScript
jQuery & 10,000 Global Functions: Working with Legacy JavaScriptjQuery & 10,000 Global Functions: Working with Legacy JavaScript
jQuery & 10,000 Global Functions: Working with Legacy JavaScriptGuy Royse
 
Integrating React.js Into a PHP Application
Integrating React.js Into a PHP ApplicationIntegrating React.js Into a PHP Application
Integrating React.js Into a PHP ApplicationAndrew Rota
 
Working with Javascript in Rails
Working with Javascript in RailsWorking with Javascript in Rails
Working with Javascript in RailsSeungkyun Nam
 
JRuby + Rails = Awesome Java Web Framework at Jfokus 2011
JRuby + Rails = Awesome Java Web Framework at Jfokus 2011JRuby + Rails = Awesome Java Web Framework at Jfokus 2011
JRuby + Rails = Awesome Java Web Framework at Jfokus 2011Nick Sieger
 
A tour on ruby and friends
A tour on ruby and friendsA tour on ruby and friends
A tour on ruby and friends旻琦 潘
 
Real life-coffeescript
Real life-coffeescriptReal life-coffeescript
Real life-coffeescriptDavid Furber
 
The Return of JavaScript: 3 Open-Source Projects that are driving JavaScript'...
The Return of JavaScript: 3 Open-Source Projects that are driving JavaScript'...The Return of JavaScript: 3 Open-Source Projects that are driving JavaScript'...
The Return of JavaScript: 3 Open-Source Projects that are driving JavaScript'...Ben Teese
 
10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)
10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)
10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)arcware
 
Ruby/Rails
Ruby/RailsRuby/Rails
Ruby/Railsrstankov
 
Dependency Management with RequireJS
Dependency Management with RequireJSDependency Management with RequireJS
Dependency Management with RequireJSAaronius
 
Backbone.js — Introduction to client-side JavaScript MVC
Backbone.js — Introduction to client-side JavaScript MVCBackbone.js — Introduction to client-side JavaScript MVC
Backbone.js — Introduction to client-side JavaScript MVCpootsbook
 

Similar to Single Page Web Applications with CoffeeScript, Backbone and Jasmine (20)

SproutCore and the Future of Web Apps
SproutCore and the Future of Web AppsSproutCore and the Future of Web Apps
SproutCore and the Future of Web Apps
 
Crossing the Bridge: Connecting Rails and your Front-end Framework
Crossing the Bridge: Connecting Rails and your Front-end FrameworkCrossing the Bridge: Connecting Rails and your Front-end Framework
Crossing the Bridge: Connecting Rails and your Front-end Framework
 
Ruby on Rails - Introduction
Ruby on Rails - IntroductionRuby on Rails - Introduction
Ruby on Rails - Introduction
 
[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC
 
HTML5 for the Silverlight Guy
HTML5 for the Silverlight GuyHTML5 for the Silverlight Guy
HTML5 for the Silverlight Guy
 
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQueryRemedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
 
Doctrine For Beginners
Doctrine For BeginnersDoctrine For Beginners
Doctrine For Beginners
 
[Bristol WordPress] Supercharging WordPress Development
[Bristol WordPress] Supercharging WordPress Development[Bristol WordPress] Supercharging WordPress Development
[Bristol WordPress] Supercharging WordPress Development
 
jQuery & 10,000 Global Functions: Working with Legacy JavaScript
jQuery & 10,000 Global Functions: Working with Legacy JavaScriptjQuery & 10,000 Global Functions: Working with Legacy JavaScript
jQuery & 10,000 Global Functions: Working with Legacy JavaScript
 
Integrating React.js Into a PHP Application
Integrating React.js Into a PHP ApplicationIntegrating React.js Into a PHP Application
Integrating React.js Into a PHP Application
 
Working with Javascript in Rails
Working with Javascript in RailsWorking with Javascript in Rails
Working with Javascript in Rails
 
JRuby + Rails = Awesome Java Web Framework at Jfokus 2011
JRuby + Rails = Awesome Java Web Framework at Jfokus 2011JRuby + Rails = Awesome Java Web Framework at Jfokus 2011
JRuby + Rails = Awesome Java Web Framework at Jfokus 2011
 
Having Fun with Play
Having Fun with PlayHaving Fun with Play
Having Fun with Play
 
A tour on ruby and friends
A tour on ruby and friendsA tour on ruby and friends
A tour on ruby and friends
 
Real life-coffeescript
Real life-coffeescriptReal life-coffeescript
Real life-coffeescript
 
The Return of JavaScript: 3 Open-Source Projects that are driving JavaScript'...
The Return of JavaScript: 3 Open-Source Projects that are driving JavaScript'...The Return of JavaScript: 3 Open-Source Projects that are driving JavaScript'...
The Return of JavaScript: 3 Open-Source Projects that are driving JavaScript'...
 
10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)
10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)
10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)
 
Ruby/Rails
Ruby/RailsRuby/Rails
Ruby/Rails
 
Dependency Management with RequireJS
Dependency Management with RequireJSDependency Management with RequireJS
Dependency Management with RequireJS
 
Backbone.js — Introduction to client-side JavaScript MVC
Backbone.js — Introduction to client-side JavaScript MVCBackbone.js — Introduction to client-side JavaScript MVC
Backbone.js — Introduction to client-side JavaScript MVC
 

Recently uploaded

From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 

Recently uploaded (20)

From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 

Single Page Web Applications with CoffeeScript, Backbone and Jasmine

Editor's Notes

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. \n
  42. \n
  43. \n
  44. \n
  45. \n
  46. \n
  47. \n
  48. \n
  49. \n
  50. \n
  51. \n
  52. \n
  53. \n
  54. \n
  55. \n
  56. \n
  57. \n
  58. \n
  59. \n
  60. \n
  61. \n
  62. \n
  63. \n
  64. \n
  65. \n
  66. \n
  67. \n
  68. \n
  69. \n
  70. \n
  71. \n
  72. \n
  73. \n
  74. \n
  75. \n
  76. \n
  77. \n
  78. \n
  79. \n
  80. \n
  81. \n
  82. \n
  83. \n
  84. \n
  85. \n
  86. \n
  87. \n
  88. \n
  89. \n
  90. \n
  91. \n
  92. \n
  93. \n
  94. \n
  95. \n
  96. \n
  97. \n
  98. \n
  99. \n
  100. \n
  101. \n
  102. \n
  103. \n
  104. \n
  105. \n
  106. \n
  107. \n
  108. \n
  109. \n
  110. \n
  111. \n
  112. \n
  113. \n
  114. \n
  115. \n
  116. \n
  117. \n
  118. \n
  119. \n
  120. \n
  121. \n
  122. \n
  123. \n
  124. \n
  125. \n