17
Meteor Full Stack Javascript Made Easy Joshua Cope

Introduction to Meteor: UAlbany Open Source Festival 2014

Embed Size (px)

Citation preview

Page 1: Introduction to Meteor: UAlbany Open Source Festival 2014

MeteorFull Stack Javascript Made Easy

Joshua Cope

Page 2: Introduction to Meteor: UAlbany Open Source Festival 2014

What is Meteor?

Page 3: Introduction to Meteor: UAlbany Open Source Festival 2014

A free open source platform built on top of Node.js that makes it dramatically faster to write rich realtime web applications in pure JavaScript.

Page 4: Introduction to Meteor: UAlbany Open Source Festival 2014

It's what sits between your app's database and its user interface and makes sure that both are kept in sync.

How to think of it?

Page 5: Introduction to Meteor: UAlbany Open Source Festival 2014

Live Page Updates• Just write your templates. • Automatically update when database changes. • Supports any templating language.

No more refreshing!

Page 6: Introduction to Meteor: UAlbany Open Source Festival 2014

DDP (Distributed Data Protocol)

• A standard way to solve the biggest problem facing client-side JavaScript developers:

• Querying a server-side database, sending the results down to the client, and then pushing changes to the client whenever anything changes in the database.

• Supported on newer browsers using WebSockets and on older browsers using Asynchronous JavaScript + XML (Ajax) long polling

Page 7: Introduction to Meteor: UAlbany Open Source Festival 2014

Publications/Subscriptions!

Every Meteor client includes an in-memory database cache.• To manage the client cache, the server publishes sets of

JSON documents, and the client subscribes to those sets.

• As documents in a set change, the server patches each client's cache.

Page 8: Introduction to Meteor: UAlbany Open Source Festival 2014

FeaturesHot Code Pushes

• Update your app while users are connected without disturbing them.

!

Latency Compensation • When a user makes a change, their screen

updates immediately. If the server rejects their request or executes it differently, the client is patched up with what actually happened.

Page 9: Introduction to Meteor: UAlbany Open Source Festival 2014

Security• In Meteor, the client and server share the same

database API.

• Code running on the server has direct access to the database, code running on the client does not.

• By default, a new Meteor app includes the autopublish and insecure packages, which together mimic the effect of each client having full read/write access to the server's database.

Page 10: Introduction to Meteor: UAlbany Open Source Festival 2014

Databases• Each Meteor app comes with it’s own

MongoDB Instance.

• Meteor currently only supports Mongo.

• Future Support coming for SQL and other Databases.

Page 11: Introduction to Meteor: UAlbany Open Source Festival 2014

Smart Packages• Little programs that can inject code into the client or

the server.

• You can continue use your favorite templating, testing, or DOM manipulation frameworks.

Page 12: Introduction to Meteor: UAlbany Open Source Festival 2014

Meteor Accounts• A smart package for accounts.

• Includes pre-built components for common tasks like login, signup, password reset, and verification emails.

• Easy to add and easy to setup external services.

Page 13: Introduction to Meteor: UAlbany Open Source Festival 2014

Atmospherehttps://atmospherejs.com

• A Meteor package manager.

• Allows you to install 1000s of packages from the community through the Atmosphere package repository.

Page 14: Introduction to Meteor: UAlbany Open Source Festival 2014

Testinghttp://arunoda.github.io/laika/

http://xolvio.github.io/rtd/

Page 15: Introduction to Meteor: UAlbany Open Source Festival 2014

• Incredibly easy to create real time applications

• One Language, only need to use Javascript

• Large community package system, allows for use of Meteor packages and NPM packages.

Why use this over Ruby and Rails, Python and Django or another language and framework?

Page 16: Introduction to Meteor: UAlbany Open Source Festival 2014

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

How to get started?Install

Create Applicationmeteor create HelloWorld cd HelloWorld meteor => Meteor server running on: http://localhost:3000/

Supported Platforms: Linux & Mac

Deploymeteor deploy osf2014.meteor.com

Page 17: Introduction to Meteor: UAlbany Open Source Festival 2014

Questions?