(Go: >> BACK << -|- >> HOME <<)

SlideShare a Scribd company logo
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

Meteor.js
Meteor.jsMeteor.js
Angular meteor for angular devs
Angular meteor for angular devsAngular meteor for angular devs
Angular meteor for angular devs
Arc & Codementor
 
Meteor + React
Meteor + ReactMeteor + React
Meteor + React
Taggart Bowen-Gaddy
 
Meteor js - TechPeaks Developers Meeting
Meteor js - TechPeaks Developers MeetingMeteor js - TechPeaks Developers Meeting
Meteor js - TechPeaks Developers Meeting
Francesco 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 Meteor
Nick Wientge
 
Meteor Framework Introduction
Meteor Framework IntroductionMeteor Framework Introduction
Meteor Framework Introduction
Riza Fahmi
 
Meteor
MeteorMeteor
Meteor intro- ktmjs
Meteor intro- ktmjsMeteor intro- ktmjs
Meteor intro- ktmjs
Piyush Thapa
 
Introduction to Meteor - Worldwide Meteor Day
Introduction to Meteor - Worldwide Meteor DayIntroduction to Meteor - Worldwide Meteor Day
Introduction to Meteor - Worldwide Meteor Day
M A Hossain Tonu
 
Tech Talk on ReactJS
Tech Talk on ReactJSTech Talk on ReactJS
Tech Talk on ReactJS
Atlogys Technical Consulting
 
Meteor js
Meteor jsMeteor js
Meteor js
VinayRamappa
 
Introduction to Android M
Introduction to Android MIntroduction to Android M
Introduction to Android M
amsanjeev
 
From MEAN to the MERN Stack
From MEAN to the MERN StackFrom MEAN to the MERN Stack
From MEAN to the MERN Stack
Troy Miles
 
The productive developer guide to React
The productive developer guide to ReactThe productive developer guide to React
The productive developer guide to React
Maurice De Beijer [MVP]
 
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
Matt Raible
 
Building UWP apps with React-Native
Building UWP apps with React-NativeBuilding UWP apps with React-Native
Building UWP apps with React-Native
Maurice De Beijer [MVP]
 
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
RapidValue
 
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 minutes
Designveloper
 

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

Angular meteor presentation
Angular meteor presentationAngular meteor presentation
Angular meteor presentation
Jean Marcel Belmont
 
Documentation
DocumentationDocumentation
Documentation
Rajesh Seendripu
 
Reactive Application Using METEOR
Reactive Application Using METEORReactive Application Using METEOR
Reactive Application Using METEOR
NodeXperts
 
NodeJS guide for beginners
NodeJS guide for beginnersNodeJS guide for beginners
NodeJS guide for beginners
Enoch Joshua
 
Meteor
MeteorMeteor
Components of client server application
Components of client server applicationComponents of client server application
Components of client server application
Ashwin Ananthapadmanabhan
 
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 meteor
NodeXperts
 
GCF
GCFGCF
Android Trainning Session 2
Android Trainning  Session 2Android Trainning  Session 2
Android Trainning Session 2
Shanmugapriya D
 
SathishKumar Natarajan
SathishKumar NatarajanSathishKumar Natarajan
SathishKumar Natarajan
Sathish Kumar
 
Explore Android Internals
Explore Android InternalsExplore Android Internals
Explore Android Internals
National Cheng Kung University
 
Why meteor
Why meteorWhy meteor
Why meteor
Jonathan Perl
 
OPEN TEXT ADMINISTRATION
OPEN TEXT ADMINISTRATIONOPEN TEXT ADMINISTRATION
OPEN TEXT ADMINISTRATION
SUMIT KUMAR
 
vinay-mittal-new
vinay-mittal-newvinay-mittal-new
vinay-mittal-new
Vinay Mittal
 
Advanced web application architecture - Talk
Advanced web application architecture - TalkAdvanced web application architecture - Talk
Advanced web application architecture - Talk
Matthias Noback
 
Introduction to requirement of microservices
Introduction to requirement of microservicesIntroduction to requirement of microservices
Introduction to requirement of microservices
Avik 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 Shell
IRJET 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 frontend
Vlad 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 lex
Tahmina Khatoon
 
Fundamental of Scrum
Fundamental of ScrumFundamental of Scrum
Fundamental of Scrum
Tahmina 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 team
Tahmina Khatoon
 
