Intro to Meteor - SHROP to Meteor.pdf“Meteor is an open-source platform for building top-quality...
Transcript of Intro to Meteor - SHROP to Meteor.pdf“Meteor is an open-source platform for building top-quality...
Intro to MeteorMark Shropshire
Mark Shropshirehttp://mark.shropshires.net
z
l@shrop @shrop
/shrop /user/14767
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?