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

Post on 19-Mar-2020

4 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Intro to MeteorMark Shropshire

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

What’s Meteor?

and more…

A stack of technologies

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 ]]]]]

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

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

What’s Meteor?

• Meteor Development Group

• $11.2M development budget

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

Why Meteor?

Database Web server

Traditional web applications

DataClientHTTP

Request

Why Meteor?

Database Meteor server

Meteor web applications

DataClient

Initial package

Client

Polling

Data updates

Local DB write (sync)DB writes (async)

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

Installation

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

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

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

App Structure

• Some folders are “special”

• Flexibility

server

lib

client

private

public

tests

tests

compatibility

Testing

• Possible official testing framework for 1.0

• Laika testing framework for Meteor

• Testing with Meteor book

Deployment

• Deploying to meteor.com

• Deploying to Modulus

Resources

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

• Meteorpedia

Demos

Questions?

top related