SlideShare a Scribd company logo
1 of 17
Download to read offline
Introduction to
MeteorJS
A Fully-Fledged JavaScript App Framework
Weiming Chen, June/2015
The “WOW” Moment
● When I encountered Ruby on Rails, while I
was an ASP.NET developer
● The new “WOW” moment:
Meteor and RoR, in Common
1. Open source
2. Fully-fledged, “opinionated” web frameworks
3. Great package/library systems
○ Atmosphere vs. Rubygems
4. Super easy deployment
○ meteor.com vs. Heroku
5. Hot code reload on change
6. “Simplicity = Productivity”
What’s the New “WOW” about?
● Data on the Wire
○ Built-in support for
websockets
● One language
○ No need to switch
between:
■ JavaScript
■ <insert name of your
favourite server-side
language>
■ SQL
New “WOW” (continued)
● Full Stack Reactivity
○ all layers, database to HTML templates, updates
themselves automatically
● Database Everywhere
○ same data model and query interface on client,
server and database
● Latency compensation
○ Prefetching data
○ Simulate actions to make it look like server methods
return instantly
● More to be shown...
Demo Time!
Install Meteor:
$ curl https://install.meteor.com/
| sh
Create a simple chatroom app:
$ meteor create chatroom-demo
$ cd chatroom-demo
$ meteor
Demo (continued)
Code at: https://github.com/MingStar/meteorjs-chatroom-demo
git tags:
v0.1 - initial commit
v0.2 - accounts and log in
$ meteor add accounts-ui accounts-password
v0.3 - display and send messages
Demo (continued)
v0.4 - system message
$ meteor mongo
meteor:PRIMARY> db.messages.insert({"username" : "system",
"text": "stop chatting, back to work!", "createdAt": new
Date()});
v0.5 - ios app!
$ meteor install-sdk ios
$ meteor add-platform ios
$ meteor run ios
Finally, deploy!
$ meteor deploy chatroom-demo.meteor.com
Meteor: Under the Hood
Spacebars
Meteor also Automagically:
● incorporates jQuery and underscoreJS
● compiles Coffeescript
● scopes your JS code by files
○ var foo = bar; //foo is file scoped
○ foo2 = bar; //foo2 is app scoped
● minifies and concatenates CSS and JS
● preserves the UI state (form inputs, scroll
position, selection) b/t hot reloads
Useful Packages (out of 43,000+)
$ meteor add accounts-facebook
● accounts-twitter
● accounts-google
● accounts-linkedin
$ meteor add
meteoric:ionic-
sass
http://ionicframework.com/
Caution: Meteor is NOT a silver bullet
● New technology:
○ became 1.0 in October/2014
○ yet to see wide adoption as RoR
● Excellent for building responsive Web App
● Excellent for rapid prototyping
● Does Meteor Scale?
○ Factors to consider: routing, sessions, job
processing, static file serving, and database
● How to Scale Meteor?
Thank You!
Questions?
Bonus: Does Websocket Scale?
● 620K idle concurrent websocket connections
on only 1 m3.xlarge (4 core, 15GB RAM)
EC2 instance.*
● Does your idea/business scale?
*http://www.jayway.com/2015/04/13/600k-concurrent-websocket-connections-on-aws-using-node-js/
Bonus: The MEAN stack vs. Meteor
http://wiki.dandascalescu.com/essays/meteor_js_vs_the_mean_stack
Bonus: Meteor Project Structure
● .meteor: meteor project
info, do not need modify it.
● client: all logics here are
visible on the browser
only.
● lib: all logic here will be
loaded before anything.
● private: visible on server
side only.
● public: for static content
● server: server side logic,
not available on the
browser.

More Related Content

What's hot

MEAN Stack WeNode Barcelona Workshop
MEAN Stack WeNode Barcelona WorkshopMEAN Stack WeNode Barcelona Workshop
MEAN Stack WeNode Barcelona Workshop
Valeri Karpov
 
MongoDB and the MEAN Stack
MongoDB and the MEAN StackMongoDB and the MEAN Stack
MongoDB and the MEAN Stack
MongoDB
 
