1
Getting Started with
Meteor
TCF IT Professional Conference
March 14, 2014
Michael P. Redlich
@mpredli
about.me/mpredli/
Sunday, March 16, 14
Who’s Mike?
• BS in CS from
• “Petrochemical Research Organization”
• Ai-Logix, Inc. (now AudioCodes)
• Amateur Computer Group of New Jersey
• Publications
• Presentations
2
Sunday, March 16, 14
Objectives
• What is Meteor?
• Why Meteor?
• The Seven Principles
• Getting Started with Meteor
• Live Demos (yea!)
• Meteor Resources
3
Sunday, March 16, 14
What is Meteor? (1)
• “...an open-source platform for building top-
quality web apps in a fraction of the time,
whether you’re an expert developer or just
getting started.”
Meteor Web Site, http://www.meteor.com/
• A full-stack framework using JavaScript
• Compiles, combines, and distributes your
HTML, CSS, and JavaScript
4
Sunday, March 16, 14
What is Meteor? (2)
• Built on top of
• Shares code between the client-side and
server-side of your application
5
Sunday, March 16, 14
What is Node.js?
• “...a platform built on Chrome’s JavaScript
runtime for easily building fast, scalable
network applications. Node.js uses an event-
driven, non-blocking I/O model that makes it
lightweight and efficient, perfect for data-
intensive real-time applications that run across
distributed devices.”
Node.js Web Site, http://www.nodejs.org/
6
Sunday, March 16, 14
Why Meteor?
• “Meteor is radically faster, radically easier
platform for Internet-scale thick client
applications.”
Avital Oliver,“Meteor Smart Packages”, ETE Conference, 4/2/2013
• Easy to learn
• Rapid application development
• Powerful data synchronization
7
Sunday, March 16, 14
The Seven Principles
• Data on the Wire
• One Langauge
• Database Everywhere
• Latency Compensation
• Full-Stack Reactivity
• Embrace the Ecosystem
• Simplicity = Productivity
8
Sunday, March 16, 14
(#1) Data on the Wire
• Don’t send HTML over the network
• Let client decide how to render data
• Browser renders the templates as data
changes
9
Sunday, March 16, 14
(#2) One Language
• Everything is JavaScript
• Built-in JavaScript packages include:
• CoffeeScript
• jQuery
• Bootstrap
• Backbone
10
Sunday, March 16, 14
(#3) Database
Everywhere
• MongoDB works on both the client and the
server
• The client-side database API looks just like
MongoDB server-side API
• Database operations are cached in memory
on the client-side to yield...
11
Sunday, March 16, 14
(#4) Latency
Compensation
• Designed to create a zero-latency
connection to the database
• Database on client-side is updated first
• Database on server-side is updated later
12
Sunday, March 16, 14
(#5) Full-Stack
Reactivity
• Embraces the concept of reactive
programming
• Everything is real-time
• Templates automatically re-render
themselves as data changes
13
Sunday, March 16, 14
(#6) Embrace the
Ecosystem
• Meteor is open-source
• Integrates existing open-source tools and
frameworks
14
Sunday, March 16, 14
(#7) Simplicity =
Productivity
• For something to seem simple, it must
actually be simple
• API are plain and simple
15
Sunday, March 16, 14
Conventions Used in
This Presentation
• Command Prompt ($)
• Keywords (meteor, create, etc.)
• Variables (variable)
16
Sunday, March 16, 14
Getting Started
• Download Meteor
• Create your first Meteor app
• Explore the built-in examples
17
Sunday, March 16, 14
18
Download Meteor
• Unix/Linux
$ curl https://install.meteor.com |
sh
• Windows (unofficial support)
• win.meteor.com
• developed by Tom Wijsman
• now facilitated by Stephen Darnell
Sunday, March 16, 14
CreateYour First
Meteor App
$ meteor create myapp
$ cd myapp
myapp $ meteor
19
Sunday, March 16, 14
Live Demo!
20
Sunday, March 16, 14
Explore the Built-in
Examples
• Four (4) built-in examples
• Leaderboard (simplest)
$ meteor create --example
leaderboard
21
Sunday, March 16, 14
Live Demo!
22
Sunday, March 16, 14
StructuringYour
Meteor Application
23
• Special folders:
• /server
• /client
• /public
• /lib
• /collections
Sunday, March 16, 14
Smart Packages (1)
• JavaScript programs
• Extend your Meteor environment
• Injects code into client-side or server-side
of your application
24
Sunday, March 16, 14
Smart Packages (2)
• Core smart packages:
• spark
• reload
• livedata
• mongo-livedata
• minimongo
25
Sunday, March 16, 14
Smart Packages (3)
• List all available packages
$ meteor list
• Adding a package
$ meteor add packageName
• Removing a package
$ meteor remove packageName
26
Sunday, March 16, 14
DeployingYour Meteor
Application
• Full application server
• Deploy on Meteor’s infrastructure
$ meteor deploy myapp.meteor.com
27
Sunday, March 16, 14
Meteorite
• A wrapper utility for Meteor
• developed by Tom Coleman
• Supports third-party applications
• Does everything Meteor does plus...
28
Sunday, March 16, 14
Meteor Resources (1)
29
Sunday, March 16, 14
30
Meteor Resources (2)
•meteor.com
•github.com/meteor/meteor
•themeteorbook.com
•eventedmind.com
•atmosphere.meteor.com
•fastcolabs.com/3007015/how-use-
mysql-meteor
Sunday, March 16, 14
Upcoming Events (1)
• Trenton Computer Festival
• March 14-15, 2014
• tcf-nj.org
• Emerging Technologies for the Enterprise
• April 22-23, 2014
• phillyemergingtech.com
31
Sunday, March 16, 14
32
Upcoming Events (2)
Sunday, March 16, 14
33
Thanks!
mike@redlich.net
@mpredli
javasig.org
Sunday, March 16, 14

Getting Started with Meteor (TCF ITPC 2014)

  • 1.
    1 Getting Started with Meteor TCFIT Professional Conference March 14, 2014 Michael P. Redlich @mpredli about.me/mpredli/ Sunday, March 16, 14
  • 2.
    Who’s Mike? • BSin CS from • “Petrochemical Research Organization” • Ai-Logix, Inc. (now AudioCodes) • Amateur Computer Group of New Jersey • Publications • Presentations 2 Sunday, March 16, 14
  • 3.
    Objectives • What isMeteor? • Why Meteor? • The Seven Principles • Getting Started with Meteor • Live Demos (yea!) • Meteor Resources 3 Sunday, March 16, 14
  • 4.
    What is Meteor?(1) • “...an open-source platform for building top- quality web apps in a fraction of the time, whether you’re an expert developer or just getting started.” Meteor Web Site, http://www.meteor.com/ • A full-stack framework using JavaScript • Compiles, combines, and distributes your HTML, CSS, and JavaScript 4 Sunday, March 16, 14
  • 5.
    What is Meteor?(2) • Built on top of • Shares code between the client-side and server-side of your application 5 Sunday, March 16, 14
  • 6.
    What is Node.js? •“...a platform built on Chrome’s JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event- driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data- intensive real-time applications that run across distributed devices.” Node.js Web Site, http://www.nodejs.org/ 6 Sunday, March 16, 14
  • 7.
    Why Meteor? • “Meteoris radically faster, radically easier platform for Internet-scale thick client applications.” Avital Oliver,“Meteor Smart Packages”, ETE Conference, 4/2/2013 • Easy to learn • Rapid application development • Powerful data synchronization 7 Sunday, March 16, 14
  • 8.
    The Seven Principles •Data on the Wire • One Langauge • Database Everywhere • Latency Compensation • Full-Stack Reactivity • Embrace the Ecosystem • Simplicity = Productivity 8 Sunday, March 16, 14
  • 9.
    (#1) Data onthe Wire • Don’t send HTML over the network • Let client decide how to render data • Browser renders the templates as data changes 9 Sunday, March 16, 14
  • 10.
    (#2) One Language •Everything is JavaScript • Built-in JavaScript packages include: • CoffeeScript • jQuery • Bootstrap • Backbone 10 Sunday, March 16, 14
  • 11.
    (#3) Database Everywhere • MongoDBworks on both the client and the server • The client-side database API looks just like MongoDB server-side API • Database operations are cached in memory on the client-side to yield... 11 Sunday, March 16, 14
  • 12.
    (#4) Latency Compensation • Designedto create a zero-latency connection to the database • Database on client-side is updated first • Database on server-side is updated later 12 Sunday, March 16, 14
  • 13.
    (#5) Full-Stack Reactivity • Embracesthe concept of reactive programming • Everything is real-time • Templates automatically re-render themselves as data changes 13 Sunday, March 16, 14
  • 14.
    (#6) Embrace the Ecosystem •Meteor is open-source • Integrates existing open-source tools and frameworks 14 Sunday, March 16, 14
  • 15.
    (#7) Simplicity = Productivity •For something to seem simple, it must actually be simple • API are plain and simple 15 Sunday, March 16, 14
  • 16.
    Conventions Used in ThisPresentation • Command Prompt ($) • Keywords (meteor, create, etc.) • Variables (variable) 16 Sunday, March 16, 14
  • 17.
    Getting Started • DownloadMeteor • Create your first Meteor app • Explore the built-in examples 17 Sunday, March 16, 14
  • 18.
    18 Download Meteor • Unix/Linux $curl https://install.meteor.com | sh • Windows (unofficial support) • win.meteor.com • developed by Tom Wijsman • now facilitated by Stephen Darnell Sunday, March 16, 14
  • 19.
    CreateYour First Meteor App $meteor create myapp $ cd myapp myapp $ meteor 19 Sunday, March 16, 14
  • 20.
  • 21.
    Explore the Built-in Examples •Four (4) built-in examples • Leaderboard (simplest) $ meteor create --example leaderboard 21 Sunday, March 16, 14
  • 22.
  • 23.
    StructuringYour Meteor Application 23 • Specialfolders: • /server • /client • /public • /lib • /collections Sunday, March 16, 14
  • 24.
    Smart Packages (1) •JavaScript programs • Extend your Meteor environment • Injects code into client-side or server-side of your application 24 Sunday, March 16, 14
  • 25.
    Smart Packages (2) •Core smart packages: • spark • reload • livedata • mongo-livedata • minimongo 25 Sunday, March 16, 14
  • 26.
    Smart Packages (3) •List all available packages $ meteor list • Adding a package $ meteor add packageName • Removing a package $ meteor remove packageName 26 Sunday, March 16, 14
  • 27.
    DeployingYour Meteor Application • Fullapplication server • Deploy on Meteor’s infrastructure $ meteor deploy myapp.meteor.com 27 Sunday, March 16, 14
  • 28.
    Meteorite • A wrapperutility for Meteor • developed by Tom Coleman • Supports third-party applications • Does everything Meteor does plus... 28 Sunday, March 16, 14
  • 29.
  • 30.
  • 31.
    Upcoming Events (1) •Trenton Computer Festival • March 14-15, 2014 • tcf-nj.org • Emerging Technologies for the Enterprise • April 22-23, 2014 • phillyemergingtech.com 31 Sunday, March 16, 14
  • 32.
  • 33.