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 ClojureMark McGranaghan
 
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 APINils Breunese
 
Java script at backend nodejs
Java script at backend   nodejsJava script at backend   nodejs
Java script at backend nodejsAmit 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.6Maki 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 redJesús Estévez
 
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 Conor Svensson
 
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 RuntimesGuille Polito
 
Integrate gitolite with mantis
Integrate gitolite with mantisIntegrate gitolite with mantis
Integrate gitolite with mantisJohnson Chou
 
A Deeper Look at Cargo
A Deeper Look at CargoA Deeper Look at Cargo
A Deeper Look at CargoAnton Weiss
 
Membuat virtual environment python
Membuat virtual environment pythonMembuat virtual environment python
Membuat virtual environment pythonJunifar hidayat
 
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...Codemotion
 
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema RubyTdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema RubyFabio Akita
 
Play With Theschwartz
Play With TheschwartzPlay With Theschwartz
Play With TheschwartzHideo Kimura
 
Connecting to the network
Connecting to the networkConnecting to the network
Connecting to the networkMu 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-bobdaviesMark 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 meteorMartin Naumann
 
Deploy meteor in production
Deploy meteor in productionDeploy meteor in production
Deploy meteor in productionMiro Radenovic
 
Meteor presentation
Meteor presentationMeteor presentation
Meteor presentationAndy Bute
 
Offience's Node showcase
Offience's Node showcaseOffience's Node showcase
Offience's Node showcasecloud4le
 
Meteor Deployment Planning
Meteor Deployment PlanningMeteor Deployment Planning
Meteor Deployment PlanningRandell Hynes
 
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)Almog Koren
 
Clinic Program Coordinator-MA FINAL
Clinic Program Coordinator-MA FINALClinic Program Coordinator-MA FINAL
Clinic Program Coordinator-MA FINALMourisa-Lyn Baier
 
Tessa's Resume Executive II
Tessa's Resume Executive IITessa's Resume Executive II
Tessa's Resume Executive IITessa Millerick
 
Amplifying Apartheid ywp15 conference kuala lumpur
Amplifying Apartheid ywp15 conference kuala lumpurAmplifying Apartheid ywp15 conference kuala lumpur
Amplifying Apartheid ywp15 conference kuala lumpurWesley Hill
 
CyberOptics Exhibit Design
CyberOptics Exhibit DesignCyberOptics Exhibit Design
CyberOptics Exhibit DesignRick Krautbauer
 
Las habilidades directivas
Las habilidades directivasLas habilidades directivas
Las habilidades directivaskelvin monsalve
 
seminario commercio armi
seminario commercio armiseminario commercio armi
seminario commercio armicpz
 

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

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 2014Lou Sacco
 
Meteor.js Workshop by Dopravo
Meteor.js Workshop by DopravoMeteor.js Workshop by Dopravo
Meteor.js Workshop by DopravoArabNet ME
 
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.jsMongoDB
 
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.jsMongoDB
 
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 applicationsMatteo Manchi
 
Plone FSR
Plone FSRPlone FSR
Plone FSRfulv
 
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]GDSC UofT Mississauga
 
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 MeteorJSJulio Antonio Mendonça de Marins
 
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 IDEBenjamin Cabé
 
Reactive application using meteor
Reactive application using meteorReactive application using meteor
Reactive application using meteorSapna Upreti
 
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.jscraftworkz
 
Dependency management in Magento with Composer
Dependency management in Magento with ComposerDependency management in Magento with Composer
Dependency management in Magento with ComposerManuele Menozzi
 
Introduction to meteor
Introduction to meteorIntroduction to meteor
Introduction to meteorNodeXperts
 
Kubernetes for the PHP developer
Kubernetes for the PHP developerKubernetes for the PHP developer
Kubernetes for the PHP developerPaul Czarkowski
 
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 partnerDesignveloper
 

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

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 

Recently uploaded (20)

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 

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