Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Meteor.js
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Matthew Rudy Jacobs
August 08, 2012
Technology
1.8k
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Meteor.js
My talk given at Codeaholics.hk on Wednesday 8th August 2012.
Matthew Rudy Jacobs
August 08, 2012
Transcript
40 slides
METEOR.JS 8th August 2012 - Codeaholics.hk @MatthewRudy
SOLR TAKEDA HOLMES
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
LEARN ABOUT IT http://docs.meteor.com https://github.com/siuying/todomvc-meteor `meteor create --example leaderboard`
7 PRINCIPLES marketing-style
#1 DATA ON THE WIRE no HTML rendered on the
server JSON sent to the browser the browser renders templates
#2 ONE LANGUAGE All code is Javascript (or maybe coffeescript)
#3 DATABASE EVERYWHERE Client Data API mirrors the Server Database
API the local data API looks just like Mongo
#4 LATENCY COMPENSATION All data operations take place in memory
first The callback to the server is asynchronous What happens if it fails?
#5 FULL STACK REACTIVITY Every thing has a callback Templates
re-render themselves automatically
#6 EMBRACE THE ECOSYSTEM Plug and Play Use Backbone or
whatever
#7 SIMPLICITY = PRODUCTIVITY Clean and Simple APIs
WHAT’S THE REAL DEAL?
COLLECTIONS # define Items = new Meteor.Collection “items” # insert
Items.insert {name: “giraffe”} # find Items.find {}, {sort: {name: 1}}
SESSIONS # get Session.get(“selected”) #set Session.set(“selected”, item._id) # check Session.equals(“selected”,
this._id)
HANDLEBARS <template name=”list”> <h1>Items</h1> <ul> {{#each items}} <li>{{> item }}</li>
{{/each}} </ul> </template>
TEMPLATES They automatically re-render when data changes!
TEMPLATES # {{> item }} <template name=”item”> <article class=”item”> {{name}}
</article> </template>
HELPERS {{#if selected}}selected{{/if}} Template.item.selected = -> Session.equals(“selected”, this._id)
{{pluralize itemCount “item” “items”}} Template.list.itemCount = -> Items.find({}).count() Template.list.pluralize =
(n, s, p) -> “#{n} #{if n == 1 then s else p}” HELPERS WITH ARGUMENTS
EVENTS Template.item.events = “click article”: -> Session.set(“selected”, this._id)
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
CLIENT + SERVER IN FOLDERS client/some.js server/some.js shared.js
PACKAGES Backbone - Backbone on Client + Server Bootstrap -
Adds the Bootstrap CSS Coffeescript - Compiles .coffee files Handlebars - the default templating system
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!
HTML CONCATENATION <body> <h1>The header</h1> </body> <body> <nav class=”navbar navbar-fixed-top”
/> </body>
TIME FOR A PLAY Live demo!
meteor create --example leaderboard
PROBLEMS there are quite a few
COMPLEXITY going beyond the basics things quickly get complex
NO NAMESPACE FOR TEMPLATES item_form item_list item_show content sidebar nav
AUTHENTICATION there is an “auth” branch but its hard to
use
BETTER TOOLS MRT is a good idea but frequently breaks
for me
BETTER DEBUG Coffee -> JS many JS files -> one
JS file => Big confusion
ROUTING Just use Backbone.Router?
TESTING? An afterthought
BUT...
ITS COOL Stuff magically works
THE FUTURE It’s awesome as a deployment tool Better integration
with Backbone and Angular
THANKS Any Questions?
More Decks by Matthew Rudy Jacobs
See All by Matthew Rudy Jacobs
From Developer to Architect (and back again)
matthewrudy
3
270
Humans are Hard
matthewrudy
0
170
[Alpha] Humans Are Hard
matthewrudy
0
150
From Developer To Architect
matthewrudy
0
130
Git Commit Signing: Code we can trust?
matthewrudy
0
220
We Need To Talk About Postgres
matthewrudy
0
120
Coding as a Team At GoGoVan
matthewrudy
3
480
10 Years of Code
matthewrudy
0
150
Elixir - Part 1
matthewrudy
1
230
Other Decks in Technology
See All in Technology
cdkdがどんだけ早いか、実際に動かして見てみよう
smt7174
1
140
農家は秘伝のタレを知らない - NOBODY KNOWS THE HIDDEN SOURCE - Kaggriculture 3rd Place Solution
masspeaks
3
640
設計手法を「道具」として使いこなすために
a_suenami
7
1.5k
From vibe coding to reliable (agentic) development
jcabot
0
130
RAGの改善を速く回すための評価基盤
yosukeyoshida
6
3.4k
こんなに変わった! AWSネットワークの常識
shotashiratori
16
11k
サーバーラックは作る時代! 3Dプリンターで作る10インチラックのススメ
jacopen
2
490
お風呂場をサーバルームにしよう
yusuke427
0
380
その修正で本当に速くなったのか? k6とOpenTelemetryで確かめる性能改善 / Performance review with k6 and OpenTelemetry
ymotongpoo
3
350
IoTのデータ保存をSREの観点で考える
grimoh
1
110
AI-Ready なデータ基盤ってなに? & 新卒未経験が、いま考えていること
imuta
0
1k
AWS Client VPNの設定でハマったポイントとその過程での気づき
amarelo_n24
1
420
Featured
See All Featured
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
750
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.3k
Marketing to machines
jonoalderson
1
6k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
540
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.7k
The browser strikes back
jonoalderson
0
2k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.7k
Between Models and Reality
mayunak
4
590
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
50
10k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
620
brightonSEO & MeasureFest 2025 - Winning Strategies for Black Friday CRO & PPC - Christian Goodrich
cargoodrich
3
900