Functional testing with behat
Functional testing with behatFunctional testing with behat
Functional testing with behat
Tahmina Khatoon
 
Parcel management system - Proposal
Parcel management system - ProposalParcel management system - Proposal
Parcel management system - Proposal
Tahmina Khatoon
 
Parcel management system - presentation
Parcel management system - presentationParcel management system - presentation
Parcel management system - presentation
Tahmina 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

Java SE 17 Study Guide for Certification - Chapter 01
Java SE 17 Study Guide for Certification - Chapter 01Java SE 17 Study Guide for Certification - Chapter 01
Java SE 17 Study Guide for Certification - Chapter 01
williamrobertherman
 
WhatsApp Tracker - Tracking WhatsApp to Boost Online Safety.pdf
WhatsApp Tracker -  Tracking WhatsApp to Boost Online Safety.pdfWhatsApp Tracker -  Tracking WhatsApp to Boost Online Safety.pdf
WhatsApp Tracker - Tracking WhatsApp to Boost Online Safety.pdf
onemonitarsoftware
 
@Call @Girls in Solapur 🤷‍♂️ XXXXXXXX 🤷‍♂️ Tanisha Sharma Best High Class S...
 @Call @Girls in Solapur 🤷‍♂️  XXXXXXXX 🤷‍♂️ Tanisha Sharma Best High Class S... @Call @Girls in Solapur 🤷‍♂️  XXXXXXXX 🤷‍♂️ Tanisha Sharma Best High Class S...
@Call @Girls in Solapur 🤷‍♂️ XXXXXXXX 🤷‍♂️ Tanisha Sharma Best High Class S...
Mona Rathore
 
Shivam Pandit working on Php Web Developer.
Shivam Pandit working on Php Web Developer.Shivam Pandit working on Php Web Developer.
Shivam Pandit working on Php Web Developer.
shivamt017
 
BoxLang Developer Tooling: VSCode Extension and Debugger
BoxLang Developer Tooling: VSCode Extension and DebuggerBoxLang Developer Tooling: VSCode Extension and Debugger
BoxLang Developer Tooling: VSCode Extension and Debugger
Ortus Solutions, Corp
 
NYC 26-Jun-2024 Combined Presentations.pdf
NYC 26-Jun-2024 Combined Presentations.pdfNYC 26-Jun-2024 Combined Presentations.pdf
NYC 26-Jun-2024 Combined Presentations.pdf
AUGNYC
 
Abortion pills in Fujairah *((+971588192166*)☎️)¥) **Effective Abortion Pills...
Abortion pills in Fujairah *((+971588192166*)☎️)¥) **Effective Abortion Pills...Abortion pills in Fujairah *((+971588192166*)☎️)¥) **Effective Abortion Pills...
Abortion pills in Fujairah *((+971588192166*)☎️)¥) **Effective Abortion Pills...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
Design system: The basis for a consistent design
Design system: The basis for a consistent designDesign system: The basis for a consistent design
Design system: The basis for a consistent design
Ortus Solutions, Corp
 
Schrodinger’s Backup: Is Your Backup Really a Backup?
Schrodinger’s Backup: Is Your Backup Really a Backup?Schrodinger’s Backup: Is Your Backup Really a Backup?
Schrodinger’s Backup: Is Your Backup Really a Backup?
Ortus Solutions, Corp
 
WEBINAR SLIDES: CCX for Cloud Service Providers
WEBINAR SLIDES: CCX for Cloud Service ProvidersWEBINAR SLIDES: CCX for Cloud Service Providers
WEBINAR SLIDES: CCX for Cloud Service Providers
Severalnines
 
Break data silos with real-time connectivity using Confluent Cloud Connectors
Break data silos with real-time connectivity using Confluent Cloud ConnectorsBreak data silos with real-time connectivity using Confluent Cloud Connectors
Break data silos with real-time connectivity using Confluent Cloud Connectors
confluent
 
YouTube SEO Mastery ......................
YouTube SEO Mastery ......................YouTube SEO Mastery ......................
YouTube SEO Mastery ......................
islamiato717
 
Revolutionizing Task Scheduling in ColdBox
Revolutionizing Task Scheduling in ColdBoxRevolutionizing Task Scheduling in ColdBox
Revolutionizing Task Scheduling in ColdBox
Ortus Solutions, Corp
 
