SlideShare a Scribd company logo
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 Performance
Parashuram 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 Karma
ExoLeaders.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 ReactJS
Visual Engineering
 
Future of Web Apps: Google Gears
Future of Web Apps: Google GearsFuture of Web Apps: Google Gears
Future of Web Apps: Google Gears
dion
 
Intro to Ember.JS 2016
Intro to Ember.JS 2016Intro to Ember.JS 2016
Intro to Ember.JS 2016
Sandino Núñez
 
Symfony tips and tricks
Symfony tips and tricksSymfony tips and tricks
Symfony tips and tricks
Javier 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 Workshop
CalderaLearn
 
Play vs Rails
Play vs RailsPlay vs Rails
Play vs Rails
Daniel Cukier
 
The JavaFX Ecosystem
The JavaFX EcosystemThe JavaFX Ecosystem
The JavaFX Ecosystem
Andres Almiray
 
Rails 3: Dashing to the Finish
Rails 3: Dashing to the FinishRails 3: Dashing to the Finish
Rails 3: Dashing to the FinishYehuda Katz
 
Writing Pluggable Software
Writing Pluggable SoftwareWriting Pluggable Software
Writing Pluggable Software
Tatsuhiko Miyagawa
 
[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.js
Jay 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 React
Troy Miles
 
Workshop 3: JavaScript build tools
Workshop 3: JavaScript build toolsWorkshop 3: JavaScript build tools
Workshop 3: JavaScript build tools
Visual 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.3
Kris 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 Apps
Mike 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 Framework
Daniel Spector
 
Ruby on Rails - Introduction
Ruby on Rails - IntroductionRuby on Rails - Introduction
Ruby on Rails - Introduction
Vagmi Mudumbai
 
[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC
Alive Kuo
 
HTML5 for the Silverlight Guy
HTML5 for the Silverlight GuyHTML5 for the Silverlight Guy
HTML5 for the Silverlight Guy
David 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 Beginners
Jonathan Wage
 
[Bristol WordPress] Supercharging WordPress Development
[Bristol WordPress] Supercharging WordPress Development[Bristol WordPress] Supercharging WordPress Development
[Bristol WordPress] Supercharging WordPress Development
Adam 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 JavaScript
Guy 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 Application
Andrew Rota
 
Working with Javascript in Rails
Working with Javascript in RailsWorking with Javascript in Rails
Working with Javascript in Rails
Seungkyun 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-coffeescript
David 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/Rails
rstankov
 
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 MVC
pootsbook
 

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

PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 

Recently uploaded (20)

PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 

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