SlideShare a Scribd company logo
1 of 29
Download to read offline
_meteor
Meteor is a platform
built on top of NodeJS
for building real-time web apps.

Building Real-Time JavaScript Web Apps
The real-time web is a set of technologies and
practices that enable users to receive
information as soon as it is published by its
authors, rather than requiring that they or their
software check a source periodically for
updates.
source : wikipedia
_start
$ curl https://install.meteor.com | sh
or
$ [sudo -H] npm install -g meteorite
During the demo the first installation is used
https://github.com/jpuzzler/meteor-workshop
git@github.com:jpuzzler/meteor-workshop.git

github repository for demo code
$ meteor create foreign-exchange

creates /foreign-exchange folder with boilerplate code (.js .css .html)
$ cd foreign-exchange
$ meteor
Start your browser and go to localhost:3000
Meteor Packages

$ meteor add [package_name]

$ meteor list

meteor add bootstrap
_Project structure
$ ls -l foreign-exchange/
main.html # loaded after any thing else
main.js
# loaded after any thing else
/client # runs only on client side + CSS + Templates
!
/server # runs only on server
/public # runs on both client & server + assets
/lib
# files loaded before anything else
/collections # may be to store collections

it’s not a rule but it’s a structure suggestion
_Templates
http://handlebarsjs.com/
Working with templates - Handlebars
<head>
<title>Foreign Exchange</title>
</head>
<body>
<div class="container">
<header class="navbar">
<div class="navbar-inner">
<a class="brand" href="/">Foreign Exchange</a>
</div>
</header>
<div id="main" class="row-fluid">
{{> fxList}}
</div>
</div>
</body>
client/main.html
Working with templates - Handlebars