ℂall Girls in Surat 🔥 +91-7023059433 🔥 Best High ℂlass Surat Esℂorts Serviℂe ...
ℂall Girls in Surat 🔥 +91-7023059433 🔥 Best High ℂlass Surat Esℂorts Serviℂe ...ℂall Girls in Surat 🔥 +91-7023059433 🔥 Best High ℂlass Surat Esℂorts Serviℂe ...
ℂall Girls in Surat 🔥 +91-7023059433 🔥 Best High ℂlass Surat Esℂorts Serviℂe ...
nitu gupta#N06
 
Top 10 Tips To Get Google AdSense For Your Website
Top 10 Tips To Get Google AdSense For Your WebsiteTop 10 Tips To Get Google AdSense For Your Website
Top 10 Tips To Get Google AdSense For Your Website
e-Definers Technology
 
Addressing the Top 9 User Pain Points with Visual Design Elements.pptx
Addressing the Top 9 User Pain Points with Visual Design Elements.pptxAddressing the Top 9 User Pain Points with Visual Design Elements.pptx
Addressing the Top 9 User Pain Points with Visual Design Elements.pptx
Sparity1
 
Seamless PostgreSQL to Snowflake Data Transfer in 8 Simple Steps
Seamless PostgreSQL to Snowflake Data Transfer in 8 Simple StepsSeamless PostgreSQL to Snowflake Data Transfer in 8 Simple Steps
Seamless PostgreSQL to Snowflake Data Transfer in 8 Simple Steps
Estuary Flow
 
Ported to Cloud with Wing_ Blue ZnZone app from _Hexagonal Architecture Expla...
Ported to Cloud with Wing_ Blue ZnZone app from _Hexagonal Architecture Expla...Ported to Cloud with Wing_ Blue ZnZone app from _Hexagonal Architecture Expla...
Ported to Cloud with Wing_ Blue ZnZone app from _Hexagonal Architecture Expla...
Asher Sterkin
 
What is OCR Technology and How to Extract Text from Any Image for Free
What is OCR Technology and How to Extract Text from Any Image for FreeWhat is OCR Technology and How to Extract Text from Any Image for Free
What is OCR Technology and How to Extract Text from Any Image for Free
TwisterTools
 
Disk to Cloud: Abstract your File Operations with CBFS
Disk to Cloud: Abstract your File Operations with CBFSDisk to Cloud: Abstract your File Operations with CBFS
Disk to Cloud: Abstract your File Operations with CBFS
Ortus Solutions, Corp
 

Recently uploaded (20)

Java SE 17 Study Guide for Certification - Chapter 01
Java SE 17 Study Guide for Certification - Chapter 01Java SE 17 Study Guide for Certification - Chapter 01
Java SE 17 Study Guide for Certification - Chapter 01
 
WhatsApp Tracker - Tracking WhatsApp to Boost Online Safety.pdf
WhatsApp Tracker -  Tracking WhatsApp to Boost Online Safety.pdfWhatsApp Tracker -  Tracking WhatsApp to Boost Online Safety.pdf
WhatsApp Tracker - Tracking WhatsApp to Boost Online Safety.pdf
 
@Call @Girls in Solapur 🤷‍♂️ XXXXXXXX 🤷‍♂️ Tanisha Sharma Best High Class S...
 @Call @Girls in Solapur 🤷‍♂️  XXXXXXXX 🤷‍♂️ Tanisha Sharma Best High Class S... @Call @Girls in Solapur 🤷‍♂️  XXXXXXXX 🤷‍♂️ Tanisha Sharma Best High Class S...
@Call @Girls in Solapur 🤷‍♂️ XXXXXXXX 🤷‍♂️ Tanisha Sharma Best High Class S...
 
Shivam Pandit working on Php Web Developer.
Shivam Pandit working on Php Web Developer.Shivam Pandit working on Php Web Developer.
Shivam Pandit working on Php Web Developer.
 
BoxLang Developer Tooling: VSCode Extension and Debugger
BoxLang Developer Tooling: VSCode Extension and DebuggerBoxLang Developer Tooling: VSCode Extension and Debugger
BoxLang Developer Tooling: VSCode Extension and Debugger
 
