SlideShare a Scribd company logo
1 of 40
The JavaScript App Platform
Meet with
Presented by -
Tahmina Khatoon
Software Engineer, Genweb2
Build Web Applications since 2008
What will be covered
● Introduction to meteor
● Principles of meteor
● Meteor architecture
● Live coding a simple meteor app
WHAT IS ?
What is Meteor?
● Meteor is an ultra-simple environment for
building modern web and mobile app using
Javascript.
● Build to the power of next generation app
o Rich user interfaces
o Collaborative multi-user applications
o Cross platform apps
o Fast development
7 Meteor Principles
1. Data on the Wire
2. One Language
3. Database Everywhere
4. Latency Compensation
5. Full Stack Reactivity
6. Embrace the Ecosystem
7. Simplicity = Productivity
Why Meteor?
● Applications are real-time by default
● Develop with just one language
● Save a lot of time with smart packages
● Optimized for developer happiness
● Friendly to beginner developers
● Ahead of the tech curve
● Community is extremely supportive
Data on the Wire
Meteor doesn't send HTML over the network.
The server sends data and lets the client
render it.
Data on the Wire (Continue ...)
Traditional Web Architecture
Client
Server
HTTP
HTML
No Persistent Connection
http://www.prothom-alo.com
<html>
…
news - 1
news - 2
...
<.html>
Data on the Wire (Continue ...)
Traditional Web Architecture Modern Web Architecture
Client
Server
Client
Server
HTTPHTML
No Persistent Connection Persistent Connection
DDP
<html>
…
news - 1
news - 2
...
<.html>
http://www.prothom-alo.com http://www.prothom-alo.com
<html>
news - 1
news - 2
<.html>
news - 3
.
.
news - 4
.
.
DDP - Distributed Data Protocol
A protocol based on JSON.
Technically, DDP can be implemented on top of any
duplex transport. Meteor’s current implementation is
based on WebSockets and SockJS.
SockJS is a WebSockets emulation transport, which can be used when WebSockets is not available.
DDP - Distributed Data Protocol
DDP mainly does two things:
● It handles Remote Procedure Calls (RPC).
● It manages data.
DDP - Distributed Data Protocol
DDP mainly does two things:
● It handles Remote Procedure Calls (RPC).
● It manages data.
Handling Remote Procedure Calls
1. {"msg":"method",
"method":
"transferMoney",
"params": ["1000USD",
"arunoda", "sacha"],
id": "randomId-1"}
2. {"msg": "result", id":
"randomId-1": "result":
"5000USD"}
3. {"msg": "updated",
"methods": ["randomId-
1"]}
It notifies the caller after all the write operations in the method have been reflected to all the
other connected clients.
DDP - Managing Data
The DDP protocol has three types of notification: added, changed and
removed
1. The DDP client (sacha) sends a
subscription request for his account.
2. He will receive a couple of added
notifications with the current
transactions in his account.
3. After all the transactions have been
sent by the DDP server (bank), DDP
will send a special message called
ready. The ready message indicates
that all the initial data for the
subscription has been sent and you
are good to go.
4. Some time later, after arunoda has
sent his transfer, sacha will receive
the transaction as another added
notification.
One Language
Meteor lets you write both the client and the
server parts of your application in JavaScript.
One Language
Client
Server
Database
One Language
Client
Server
Database
One Language
Client
Server
Database
Database Everywhere
You can use the same methods to access your
database from the client or the server.
● MongoDB on the server
● Minimongo in the browser
● Meteor keeps it all in sync
Mini Databases
● The minimongo package is a reimplementation of
(almost) the entire MongoDB API, against an in-
memory JavaScript database.
● It is like a MongoDB emulator that runs inside your web
browser. You can insert data into it and search, sort,
and update that data.
https://www.meteor.com/mini-databases
Latency Compensation
On the client, Meteor prefetches data and
simulates models to make it look like server
method calls return instantly.
Latency Compensation
In a traditional
application, when a
user does some
action on an app,
they have to wait
until the request is
processed on the
server before the
changes are
reflected by the UI.
Latency Compensation
But with latency
compensation, users
no longer need to
wait. The result of
an action is
reflected by the
browser
immediately. This is
a built-in feature of
Meteor and you can
use it very easily.
Implementing latency compensation
● Latency compensation works only for write operations to a data store
supported by Meteor (currently only MongoDB and Redis).
● For Third-party service like Twitter, there is no way to implement
latency compensation directly.
● There are only two places where you can do a write operation to a data
store: inside a method call or directly via a local collection.
Full Stack Reactivity
In Meteor, realtime is the
default. All layers, from
database to template,
update themselves
automatically when
necessary.
● Client UI and database
are updated 1st
● Change sent to server
● Issues are resolved after
the fact
Embrace the Ecosystem.
Meteor is open source and integrates with
existing open source tools and frameworks.
Simplicity = Productivity.
The best way to make something seem simple
is to have it actually be simple. Meteor's main
functionality has clean, classically beautiful
APIs.
DEMO TIME
App - Topic Bank
Topic Name Suggested By Vote Action
Dart Fyaz 10
Meteor Tahmina 12
Up Down
Up Down
Topic Bank
Let’s Get Started!
curl https://install.meteor.com/ | sh
Installing Meteor
Creating an app
meteor create hotTopics
cd hotTopics
meteor
Run app
Project Structure
lib/ # <- any common code for client/server.
lib/config.js # <- general configuration
lib/methods.js # <- Meteor.method definitions
lib/external # <- common code from someone else
## Note that js files in lib folders are loaded before other js files.
collections/ # <- definitions of collections and methods on them (could be models/)
client/lib # <- client specific libraries (also loaded first)
client/lib/config.js # <- configuration of any client side packages
client/lib/helpers # <- any helpers (handlebars or otherwise) that are used often in view files
client/main.js # <- subscriptions, basic Meteor.startup code.
client/index.html # <- toplevel html
client/index.js # <- and its JS
client/views/<page>.html # <- the templates specific to a single page
client/views/<page>.js # <- and the JS to hook it up
client/views/<type>/ # <- if you find you have a lot of views of the same object type
server/publications.js # <- Meteor.publish definitions
server/lib/config.js # <- configuration of server side packages
The JavaScript and CSS files in an application are loaded according to these
rules:
● Files in subdirectories are loaded before files in parent directories, so
that files in the deepest subdirectory are loaded first, and files in the
root directory are loaded last.
● Within a directory, files are loaded in alphabetical order by filename.
● After sorting as described above, all files under directories named lib are
moved before everything else (preserving their order).
● Finally, all files that match main.* are moved after everything else
(preserving their order).
CSS and Javascript Files Ordering
Meteor parses all of the HTML files in app folder and identifies three top-level
tags:
● <head>
● <body>
● <template>
Default Template Engine: Blaze
Can be replaced with any other template engine.
Create html view
Create html view
<head>
<title>Topic Bank</title>
</head>
<body>
<div class="container">
{{> header}}
{{> topicList}}
</div>
</body>
<template name="header">
<div class="row text-center">
<h1>Topic Bank</h1>
</div>
</template>
<template name="topicList">
<div class="row">
<div class="col-md-12">
</div>
</div>
</template>
<table class="table table-bordered">
<thead>
<tr>
<th>Topic Name</th>
<th>Suggested By</th>
<th>Vote</th>
<th>Action</th>
</tr>
</thead>
<tbody>
{{#each topics }}
<tr>
<td>{{title}}</td>
<td><i>{{proposed_by}}</i></td>
<td>({{vote}} votes)</td>
<td></td>
</tr>
{{/each }}
</tbody>
</table>
Include package
Meteor Package manager: ATMOSPHERE
meteor add mizzao:bootstrap-3
Add Package in project (example: bootstrap-3)
meteor list
List all installed packages
Publish and Subscribe
Publish and Subscribe
// Create a collection
Topics = new Meteor.Collection('topics');
if (Meteor.isServer) {
// Publish collection
Meteor.publish('topics', function () {
return Topics.find();
});
} else if (Meteor.isClient) {
// Subscribe collection
Meteor.subscribe('topics');
Template.topicList.helpers({
topics: function () {
return Topics.find();
}
});
}
Related Links
https://www.youtube.com/watch?v=OXwnvkE5t_Y
https://www.youtube.com/watch?v=RDQ2GCWYIHI
http://www.slideshare.net/henrikingo/meteor-next-generation-stack-
41232294?related=1
https://medium.com/@benstr/meteorjs-vs-angularjs-aint-a-thing-
3559b74d52cc
http://www.meteorpedia.com/read/Why_Meteor
https://www.eventedmind.com/
https://meteorhacks.com/introduction-to-latency-compensation
THANK YOU

More Related Content

What's hot

Angular meteor for angular devs
Angular meteor for angular devsAngular meteor for angular devs
Angular meteor for angular devsArc & Codementor
 
Meteor js - TechPeaks Developers Meeting
Meteor js - TechPeaks Developers MeetingMeteor js - TechPeaks Developers Meeting
Meteor js - TechPeaks Developers MeetingFrancesco Corazza
 
Intro to Meteor [Deprecated]
Intro to Meteor [Deprecated]Intro to Meteor [Deprecated]
Intro to Meteor [Deprecated]MeteorJS
 
UI Animations in Meteor
UI Animations in MeteorUI Animations in Meteor
UI Animations in MeteorNick Wientge
 
Meteor Framework Introduction
Meteor Framework IntroductionMeteor Framework Introduction
Meteor Framework IntroductionRiza Fahmi
 
Meteor intro- ktmjs
Meteor intro- ktmjsMeteor intro- ktmjs
Meteor intro- ktmjsPiyush Thapa
 
Introduction to Meteor - Worldwide Meteor Day
Introduction to Meteor - Worldwide Meteor DayIntroduction to Meteor - Worldwide Meteor Day
Introduction to Meteor - Worldwide Meteor DayM A Hossain Tonu
 
Introduction to Android M
Introduction to Android MIntroduction to Android M
Introduction to Android Mamsanjeev
 
From MEAN to the MERN Stack
From MEAN to the MERN StackFrom MEAN to the MERN Stack
From MEAN to the MERN StackTroy Miles
 
Microservices for the Masses with Spring Boot, JHipster, and JWT - J-Spring 2017
Microservices for the Masses with Spring Boot, JHipster, and JWT - J-Spring 2017Microservices for the Masses with Spring Boot, JHipster, and JWT - J-Spring 2017
Microservices for the Masses with Spring Boot, JHipster, and JWT - J-Spring 2017Matt Raible
 
How to Implement Micro Frontend Architecture using Angular Framework
How to Implement Micro Frontend Architecture using Angular FrameworkHow to Implement Micro Frontend Architecture using Angular Framework
How to Implement Micro Frontend Architecture using Angular FrameworkRapidValue
 
Microservices for the Masses with Spring Boot, JHipster, and JWT - Devoxx UK...
 Microservices for the Masses with Spring Boot, JHipster, and JWT - Devoxx UK... Microservices for the Masses with Spring Boot, JHipster, and JWT - Devoxx UK...
Microservices for the Masses with Spring Boot, JHipster, and JWT - Devoxx UK...Matt Raible
 
Create a meteor chat app in 30 minutes
Create a meteor chat app in 30 minutesCreate a meteor chat app in 30 minutes
Create a meteor chat app in 30 minutesDesignveloper
 

What's hot (20)

Meteor.js
Meteor.jsMeteor.js
Meteor.js
 
Angular meteor for angular devs
Angular meteor for angular devsAngular meteor for angular devs
Angular meteor for angular devs
 
Meteor + React
Meteor + ReactMeteor + React
Meteor + React
 
Meteor js - TechPeaks Developers Meeting
Meteor js - TechPeaks Developers MeetingMeteor js - TechPeaks Developers Meeting
Meteor js - TechPeaks Developers Meeting
 
Intro to Meteor [Deprecated]
Intro to Meteor [Deprecated]Intro to Meteor [Deprecated]
Intro to Meteor [Deprecated]
 
UI Animations in Meteor
UI Animations in MeteorUI Animations in Meteor
UI Animations in Meteor
 
Meteor Framework Introduction
Meteor Framework IntroductionMeteor Framework Introduction
Meteor Framework Introduction
 
Meteor
MeteorMeteor
Meteor
 
Meteor intro- ktmjs
Meteor intro- ktmjsMeteor intro- ktmjs
Meteor intro- ktmjs
 
Introduction to Meteor - Worldwide Meteor Day
Introduction to Meteor - Worldwide Meteor DayIntroduction to Meteor - Worldwide Meteor Day
Introduction to Meteor - Worldwide Meteor Day
 
Tech Talk on ReactJS
Tech Talk on ReactJSTech Talk on ReactJS
Tech Talk on ReactJS
 
Meteor js
Meteor jsMeteor js
Meteor js
 
Introduction to Android M
Introduction to Android MIntroduction to Android M
Introduction to Android M
 
From MEAN to the MERN Stack
From MEAN to the MERN StackFrom MEAN to the MERN Stack
From MEAN to the MERN Stack
 
The productive developer guide to React
The productive developer guide to ReactThe productive developer guide to React
The productive developer guide to React
 
Microservices for the Masses with Spring Boot, JHipster, and JWT - J-Spring 2017
Microservices for the Masses with Spring Boot, JHipster, and JWT - J-Spring 2017Microservices for the Masses with Spring Boot, JHipster, and JWT - J-Spring 2017
Microservices for the Masses with Spring Boot, JHipster, and JWT - J-Spring 2017
 
Building UWP apps with React-Native
Building UWP apps with React-NativeBuilding UWP apps with React-Native
Building UWP apps with React-Native
 
How to Implement Micro Frontend Architecture using Angular Framework
How to Implement Micro Frontend Architecture using Angular FrameworkHow to Implement Micro Frontend Architecture using Angular Framework
How to Implement Micro Frontend Architecture using Angular Framework
 
Microservices for the Masses with Spring Boot, JHipster, and JWT - Devoxx UK...
 Microservices for the Masses with Spring Boot, JHipster, and JWT - Devoxx UK... Microservices for the Masses with Spring Boot, JHipster, and JWT - Devoxx UK...
Microservices for the Masses with Spring Boot, JHipster, and JWT - Devoxx UK...
 
Create a meteor chat app in 30 minutes
Create a meteor chat app in 30 minutesCreate a meteor chat app in 30 minutes
Create a meteor chat app in 30 minutes
 

Similar to Meet with Meteor

Reactive Application Using METEOR
Reactive Application Using METEORReactive Application Using METEOR
Reactive Application Using METEORNodeXperts
 
NodeJS guide for beginners
NodeJS guide for beginnersNodeJS guide for beginners
NodeJS guide for beginnersEnoch Joshua
 
Meteor Day Athens (2014-11-07)
Meteor Day Athens (2014-11-07)Meteor Day Athens (2014-11-07)
Meteor Day Athens (2014-11-07)svub
 
Introduction to meteor
Introduction to meteorIntroduction to meteor
Introduction to meteorNodeXperts
 
Android Trainning Session 2
Android Trainning  Session 2Android Trainning  Session 2
Android Trainning Session 2Shanmugapriya D
 
SathishKumar Natarajan
SathishKumar NatarajanSathishKumar Natarajan
SathishKumar NatarajanSathish Kumar
 
OPEN TEXT ADMINISTRATION
OPEN TEXT ADMINISTRATIONOPEN TEXT ADMINISTRATION
OPEN TEXT ADMINISTRATIONSUMIT KUMAR
 
Advanced web application architecture - Talk
Advanced web application architecture - TalkAdvanced web application architecture - Talk
Advanced web application architecture - TalkMatthias Noback
 
Introduction to requirement of microservices
Introduction to requirement of microservicesIntroduction to requirement of microservices
Introduction to requirement of microservicesAvik Das
 
SLC ASP.NET Framework and BPM (Eng)
SLC ASP.NET Framework and BPM (Eng)SLC ASP.NET Framework and BPM (Eng)
SLC ASP.NET Framework and BPM (Eng)Selcuk Celik
 
IRJET - Code Compiler Shell
IRJET -  	  Code Compiler ShellIRJET -  	  Code Compiler Shell
IRJET - Code Compiler ShellIRJET Journal
 
JSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontendJSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontendVlad Fedosov
 

Similar to Meet with Meteor (20)

Angular meteor presentation
Angular meteor presentationAngular meteor presentation
Angular meteor presentation
 
Documentation
DocumentationDocumentation
Documentation
 
Reactive Application Using METEOR
Reactive Application Using METEORReactive Application Using METEOR
Reactive Application Using METEOR
 
NodeJS guide for beginners
NodeJS guide for beginnersNodeJS guide for beginners
NodeJS guide for beginners
 
Meteor
MeteorMeteor
Meteor
 
Components of client server application
Components of client server applicationComponents of client server application
Components of client server application
 
Meteor Day Athens (2014-11-07)
Meteor Day Athens (2014-11-07)Meteor Day Athens (2014-11-07)
Meteor Day Athens (2014-11-07)
 
Introduction to meteor
Introduction to meteorIntroduction to meteor
Introduction to meteor
 
GCF
GCFGCF
GCF
 
Android Trainning Session 2
Android Trainning  Session 2Android Trainning  Session 2
Android Trainning Session 2
 
SathishKumar Natarajan
SathishKumar NatarajanSathishKumar Natarajan
SathishKumar Natarajan
 
Explore Android Internals
Explore Android InternalsExplore Android Internals
Explore Android Internals
 
Why meteor
Why meteorWhy meteor
Why meteor
 
OPEN TEXT ADMINISTRATION
OPEN TEXT ADMINISTRATIONOPEN TEXT ADMINISTRATION
OPEN TEXT ADMINISTRATION
 
vinay-mittal-new
vinay-mittal-newvinay-mittal-new
vinay-mittal-new
 
Advanced web application architecture - Talk
Advanced web application architecture - TalkAdvanced web application architecture - Talk
Advanced web application architecture - Talk
 
Introduction to requirement of microservices
Introduction to requirement of microservicesIntroduction to requirement of microservices
Introduction to requirement of microservices
 
SLC ASP.NET Framework and BPM (Eng)
SLC ASP.NET Framework and BPM (Eng)SLC ASP.NET Framework and BPM (Eng)
SLC ASP.NET Framework and BPM (Eng)
 
IRJET - Code Compiler Shell
IRJET -  	  Code Compiler ShellIRJET -  	  Code Compiler Shell
IRJET - Code Compiler Shell
 
JSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontendJSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontend
 

More from Tahmina Khatoon

Building chatbot with amazon lex
Building chatbot with amazon lexBuilding chatbot with amazon lex
Building chatbot with amazon lexTahmina Khatoon
 
How to predict turnover of sales team
How to predict turnover of sales teamHow to predict turnover of sales team
How to predict turnover of sales teamTahmina Khatoon
 
Functional testing with behat
Functional testing with behatFunctional testing with behat
Functional testing with behatTahmina Khatoon
 
Parcel management system - Proposal
Parcel management system - ProposalParcel management system - Proposal
Parcel management system - ProposalTahmina Khatoon
 
Parcel management system - presentation
Parcel management system - presentationParcel management system - presentation
Parcel management system - presentationTahmina Khatoon
 
Syntactically awesome stylesheets (Sass)
Syntactically awesome stylesheets (Sass)Syntactically awesome stylesheets (Sass)
Syntactically awesome stylesheets (Sass)Tahmina Khatoon
 

More from Tahmina Khatoon (7)

Building chatbot with amazon lex
Building chatbot with amazon lexBuilding chatbot with amazon lex
Building chatbot with amazon lex
 
Fundamental of Scrum
Fundamental of ScrumFundamental of Scrum
Fundamental of Scrum
 
How to predict turnover of sales team
How to predict turnover of sales teamHow to predict turnover of sales team
How to predict turnover of sales team
 
Functional testing with behat
Functional testing with behatFunctional testing with behat
Functional testing with behat
 
Parcel management system - Proposal
Parcel management system - ProposalParcel management system - Proposal
Parcel management system - Proposal
 
Parcel management system - presentation
Parcel management system - presentationParcel management system - presentation
Parcel management system - presentation
 
Syntactically awesome stylesheets (Sass)
Syntactically awesome stylesheets (Sass)Syntactically awesome stylesheets (Sass)
Syntactically awesome stylesheets (Sass)
 

Recently uploaded

Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 

Recently uploaded (20)

Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 

Meet with Meteor

  • 1. The JavaScript App Platform Meet with
  • 2. Presented by - Tahmina Khatoon Software Engineer, Genweb2 Build Web Applications since 2008
  • 3. What will be covered ● Introduction to meteor ● Principles of meteor ● Meteor architecture ● Live coding a simple meteor app
  • 5. What is Meteor? ● Meteor is an ultra-simple environment for building modern web and mobile app using Javascript. ● Build to the power of next generation app o Rich user interfaces o Collaborative multi-user applications o Cross platform apps o Fast development
  • 6. 7 Meteor Principles 1. Data on the Wire 2. One Language 3. Database Everywhere 4. Latency Compensation 5. Full Stack Reactivity 6. Embrace the Ecosystem 7. Simplicity = Productivity
  • 7. Why Meteor? ● Applications are real-time by default ● Develop with just one language ● Save a lot of time with smart packages ● Optimized for developer happiness ● Friendly to beginner developers ● Ahead of the tech curve ● Community is extremely supportive
  • 8. Data on the Wire Meteor doesn't send HTML over the network. The server sends data and lets the client render it.
  • 9. Data on the Wire (Continue ...) Traditional Web Architecture Client Server HTTP HTML No Persistent Connection http://www.prothom-alo.com <html> … news - 1 news - 2 ... <.html>
  • 10. Data on the Wire (Continue ...) Traditional Web Architecture Modern Web Architecture Client Server Client Server HTTPHTML No Persistent Connection Persistent Connection DDP <html> … news - 1 news - 2 ... <.html> http://www.prothom-alo.com http://www.prothom-alo.com <html> news - 1 news - 2 <.html> news - 3 . . news - 4 . .
  • 11. DDP - Distributed Data Protocol A protocol based on JSON. Technically, DDP can be implemented on top of any duplex transport. Meteor’s current implementation is based on WebSockets and SockJS. SockJS is a WebSockets emulation transport, which can be used when WebSockets is not available.
  • 12. DDP - Distributed Data Protocol DDP mainly does two things: ● It handles Remote Procedure Calls (RPC). ● It manages data.
  • 13. DDP - Distributed Data Protocol DDP mainly does two things: ● It handles Remote Procedure Calls (RPC). ● It manages data.
  • 14. Handling Remote Procedure Calls 1. {"msg":"method", "method": "transferMoney", "params": ["1000USD", "arunoda", "sacha"], id": "randomId-1"} 2. {"msg": "result", id": "randomId-1": "result": "5000USD"} 3. {"msg": "updated", "methods": ["randomId- 1"]} It notifies the caller after all the write operations in the method have been reflected to all the other connected clients.
  • 15. DDP - Managing Data The DDP protocol has three types of notification: added, changed and removed 1. The DDP client (sacha) sends a subscription request for his account. 2. He will receive a couple of added notifications with the current transactions in his account. 3. After all the transactions have been sent by the DDP server (bank), DDP will send a special message called ready. The ready message indicates that all the initial data for the subscription has been sent and you are good to go. 4. Some time later, after arunoda has sent his transfer, sacha will receive the transaction as another added notification.
  • 16. One Language Meteor lets you write both the client and the server parts of your application in JavaScript.
  • 20. Database Everywhere You can use the same methods to access your database from the client or the server. ● MongoDB on the server ● Minimongo in the browser ● Meteor keeps it all in sync
  • 21. Mini Databases ● The minimongo package is a reimplementation of (almost) the entire MongoDB API, against an in- memory JavaScript database. ● It is like a MongoDB emulator that runs inside your web browser. You can insert data into it and search, sort, and update that data. https://www.meteor.com/mini-databases
  • 22. Latency Compensation On the client, Meteor prefetches data and simulates models to make it look like server method calls return instantly.
  • 23. Latency Compensation In a traditional application, when a user does some action on an app, they have to wait until the request is processed on the server before the changes are reflected by the UI.
  • 24. Latency Compensation But with latency compensation, users no longer need to wait. The result of an action is reflected by the browser immediately. This is a built-in feature of Meteor and you can use it very easily.
  • 25. Implementing latency compensation ● Latency compensation works only for write operations to a data store supported by Meteor (currently only MongoDB and Redis). ● For Third-party service like Twitter, there is no way to implement latency compensation directly. ● There are only two places where you can do a write operation to a data store: inside a method call or directly via a local collection.
  • 26. Full Stack Reactivity In Meteor, realtime is the default. All layers, from database to template, update themselves automatically when necessary. ● Client UI and database are updated 1st ● Change sent to server ● Issues are resolved after the fact
  • 27. Embrace the Ecosystem. Meteor is open source and integrates with existing open source tools and frameworks.
  • 28. Simplicity = Productivity. The best way to make something seem simple is to have it actually be simple. Meteor's main functionality has clean, classically beautiful APIs.
  • 30. App - Topic Bank Topic Name Suggested By Vote Action Dart Fyaz 10 Meteor Tahmina 12 Up Down Up Down Topic Bank
  • 31. Let’s Get Started! curl https://install.meteor.com/ | sh Installing Meteor Creating an app meteor create hotTopics cd hotTopics meteor Run app
  • 32. Project Structure lib/ # <- any common code for client/server. lib/config.js # <- general configuration lib/methods.js # <- Meteor.method definitions lib/external # <- common code from someone else ## Note that js files in lib folders are loaded before other js files. collections/ # <- definitions of collections and methods on them (could be models/) client/lib # <- client specific libraries (also loaded first) client/lib/config.js # <- configuration of any client side packages client/lib/helpers # <- any helpers (handlebars or otherwise) that are used often in view files client/main.js # <- subscriptions, basic Meteor.startup code. client/index.html # <- toplevel html client/index.js # <- and its JS client/views/<page>.html # <- the templates specific to a single page client/views/<page>.js # <- and the JS to hook it up client/views/<type>/ # <- if you find you have a lot of views of the same object type server/publications.js # <- Meteor.publish definitions server/lib/config.js # <- configuration of server side packages
  • 33. The JavaScript and CSS files in an application are loaded according to these rules: ● Files in subdirectories are loaded before files in parent directories, so that files in the deepest subdirectory are loaded first, and files in the root directory are loaded last. ● Within a directory, files are loaded in alphabetical order by filename. ● After sorting as described above, all files under directories named lib are moved before everything else (preserving their order). ● Finally, all files that match main.* are moved after everything else (preserving their order). CSS and Javascript Files Ordering
  • 34. Meteor parses all of the HTML files in app folder and identifies three top-level tags: ● <head> ● <body> ● <template> Default Template Engine: Blaze Can be replaced with any other template engine. Create html view
  • 35. Create html view <head> <title>Topic Bank</title> </head> <body> <div class="container"> {{> header}} {{> topicList}} </div> </body> <template name="header"> <div class="row text-center"> <h1>Topic Bank</h1> </div> </template> <template name="topicList"> <div class="row"> <div class="col-md-12"> </div> </div> </template> <table class="table table-bordered"> <thead> <tr> <th>Topic Name</th> <th>Suggested By</th> <th>Vote</th> <th>Action</th> </tr> </thead> <tbody> {{#each topics }} <tr> <td>{{title}}</td> <td><i>{{proposed_by}}</i></td> <td>({{vote}} votes)</td> <td></td> </tr> {{/each }} </tbody> </table>
  • 36. Include package Meteor Package manager: ATMOSPHERE meteor add mizzao:bootstrap-3 Add Package in project (example: bootstrap-3) meteor list List all installed packages
  • 38. Publish and Subscribe // Create a collection Topics = new Meteor.Collection('topics'); if (Meteor.isServer) { // Publish collection Meteor.publish('topics', function () { return Topics.find(); }); } else if (Meteor.isClient) { // Subscribe collection Meteor.subscribe('topics'); Template.topicList.helpers({ topics: function () { return Topics.find(); } }); }