MEAN Stack Workshop at Node Philly, 4/9/14
MEAN Stack Workshop at Node Philly, 4/9/14MEAN Stack Workshop at Node Philly, 4/9/14
MEAN Stack Workshop at Node Philly, 4/9/14
Valeri Karpov
 

What's hot (20)

Part One: Building Web Apps with the MERN Stack
Part One: Building Web Apps with the MERN StackPart One: Building Web Apps with the MERN Stack
Part One: Building Web Apps with the MERN Stack
 
FULL stack -> MEAN stack
FULL stack -> MEAN stackFULL stack -> MEAN stack
FULL stack -> MEAN stack
 
Building your first MEAN application
Building your first MEAN applicationBuilding your first MEAN application
Building your first MEAN application
 
Get MEAN! Node.js and the MEAN stack
Get MEAN!  Node.js and the MEAN stackGet MEAN!  Node.js and the MEAN stack
Get MEAN! Node.js and the MEAN stack
 
Mean Stack - An Overview
Mean Stack - An OverviewMean Stack - An Overview
Mean Stack - An Overview
 
MEAN Stack WeNode Barcelona Workshop
MEAN Stack WeNode Barcelona WorkshopMEAN Stack WeNode Barcelona Workshop
MEAN Stack WeNode Barcelona Workshop
 
MEAN stack
MEAN stackMEAN stack
MEAN stack
 
Introduction to the MEAN stack
Introduction to the MEAN stackIntroduction to the MEAN stack
Introduction to the MEAN stack
 
LAMP is so yesterday, MEAN is so tomorrow! :)
LAMP is so yesterday, MEAN is so tomorrow! :) LAMP is so yesterday, MEAN is so tomorrow! :)
LAMP is so yesterday, MEAN is so tomorrow! :)
 
MEAN Stack
MEAN StackMEAN Stack
MEAN Stack
 
MongoDB and the MEAN Stack
MongoDB and the MEAN StackMongoDB and the MEAN Stack
MongoDB and the MEAN Stack
 
Future development stack ~ MeteorJS
Future development stack ~ MeteorJSFuture development stack ~ MeteorJS
Future development stack ~ MeteorJS
 
NodeSummit - MEAN Stack
NodeSummit - MEAN StackNodeSummit - MEAN Stack
NodeSummit - MEAN Stack
 
Modern Static Site with GatsbyJS
Modern Static Site with GatsbyJSModern Static Site with GatsbyJS
Modern Static Site with GatsbyJS
 
Introduction to mean stack
Introduction to mean stackIntroduction to mean stack
Introduction to mean stack
 
Mean PPT
Mean PPTMean PPT
Mean PPT
 
Introduction to ReactJS
Introduction to ReactJSIntroduction to ReactJS
Introduction to ReactJS
 
The MEAN Stack
The MEAN StackThe MEAN Stack
The MEAN Stack
 
MEAN Stack Workshop at Node Philly, 4/9/14
MEAN Stack Workshop at Node Philly, 4/9/14MEAN Stack Workshop at Node Philly, 4/9/14
MEAN Stack Workshop at Node Philly, 4/9/14
 
MEAN Stack
MEAN StackMEAN Stack
MEAN Stack
 

Viewers also liked

Query Handling System
Query Handling SystemQuery Handling System
Query Handling System
himabindu54
 
ASP.NET Session 1
ASP.NET Session 1ASP.NET Session 1
ASP.NET Session 1
Sisir Ghosh
 
Research assumption
Research assumptionResearch assumption
Research assumption
Nursing Path
 

Viewers also liked (13)

Lean UX Mobile Development - built alongside real users
Lean UX Mobile Development - built alongside real usersLean UX Mobile Development - built alongside real users
Lean UX Mobile Development - built alongside real users
 
Improving the Quality of Existing Software
Improving the Quality of Existing SoftwareImproving the Quality of Existing Software
Improving the Quality of Existing Software
 
Folien sfps 4
Folien sfps 4Folien sfps 4
Folien sfps 4
 
Common asp.net design patterns aspconf2012
Common asp.net design patterns aspconf2012Common asp.net design patterns aspconf2012
Common asp.net design patterns aspconf2012
 
Onion Architecture with S#arp
Onion Architecture with S#arpOnion Architecture with S#arp
Onion Architecture with S#arp
 
