Why meteor

Preview:

DESCRIPTION

Why should use meteor to build an application?

Citation preview

& Getting Started

Meteor

+ Getting Started@jon_perl

1. Use JavaScript on the client (since 1995)

Blocking / Threads vs Callbacks

var result = db.query(“select * from T”)print(result)

db.query(“select * from T”, function (result) {print(result)

})

vs

Traditional Server

Node

1. Use JavaScript on the client

2. Use JavaScript on the server

One language to rule them all

JavaScrip

t

1. Use JavaScript on the client

2. Use JavaScript on the server

3. ???

4. PROFIT!

???

Meteor

The web in 2014

• Rich applications– Real time updates– Single page

• Short development cycles

Seven Principles of Meteor

Data on the Wire. Send data, not HTML, over the network. Let the client decide how to render it.

One Language. Write both the client and the server parts of your interface in JavaScript.

Database Everywhere. Use the same transparent API to access your database from the client or the server.

Latency Compensation. On the client, use prefetching and model simulation to make it look like you have a zero-latency connection to the database.

Seven Principles of Meteor

Full Stack Reactivity. Make realtime the default. All layers, from database to template, should make an event-driven interface available.

Embrace the Ecosystem. Meteor is open source and integrates, rather than replaces, existing open source tools and frameworks.

Simplicity Equals Productivity. The best way to make something seem simple is to have it actually be simple. Accomplish this through clean, classically beautiful APIs.

Getting Started

Install Node and Meteor

(Mac / Linux) curl https://install.meteor.com | /bin/sh

(Windows) http://win.meteor.com/

1. Create an example

2. Run the app

File Structure

• /server - runs on the server• /client - runs on the client• /, /common - runs on both• static assets (fonts, images, etc.) go

in /public

Additional Resources

https://www.discovermeteor.com/

https://eventedmind.com/

http://meteorpedia.com/

http://docs.meteor.com

http://manual.meteor.com/

1. Use JavaScript on the client

2. Use JavaScript on the server

3. Meteor

4. PROFIT!

Questions?

Credits

Slide 1: http://www.flickr.com/photos/39057386@N02/4111291263/Slide 3 (Chrome): http://news.cnet.com/8301-30685_3-20043680-264.htmlSlide 3 & 4 (V8): http://news.softpedia.com/newsImage/Chrome-May-Add-Support-for-Mozilla-s-Asm-js-the-Native-Client-Competitor-2.pngSlide 4 (Node): http://www.codersgrid.com/wp-content/uploads/2013/05/nodejs-image-processing.pngSlide 5 & 6: http://magnetik.github.io/node-webid-report/Slide 8: http://www.flickr.com/photos/87408548@N02/9102201081/Slide 11: http://www.flickr.com/photos/10017016@N03/4885254343/

Recommended