Why meteor

26
& Getting Started Meteor + Getting Started @jon_per l

description

Why should use meteor to build an application?

Transcript of Why meteor

Page 1: Why meteor

& Getting Started

Meteor

+ Getting Started@jon_perl

Page 2: Why meteor

1. Use JavaScript on the client (since 1995)

Page 3: Why meteor
Page 4: Why meteor
Page 5: Why meteor

Blocking / Threads vs Callbacks

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

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

})

vs

Page 6: Why meteor

Traditional Server

Page 7: Why meteor

Node

Page 8: Why meteor

1. Use JavaScript on the client

2. Use JavaScript on the server

Page 9: Why meteor

One language to rule them all

JavaScrip

t

Page 10: Why meteor

1. Use JavaScript on the client

2. Use JavaScript on the server

3. ???

4. PROFIT!

Page 11: Why meteor

???

Page 12: Why meteor

Meteor

Page 13: Why meteor

The web in 2014

• Rich applications– Real time updates– Single page

• Short development cycles

Page 14: Why meteor
Page 15: Why meteor
Page 16: Why meteor
Page 17: Why meteor
Page 18: Why meteor

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.

Page 19: Why meteor

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.

Page 20: Why meteor

Getting Started

Install Node and Meteor

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

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

Page 21: Why meteor

1. Create an example

2. Run the app

Page 22: Why meteor

File Structure

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

in /public

Page 23: Why meteor

Additional Resources

https://www.discovermeteor.com/

https://eventedmind.com/

http://meteorpedia.com/

http://docs.meteor.com

http://manual.meteor.com/

Page 24: Why meteor

1. Use JavaScript on the client

2. Use JavaScript on the server

3. Meteor

4. PROFIT!

Page 25: Why meteor

Questions?

Page 26: Why meteor

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/