Query Handling System
Query Handling SystemQuery Handling System
Query Handling System
 
ASP.NET Session 1
ASP.NET Session 1ASP.NET Session 1
ASP.NET Session 1
 
50 ideas for using beacons
50 ideas for using beacons50 ideas for using beacons
50 ideas for using beacons
 
Beacons: The Retail Revolution
Beacons: The Retail RevolutionBeacons: The Retail Revolution
Beacons: The Retail Revolution
 
BEACON TECHNOLOGY OVERVIEW
BEACON TECHNOLOGY OVERVIEWBEACON TECHNOLOGY OVERVIEW
BEACON TECHNOLOGY OVERVIEW
 
In-Store Marketing via Micro-Location: Beacon
In-Store Marketing via Micro-Location: BeaconIn-Store Marketing via Micro-Location: Beacon
In-Store Marketing via Micro-Location: Beacon
 
Research assumption
Research assumptionResearch assumption
Research assumption
 
How to write a statement problem
How to write a statement problemHow to write a statement problem
How to write a statement problem
 

Similar to Introduction to MeteorJS

Mobile and IBM Worklight Best Practices
Mobile and IBM Worklight Best PracticesMobile and IBM Worklight Best Practices
Mobile and IBM Worklight Best Practices
Andrew Ferrier
 

Similar to Introduction to MeteorJS (20)

Meteor Day Athens (2014-11-07)
Meteor Day Athens (2014-11-07)Meteor Day Athens (2014-11-07)
Meteor Day Athens (2014-11-07)
 
Plone FSR
Plone FSRPlone FSR
Plone FSR
 
Jayway Web Tech Radar 2015
Jayway Web Tech Radar 2015Jayway Web Tech Radar 2015
Jayway Web Tech Radar 2015
 
An introduction to Node.js
An introduction to Node.jsAn introduction to Node.js
An introduction to Node.js
 
Meteor Introduction
Meteor IntroductionMeteor Introduction
Meteor Introduction
 
Meteor
MeteorMeteor
Meteor
 
Isomorphic JavaScript – future of the web
Isomorphic JavaScript – future of the webIsomorphic JavaScript – future of the web
Isomorphic JavaScript – future of the web
 
Meteor Day - Nov 6 at La Commune
Meteor Day - Nov 6 at La CommuneMeteor Day - Nov 6 at La Commune
Meteor Day - Nov 6 at La Commune
 
Building RESTtful services in MEAN
Building RESTtful services in MEANBuilding RESTtful services in MEAN
Building RESTtful services in MEAN
 
Mobile and IBM Worklight Best Practices
Mobile and IBM Worklight Best PracticesMobile and IBM Worklight Best Practices
Mobile and IBM Worklight Best Practices
 
Introduction to meteor
Introduction to meteorIntroduction to meteor
Introduction to meteor
 
Angular (v2 and up) - Morning to understand - Linagora
Angular (v2 and up) - Morning to understand - LinagoraAngular (v2 and up) - Morning to understand - Linagora
Angular (v2 and up) - Morning to understand - Linagora
 
Meteor Revolution: From DDP to Blaze Reactive Rendering
Meteor Revolution: From DDP to Blaze Reactive Rendering Meteor Revolution: From DDP to Blaze Reactive Rendering
Meteor Revolution: From DDP to Blaze Reactive Rendering
 
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
 
Beginners Node.js
Beginners Node.jsBeginners Node.js
Beginners Node.js
 
Magnificent Meteor -By Dipali Vyas (PM Zestard Technologies) for GDG Ahmedaba...
Magnificent Meteor -By Dipali Vyas (PM Zestard Technologies) for GDG Ahmedaba...Magnificent Meteor -By Dipali Vyas (PM Zestard Technologies) for GDG Ahmedaba...
Magnificent Meteor -By Dipali Vyas (PM Zestard Technologies) for GDG Ahmedaba...
 
Simple Cloud with Amazon Lightsail - Mike Coleman
Simple Cloud with Amazon Lightsail - Mike ColemanSimple Cloud with Amazon Lightsail - Mike Coleman
Simple Cloud with Amazon Lightsail - Mike Coleman
 
