intro to meteor - shrop to meteor.pdf“meteor is an open-source platform for building top-quality...

21
Intro to Meteor Mark Shropshire

Upload: others

Post on 19-Mar-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Intro to Meteor - SHROP to Meteor.pdf“Meteor is 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

Intro to MeteorMark Shropshire

Page 3: Intro to Meteor - SHROP to Meteor.pdf“Meteor is 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

What’s Meteor?

“Meteor is 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.”

http://meteor.com

Page 4: Intro to Meteor - SHROP to Meteor.pdf“Meteor is 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

What’s Meteor?

and more…

A stack of technologies

Page 5: Intro to Meteor - SHROP to Meteor.pdf“Meteor is 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

What’s Meteor?CLI tool: meteor

meteor create myNewAppmyNewApp: created.!To run your new app: cd myNewApp meteor

cd myNewAppmeteor

=> Meteor server running on: http://localhost:3000/

$

$$

[[[[[ ~/Sites/myNewApp ]]]]]

Page 6: Intro to Meteor - SHROP to Meteor.pdf“Meteor is 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

What’s Meteor?

• http://docs.meteor.com/#api

• Node Fibers

• DDP (Distributed Data Protocol)

• Works identically in the browser and on the server (when possible)

A wonderful API

Page 7: Intro to Meteor - SHROP to Meteor.pdf“Meteor is 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

Is Meteor MVC? No, Model View View-Model (MVVM)

Model View View-Model

Client codeHTML TemplatesSynchronized data

Source: Getting Started with Meteor.js JavaScript Framework by Issac Strack

Page 8: Intro to Meteor - SHROP to Meteor.pdf“Meteor is 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

What’s Meteor?

• Meteor Development Group

• $11.2M development budget

Page 9: Intro to Meteor - SHROP to Meteor.pdf“Meteor is 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

Why Meteor?Seven Principles of Meteor

• Data on the Wire

• One language

• Database Everywhere

• Latency Compensation

• Full Stack Reactivity

• Embrace the Ecosystem

• Simplicity Equals Productivity

Source: http://docs.meteor.com/#sevenprinciples

Page 10: Intro to Meteor - SHROP to Meteor.pdf“Meteor is 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

Why Meteor?

Database Web server

Traditional web applications

DataClientHTTP

Request

Page 11: Intro to Meteor - SHROP to Meteor.pdf“Meteor is 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

Why Meteor?

Database Meteor server

Meteor web applications

DataClient

Initial package

Client

Polling

Data updates

Local DB write (sync)DB writes (async)

Page 12: Intro to Meteor - SHROP to Meteor.pdf“Meteor is 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

Why Meteor?DDP (Distributed Data Protocol)

• RPC from client to server

• Client subscriptions to sets of documents

• JSON objects/EJSON field specifications

• Introducing DDP

• DDP Specificaiton

Page 13: Intro to Meteor - SHROP to Meteor.pdf“Meteor is 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

Installation

curl https://install.meteor.com/ | sh$

Page 14: Intro to Meteor - SHROP to Meteor.pdf“Meteor is 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

Atmospherehttp://atmosphere.meteor.com - Meteor package directory

Page 15: Intro to Meteor - SHROP to Meteor.pdf“Meteor is 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

Meteorite

mrt add iron-router✓ iron-router!Done installing smart packagesStand back while Meteorite does its thing!Done installing smart packagesOk, everything's ready. Here comes Meteor!!iron-router: Routing specifically designed for Meteor$

$

http://oortcloud.github.io/meteorite - Installer and package manager for Meteor

Page 16: Intro to Meteor - SHROP to Meteor.pdf“Meteor is 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

App Structure

• Some folders are “special”

• Flexibility

server

lib

client

private

public

tests

tests

compatibility

Page 17: Intro to Meteor - SHROP to Meteor.pdf“Meteor is 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

Testing

• Possible official testing framework for 1.0

• Laika testing framework for Meteor

• Testing with Meteor book

Page 18: Intro to Meteor - SHROP to Meteor.pdf“Meteor is 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

Deployment

• Deploying to meteor.com

• Deploying to Modulus

Page 19: Intro to Meteor - SHROP to Meteor.pdf“Meteor is 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

Resources

• https://gist.github.com/shrop/9069013

• Meteorpedia

Page 20: Intro to Meteor - SHROP to Meteor.pdf“Meteor is 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

Demos

Page 21: Intro to Meteor - SHROP to Meteor.pdf“Meteor is 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

Questions?