Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Meteor.js

 Meteor.js

My talk given at Codeaholics.hk on Wednesday 8th August 2012.

Avatar for Matthew Rudy Jacobs

Matthew Rudy Jacobs

August 08, 2012
Tweet

More Decks by Matthew Rudy Jacobs

Other Decks in Technology

Transcript

  1. METEOR a javascript full stack framework compiles, combines, and distributes

    your JS, CSS, and HTML deploys on the fly to users without interrupting their session
  2. #1 DATA ON THE WIRE no HTML rendered on the

    server JSON sent to the browser the browser renders templates
  3. #3 DATABASE EVERYWHERE Client Data API mirrors the Server Database

    API the local data API looks just like Mongo
  4. #4 LATENCY COMPENSATION All data operations take place in memory

    first The callback to the server is asynchronous What happens if it fails?
  5. COLLECTIONS # define Items = new Meteor.Collection “items” # insert

    Items.insert {name: “giraffe”} # find Items.find {}, {sort: {name: 1}}
  6. Item = new Meteor.collection “items” if Meteor.is_client Session.set(“selected”, null) if

    Meteor.is_server Secret = 123 CLIENT + SERVER IN THE SAME FILE
  7. PACKAGES Backbone - Backbone on Client + Server Bootstrap -

    Adds the Bootstrap CSS Coffeescript - Compiles .coffee files Handlebars - the default templating system
  8. PACKAGES (AUTH) accounts - central API for accounts accounts-ui -

    log in and sign up accounts-facebook - plug into facebook accounts-weibo - plug into weibo insecure - remove!