8 Node.js Frameworks Every Developer Should Know [UPDATED].pptx
8 Node.js Frameworks Every Developer Should Know [UPDATED].pptx8 Node.js Frameworks Every Developer Should Know [UPDATED].pptx
8 Node.js Frameworks Every Developer Should Know [UPDATED].pptx
 
Dust.js
Dust.jsDust.js
Dust.js
 
Net training in bhubaneswar
Net training in bhubaneswar Net training in bhubaneswar
Net training in bhubaneswar
 

Recently uploaded

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
giselly40
 

Recently uploaded (20)

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
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
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
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
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 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
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
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...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
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...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 

Introduction to MeteorJS

  • 1. Introduction to MeteorJS A Fully-Fledged JavaScript App Framework Weiming Chen, June/2015
  • 2. The “WOW” Moment ● When I encountered Ruby on Rails, while I was an ASP.NET developer ● The new “WOW” moment:
  • 3. Meteor and RoR, in Common 1. Open source 2. Fully-fledged, “opinionated” web frameworks 3. Great package/library systems ○ Atmosphere vs. Rubygems 4. Super easy deployment ○ meteor.com vs. Heroku 5. Hot code reload on change 6. “Simplicity = Productivity”
  • 4. What’s the New “WOW” about? ● Data on the Wire ○ Built-in support for websockets ● One language ○ No need to switch between: ■ JavaScript ■ <insert name of your favourite server-side language> ■ SQL
  • 5. New “WOW” (continued) ● Full Stack Reactivity ○ all layers, database to HTML templates, updates themselves automatically ● Database Everywhere ○ same data model and query interface on client, server and database ● Latency compensation ○ Prefetching data ○ Simulate actions to make it look like server methods return instantly ● More to be shown...
  • 6. Demo Time! Install Meteor: $ curl https://install.meteor.com/ | sh Create a simple chatroom app: $ meteor create chatroom-demo $ cd chatroom-demo $ meteor
  • 7. Demo (continued) Code at: https://github.com/MingStar/meteorjs-chatroom-demo git tags: v0.1 - initial commit v0.2 - accounts and log in $ meteor add accounts-ui accounts-password v0.3 - display and send messages
  • 8. Demo (continued) v0.4 - system message $ meteor mongo meteor:PRIMARY> db.messages.insert({"username" : "system", "text": "stop chatting, back to work!", "createdAt": new Date()}); v0.5 - ios app! $ meteor install-sdk ios $ meteor add-platform ios $ meteor run ios Finally, deploy! $ meteor deploy chatroom-demo.meteor.com
  • 9.
  • 10. Meteor: Under the Hood Spacebars
  • 11. Meteor also Automagically: ● incorporates jQuery and underscoreJS ● compiles Coffeescript ● scopes your JS code by files ○ var foo = bar; //foo is file scoped ○ foo2 = bar; //foo2 is app scoped ● minifies and concatenates CSS and JS ● preserves the UI state (form inputs, scroll position, selection) b/t hot reloads
  • 12. Useful Packages (out of 43,000+) $ meteor add accounts-facebook ● accounts-twitter ● accounts-google ● accounts-linkedin $ meteor add meteoric:ionic- sass http://ionicframework.com/
  • 13. Caution: Meteor is NOT a silver bullet ● New technology: ○ became 1.0 in October/2014 ○ yet to see wide adoption as RoR ● Excellent for building responsive Web App ● Excellent for rapid prototyping ● Does Meteor Scale? ○ Factors to consider: routing, sessions, job processing, static file serving, and database ● How to Scale Meteor?
  • 15. Bonus: Does Websocket Scale? ● 620K idle concurrent websocket connections on only 1 m3.xlarge (4 core, 15GB RAM) EC2 instance.* ● Does your idea/business scale? *http://www.jayway.com/2015/04/13/600k-concurrent-websocket-connections-on-aws-using-node-js/
  • 16. Bonus: The MEAN stack vs. Meteor http://wiki.dandascalescu.com/essays/meteor_js_vs_the_mean_stack
  • 17. Bonus: Meteor Project Structure ● .meteor: meteor project info, do not need modify it. ● client: all logics here are visible on the browser only. ● lib: all logic here will be loaded before anything. ● private: visible on server side only. ● public: for static content ● server: server side logic, not available on the browser.