<template name="fxList">
<div class="posts">
{{#each fx}}
{{> fxItem}}
{{/each}}
</div>
</template>

client/views/bofs_list.html
Working with templates - Manager

var fxData = [{
"location": "Paris",
"currency": "1 EUR",
"target": "USD",
"country":"us",
"rate":1.35}
];
Template.fxList.helpers({
fx: fxData
});

client/views/fx_list.js | git co step02
_Data

Collections
Collections

Data is stored in Meteor in the Collection. A
collection is a special data structure that,
along with publications, takes
care of the job of synchronising real-time
data to and from each connected user's
browser and into the Mongo database.
Collections

FX = new Meteor.Collection(“foreignX”);

collections/bofs.js
Collections seen from server

On the server, the collection acts as an API into your
Mongo database.
$ meteor mongo # starts the embedded mongoDB console
>db.posts.insert({title:’Hello there !’});
>db.posts.find();
{“_id”:ObjectId(..). “title”:”Hello there !”}

MongoDB is the de facto database used by Meteor until now
Collections seen from client
local, in-browser cache of the real Mongo collection
MiniMongo is client-side Mongo client -use DevTools>db.posts.insert({title:’Hello there !’});
1. first insert the data in the client collection
2. tries to sync with server
3. if it’s ok then server is updated and all connected clients
else the inserted item is deleted again.

Latency Compensation
Collections Publications & Subscriptions 1
$ meteor remove autopublish

Meteor.publish('posts', function() {
return Posts.find();
});

Meteor.subscribe('posts');

by default entire collections are accessible by all connected users
http://docs.meteor.com/#publishandsubscribe
Collections Publications & Subscriptions 2
Meteor.publish('posts', function() {
return Posts.find();
});
Publishing Full Collections

Meteor.publish('posts', function() {
return Posts.find({‘author’:’Tom’});
});
Publishing Partial Collections

Meteor.publish('posts', function() {
return Posts.find({},{fields:{author:false}});
});
Publishing Partial Properties
Routing
$ meteor add router
$ meteor update --release 0.6.4.1
…
</div>
</header>
<div id="main" class="row-fluid">
{{renderPage}}
</div>
</div>
</body>

client/main.html
Routing
Meteor.Router.add({
'/': 'fxList'
});
Basic Routing
Meteor.Router.add({
'/': 'postsList',
'/posts/:_id': {
to: 'postPage',
and: function(id) { Session.set('currentPostId', id); }
}
});
Session Driven Routing
client/helpers/router.js
Accounts
$ meteor add accounts-ui accounts-password
<header class="navbar">
<div class="navbar-inner">
<a class="brand" href="/">Foreign Exchange</a>
<!--div class="nav-collapse collapse">
<ul class="nav pull-right">
<li>{{loginButtons}}</li>
</ul>
</div-->
</div>
</header>

client/main.html
Resources
http://meteorhacks.com/understanding-meteor-internals.html
http://meteorhacks.com/introducing-smart-collections.html
https://github.com/arunoda/meteor-smart-collections/
http://stackoverflow.com/questions/tagged/meteor
_Thanks ! Q&A ?

More Related Content

What's hot

Ring: Web Apps in Idiomatic Clojure
Ring: Web Apps in Idiomatic ClojureRing: Web Apps in Idiomatic Clojure
Ring: Web Apps in Idiomatic Clojure
Mark McGranaghan
 
Java script at backend nodejs
Java script at backend   nodejsJava script at backend   nodejs
Java script at backend nodejs
Amit Thakkar
 
Searched gems which supports only ruby 2.6
Searched gems which supports only ruby 2.6Searched gems which supports only ruby 2.6
Searched gems which supports only ruby 2.6
Maki Toshio
 
1 serializando y deserializando datos en red
1  serializando y deserializando datos en red1  serializando y deserializando datos en red
1 serializando y deserializando datos en red
Jesús Estévez
 
Integrate gitolite with mantis
Integrate gitolite with mantisIntegrate gitolite with mantis
Integrate gitolite with mantis
Johnson Chou
 
Play With Theschwartz
Play With TheschwartzPlay With Theschwartz
Play With Theschwartz
Hideo Kimura
 
Connecting to the network
Connecting to the networkConnecting to the network
Connecting to the network
Mu Chun Wang
 

What's hot (20)

Ring: Web Apps in Idiomatic Clojure
Ring: Web Apps in Idiomatic ClojureRing: Web Apps in Idiomatic Clojure
Ring: Web Apps in Idiomatic Clojure
 
Improving Performance and Flexibility of Content Listings Using Criteria API
Improving Performance and Flexibility of Content Listings Using Criteria APIImproving Performance and Flexibility of Content Listings Using Criteria API
Improving Performance and Flexibility of Content Listings Using Criteria API
 
Java script at backend nodejs
Java script at backend   nodejsJava script at backend   nodejs
Java script at backend nodejs
 
Building real-time apps with WebSockets
Building real-time apps with WebSocketsBuilding real-time apps with WebSockets
Building real-time apps with WebSockets
 
Searched gems which supports only ruby 2.6
Searched gems which supports only ruby 2.6Searched gems which supports only ruby 2.6
Searched gems which supports only ruby 2.6
 
1 serializando y deserializando datos en red
1  serializando y deserializando datos en red1  serializando y deserializando datos en red
1 serializando y deserializando datos en red
 
Building Java and Android apps on the blockchain
Building Java and Android apps on the blockchain Building Java and Android apps on the blockchain
Building Java and Android apps on the blockchain
 
Run-Fail-Grow: Creating Tailored Object Oriented Runtimes
Run-Fail-Grow: Creating Tailored Object Oriented RuntimesRun-Fail-Grow: Creating Tailored Object Oriented Runtimes
Run-Fail-Grow: Creating Tailored Object Oriented Runtimes
 
DockerCoreNet
DockerCoreNetDockerCoreNet
DockerCoreNet
 
Integrate gitolite with mantis
Integrate gitolite with mantisIntegrate gitolite with mantis
Integrate gitolite with mantis
 
A Deeper Look at Cargo
A Deeper Look at CargoA Deeper Look at Cargo
A Deeper Look at Cargo
 
web3j Overview
web3j Overviewweb3j Overview
web3j Overview
 
Web3j 2.0 Update
Web3j 2.0 UpdateWeb3j 2.0 Update
Web3j 2.0 Update
 
Membuat virtual environment python
Membuat virtual environment pythonMembuat virtual environment python
Membuat virtual environment python
 
Socket.io
Socket.ioSocket.io
Socket.io
 
A real-world Relay application in production - Stefano Masini - Codemotion Am...
A real-world Relay application in production - Stefano Masini - Codemotion Am...A real-world Relay application in production - Stefano Masini - Codemotion Am...
A real-world Relay application in production - Stefano Masini - Codemotion Am...
 
NodeJS "Web en tiempo real"
NodeJS "Web en tiempo real"NodeJS "Web en tiempo real"
NodeJS "Web en tiempo real"
 
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema RubyTdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
 
Play With Theschwartz
Play With TheschwartzPlay With Theschwartz
Play With Theschwartz
 
Connecting to the network
Connecting to the networkConnecting to the network
Connecting to the network
 

Viewers also liked

Meteor node upnorth-bobdavies
Meteor node upnorth-bobdaviesMeteor node upnorth-bobdavies
Meteor node upnorth-bobdavies
Mark Skeet
 
Next generation web development with node.js and meteor
Next generation web development with node.js and meteorNext generation web development with node.js and meteor
Next generation web development with node.js and meteor
Martin Naumann
 
Clinic Program Coordinator-MA FINAL
Clinic Program Coordinator-MA FINALClinic Program Coordinator-MA FINAL
Clinic Program Coordinator-MA FINAL
Mourisa-Lyn Baier
 
Tessa's Resume Executive II
Tessa's Resume Executive IITessa's Resume Executive II
Tessa's Resume Executive II
Tessa Millerick
 
Amplifying Apartheid ywp15 conference kuala lumpur
Amplifying Apartheid ywp15 conference kuala lumpurAmplifying Apartheid ywp15 conference kuala lumpur
Amplifying Apartheid ywp15 conference kuala lumpur
Wesley Hill
 
seminario commercio armi
seminario commercio armiseminario commercio armi
seminario commercio armi
cpz
 

Viewers also liked (20)

Meteor node upnorth-bobdavies
Meteor node upnorth-bobdaviesMeteor node upnorth-bobdavies
Meteor node upnorth-bobdavies
 
Next generation web development with node.js and meteor
Next generation web development with node.js and meteorNext generation web development with node.js and meteor
Next generation web development with node.js and meteor
 
Meteor js
Meteor jsMeteor js
Meteor js
 
Deploy meteor in production
Deploy meteor in productionDeploy meteor in production
Deploy meteor in production
 
Meteor presentation
Meteor presentationMeteor presentation
Meteor presentation
 
Offience's Node showcase
Offience's Node showcaseOffience's Node showcase
Offience's Node showcase
 
Meteor Deployment Planning
Meteor Deployment PlanningMeteor Deployment Planning
Meteor Deployment Planning
 
Why meteor
Why meteorWhy meteor
Why meteor
 
Intro To Meteor (Las Vegas Ruby User Group Talk)
Intro To Meteor (Las Vegas Ruby User Group Talk)Intro To Meteor (Las Vegas Ruby User Group Talk)
Intro To Meteor (Las Vegas Ruby User Group Talk)
 
Clinic Program Coordinator-MA FINAL
Clinic Program Coordinator-MA FINALClinic Program Coordinator-MA FINAL
Clinic Program Coordinator-MA FINAL
 
Casa romana
Casa romanaCasa romana
Casa romana
 
Tessa's Resume Executive II
Tessa's Resume Executive IITessa's Resume Executive II
Tessa's Resume Executive II
 
Latihan Matriks
Latihan MatriksLatihan Matriks
Latihan Matriks
 
Fotos evento alas avigilon rev2
Fotos evento alas avigilon rev2Fotos evento alas avigilon rev2
Fotos evento alas avigilon rev2
 
Amplifying Apartheid ywp15 conference kuala lumpur
Amplifying Apartheid ywp15 conference kuala lumpurAmplifying Apartheid ywp15 conference kuala lumpur
Amplifying Apartheid ywp15 conference kuala lumpur
 
Informe de resultados unidad lenguaje
Informe de resultados unidad lenguajeInforme de resultados unidad lenguaje
Informe de resultados unidad lenguaje
 
farhad newwww pdf 2
farhad newwww pdf 2farhad newwww pdf 2
farhad newwww pdf 2
 
CyberOptics Exhibit Design
CyberOptics Exhibit DesignCyberOptics Exhibit Design
CyberOptics Exhibit Design
 
Las habilidades directivas
Las habilidades directivasLas habilidades directivas
Las habilidades directivas
 
seminario commercio armi
seminario commercio armiseminario commercio armi
seminario commercio armi
 

Similar to The End of Dinosaurs happened because of [a] Meteor

Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDEUse Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
Benjamin Cabé
 

Similar to The End of Dinosaurs happened because of [a] Meteor (20)

Meteor
MeteorMeteor
Meteor
 
Meteor Meet-up San Diego December 2014
Meteor Meet-up San Diego December 2014Meteor Meet-up San Diego December 2014
Meteor Meet-up San Diego December 2014
 
METEOR 101
METEOR 101METEOR 101
METEOR 101
 
Meteor.js Workshop by Dopravo
Meteor.js Workshop by DopravoMeteor.js Workshop by Dopravo
Meteor.js Workshop by Dopravo
 
Webinar: Building Your First App in Node.js
Webinar: Building Your First App in Node.jsWebinar: Building Your First App in Node.js
Webinar: Building Your First App in Node.js
 
Webinar: Building Your First App in Node.js
Webinar: Building Your First App in Node.jsWebinar: Building Your First App in Node.js
Webinar: Building Your First App in Node.js
 
MongoDB and Node.js
MongoDB and Node.jsMongoDB and Node.js
MongoDB and Node.js
 
React Native for multi-platform mobile applications
React Native for multi-platform mobile applicationsReact Native for multi-platform mobile applications
React Native for multi-platform mobile applications
 
Meteor
MeteorMeteor
Meteor
 
Plone FSR
Plone FSRPlone FSR
Plone FSR
 
Full Stack React Workshop [CSSC x GDSC]
Full Stack React Workshop [CSSC x GDSC]Full Stack React Workshop [CSSC x GDSC]
Full Stack React Workshop [CSSC x GDSC]
 
Understanding meteor
Understanding meteorUnderstanding meteor
Understanding meteor
 
Meteoro de pegasuus! Desenvolvendo aplicações realtime com MeteorJS
Meteoro de pegasuus! Desenvolvendo aplicações realtime com MeteorJSMeteoro de pegasuus! Desenvolvendo aplicações realtime com MeteorJS
Meteoro de pegasuus! Desenvolvendo aplicações realtime com MeteorJS
 
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDEUse Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
 
Reactive application using meteor
Reactive application using meteorReactive application using meteor
Reactive application using meteor
 
CraftCamp for Students - Introduction to Meteor.js
CraftCamp for Students - Introduction to Meteor.jsCraftCamp for Students - Introduction to Meteor.js
CraftCamp for Students - Introduction to Meteor.js
 
Dependency management in Magento with Composer
Dependency management in Magento with ComposerDependency management in Magento with Composer
Dependency management in Magento with Composer
 
Introduction to meteor
Introduction to meteorIntroduction to meteor
Introduction to meteor
 
Kubernetes for the PHP developer
Kubernetes for the PHP developerKubernetes for the PHP developer
Kubernetes for the PHP developer
 
Get started with meteor | designveloper software agency meteor prime partner
Get started with meteor | designveloper software agency   meteor prime partnerGet started with meteor | designveloper software agency   meteor prime partner
Get started with meteor | designveloper software agency meteor prime partner
 

Recently uploaded

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 

The End of Dinosaurs happened because of [a] Meteor

  • 2. Meteor is a platform built on top of NodeJS for building real-time web apps. Building Real-Time JavaScript Web Apps
  • 3. The real-time web is a set of technologies and practices that enable users to receive information as soon as it is published by its authors, rather than requiring that they or their software check a source periodically for updates. source : wikipedia
  • 5. $ curl https://install.meteor.com | sh or $ [sudo -H] npm install -g meteorite During the demo the first installation is used
  • 7. $ meteor create foreign-exchange creates /foreign-exchange folder with boilerplate code (.js .css .html)
  • 9. Start your browser and go to localhost:3000
  • 10. Meteor Packages $ meteor add [package_name] $ meteor list meteor add bootstrap
  • 12. $ ls -l foreign-exchange/ main.html # loaded after any thing else main.js # loaded after any thing else /client # runs only on client side + CSS + Templates ! /server # runs only on server /public # runs on both client & server + assets /lib # files loaded before anything else /collections # may be to store collections it’s not a rule but it’s a structure suggestion
  • 15. Working with templates - Handlebars <head> <title>Foreign Exchange</title> </head> <body> <div class="container"> <header class="navbar"> <div class="navbar-inner"> <a class="brand" href="/">Foreign Exchange</a> </div> </header> <div id="main" class="row-fluid"> {{> fxList}} </div> </div> </body> client/main.html
  • 16. Working with templates - Handlebars <template name="fxList"> <div class="posts"> {{#each fx}} {{> fxItem}} {{/each}} </div> </template> client/views/bofs_list.html
  • 17. Working with templates - Manager var fxData = [{ "location": "Paris", "currency": "1 EUR", "target": "USD", "country":"us", "rate":1.35} ]; Template.fxList.helpers({ fx: fxData }); client/views/fx_list.js | git co step02
  • 19. Collections Data is stored in Meteor in the Collection. A collection is a special data structure that, along with publications, takes care of the job of synchronising real-time data to and from each connected user's browser and into the Mongo database.
  • 20. Collections FX = new Meteor.Collection(“foreignX”); collections/bofs.js
  • 21. Collections seen from server On the server, the collection acts as an API into your Mongo database. $ meteor mongo # starts the embedded mongoDB console >db.posts.insert({title:’Hello there !’}); >db.posts.find(); {“_id”:ObjectId(..). “title”:”Hello there !”} MongoDB is the de facto database used by Meteor until now
  • 22. Collections seen from client local, in-browser cache of the real Mongo collection MiniMongo is client-side Mongo client -use DevTools>db.posts.insert({title:’Hello there !’}); 1. first insert the data in the client collection 2. tries to sync with server 3. if it’s ok then server is updated and all connected clients else the inserted item is deleted again. Latency Compensation
  • 23. Collections Publications & Subscriptions 1 $ meteor remove autopublish Meteor.publish('posts', function() { return Posts.find(); }); Meteor.subscribe('posts'); by default entire collections are accessible by all connected users http://docs.meteor.com/#publishandsubscribe
  • 24. Collections Publications & Subscriptions 2 Meteor.publish('posts', function() { return Posts.find(); }); Publishing Full Collections Meteor.publish('posts', function() { return Posts.find({‘author’:’Tom’}); }); Publishing Partial Collections Meteor.publish('posts', function() { return Posts.find({},{fields:{author:false}}); }); Publishing Partial Properties
  • 25. Routing $ meteor add router $ meteor update --release 0.6.4.1 … </div> </header> <div id="main" class="row-fluid"> {{renderPage}} </div> </div> </body> client/main.html
  • 26. Routing Meteor.Router.add({ '/': 'fxList' }); Basic Routing Meteor.Router.add({ '/': 'postsList', '/posts/:_id': { to: 'postPage', and: function(id) { Session.set('currentPostId', id); } } }); Session Driven Routing client/helpers/router.js
  • 27. Accounts $ meteor add accounts-ui accounts-password <header class="navbar"> <div class="navbar-inner"> <a class="brand" href="/">Foreign Exchange</a> <!--div class="nav-collapse collapse"> <ul class="nav pull-right"> <li>{{loginButtons}}</li> </ul> </div--> </div> </header> client/main.html