NYC 26-Jun-2024 Combined Presentations.pdf
NYC 26-Jun-2024 Combined Presentations.pdfNYC 26-Jun-2024 Combined Presentations.pdf
NYC 26-Jun-2024 Combined Presentations.pdf
 
Abortion pills in Fujairah *((+971588192166*)☎️)¥) **Effective Abortion Pills...
Abortion pills in Fujairah *((+971588192166*)☎️)¥) **Effective Abortion Pills...Abortion pills in Fujairah *((+971588192166*)☎️)¥) **Effective Abortion Pills...
Abortion pills in Fujairah *((+971588192166*)☎️)¥) **Effective Abortion Pills...
 
Design system: The basis for a consistent design
Design system: The basis for a consistent designDesign system: The basis for a consistent design
Design system: The basis for a consistent design
 
Schrodinger’s Backup: Is Your Backup Really a Backup?
Schrodinger’s Backup: Is Your Backup Really a Backup?Schrodinger’s Backup: Is Your Backup Really a Backup?
Schrodinger’s Backup: Is Your Backup Really a Backup?
 
WEBINAR SLIDES: CCX for Cloud Service Providers
WEBINAR SLIDES: CCX for Cloud Service ProvidersWEBINAR SLIDES: CCX for Cloud Service Providers
WEBINAR SLIDES: CCX for Cloud Service Providers
 
Break data silos with real-time connectivity using Confluent Cloud Connectors
Break data silos with real-time connectivity using Confluent Cloud ConnectorsBreak data silos with real-time connectivity using Confluent Cloud Connectors
Break data silos with real-time connectivity using Confluent Cloud Connectors
 
YouTube SEO Mastery ......................
YouTube SEO Mastery ......................YouTube SEO Mastery ......................
YouTube SEO Mastery ......................
 
Revolutionizing Task Scheduling in ColdBox
Revolutionizing Task Scheduling in ColdBoxRevolutionizing Task Scheduling in ColdBox
Revolutionizing Task Scheduling in ColdBox
 
ℂall Girls in Surat 🔥 +91-7023059433 🔥 Best High ℂlass Surat Esℂorts Serviℂe ...
ℂall Girls in Surat 🔥 +91-7023059433 🔥 Best High ℂlass Surat Esℂorts Serviℂe ...ℂall Girls in Surat 🔥 +91-7023059433 🔥 Best High ℂlass Surat Esℂorts Serviℂe ...
ℂall Girls in Surat 🔥 +91-7023059433 🔥 Best High ℂlass Surat Esℂorts Serviℂe ...
 
Top 10 Tips To Get Google AdSense For Your Website
Top 10 Tips To Get Google AdSense For Your WebsiteTop 10 Tips To Get Google AdSense For Your Website
Top 10 Tips To Get Google AdSense For Your Website
 
Addressing the Top 9 User Pain Points with Visual Design Elements.pptx
Addressing the Top 9 User Pain Points with Visual Design Elements.pptxAddressing the Top 9 User Pain Points with Visual Design Elements.pptx
Addressing the Top 9 User Pain Points with Visual Design Elements.pptx
 
Seamless PostgreSQL to Snowflake Data Transfer in 8 Simple Steps
Seamless PostgreSQL to Snowflake Data Transfer in 8 Simple StepsSeamless PostgreSQL to Snowflake Data Transfer in 8 Simple Steps
Seamless PostgreSQL to Snowflake Data Transfer in 8 Simple Steps
 
Ported to Cloud with Wing_ Blue ZnZone app from _Hexagonal Architecture Expla...
Ported to Cloud with Wing_ Blue ZnZone app from _Hexagonal Architecture Expla...Ported to Cloud with Wing_ Blue ZnZone app from _Hexagonal Architecture Expla...
Ported to Cloud with Wing_ Blue ZnZone app from _Hexagonal Architecture Expla...
 
What is OCR Technology and How to Extract Text from Any Image for Free
What is OCR Technology and How to Extract Text from Any Image for FreeWhat is OCR Technology and How to Extract Text from Any Image for Free
What is OCR Technology and How to Extract Text from Any Image for Free
 
Disk to Cloud: Abstract your File Operations with CBFS
Disk to Cloud: Abstract your File Operations with CBFSDisk to Cloud: Abstract your File Operations with CBFS
Disk to Cloud: Abstract your File Operations with CBFS
 

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(); } }); }