meteor

20
Meteor.js

Upload: michael-elfassy

Post on 20-Aug-2015

54 views

Category:

Documents


6 download

TRANSCRIPT

Page 1: Meteor

Meteor.js

Page 2: Meteor

Michael Elfassy

twitter: @michaelelfassy

github: elfassy

stackoverflow: montrealmike

website: smashingboxes.com

Durham, NC | San Francisco | Montreal

Page 3: Meteor

and where is the free pizza?

What’s Meteor.js?

Page 4: Meteor

Meteor is an open-source full-

stack javascript framework for

building modern web and mobile

applications

Page 5: Meteor

Really?

Page 6: Meteor

Yes! In fact you’ll build apps that:

● are more responsive

● have built-in collaboration

● are more fun (and faster) to write

● support hot code push

● are easily compiled for multiple

platforms

Page 7: Meteor

Demos!https://github.com/alanshaw/meteor-blackboardhttps://github.com/p4bloch/x3dom-meteorhttps://github.com/meteor/meteor/tree/devel/examples

Page 8: Meteor
Page 9: Meteor

An can you justify those bold claims

How does it work?

Page 10: Meteor

7 principles of meteor

● Data on the Wire

● One Language

● Database Everywhere

● Latency Compensation

● Full Stack Reactivity

● Embrace the Ecosystem

● Simplicity Equals Productivity

Page 11: Meteor

Apps feel responsiveLatency compensation● Database everywhere● One language● Data on the wire (aka: Client side rendering)

http://manning.com/hochhaus/Meteor_MEAP_CH01.pdf

BONUS:

No network compensation

Page 12: Meteor

Apps have built-in collaborationFull-stack reactivity● Livequery - Watch DB for changes● DDP - Send data back and forth to the client

o replay cacheo publish / subscribe

● MiniMongo - store data and do database queries on the client● Tracker

o recomputation is done automaticallyo view updates with no extra code

● Blaze - rendering Read more about these components on meteor.com/projects

Page 13: Meteor

HTTP / HTML

User interactionsDatabase, Security, Business Logic, Rendering

HTTP / XML (AJAX)

Rendering, User interactionsDatabase, Security, Business Logic

DDP / JSON

Rendering, User interactions, Business Logic, DatabaseSecurity

1995

2005

2014

Page 14: Meteor

Apps are more fun / faster to write● One language

o share code between client and server (DRY)o Write less code

● Embrace the ecosystemo Packagero http://atmospherejs.com

● Simplicity (KISS)o all the components, not just a library to solve one problemo configuration-free minifier, deployer...o no need to write code to update the viewo no need to write code to sync data

Page 15: Meteor

Apps auto-reload

● Hot code pusho don’t lose your user’s stateo work even when adding new packages

● Bypass Apple! o use wisely

Page 16: Meteor

Apps that are cross platform

demo!> meteor run ios> meteor run android

Page 17: Meteor

Don’t be a dinosaur

Your clients expect:

● apps that feel native

● collaborative apps● you to write these apps in

days, not months

Page 18: Meteor

Questions?

Join the communityhttp://montreal.meteor.com

Page 19: Meteor

Learning resources

● meteor.com/install● Discover Meteor Book

o book.discovermeteor.com/starter● docs.meteor.com● stackoverflow● meteorpodcast.com● meteorpedia.com

8 chapters free today

only

Page 20: Meteor

Packages● mquandalle:jade● stylus● coffeescript● kaptron:minimongoid (ORM)● dburles:collection-helpers● underscore● reywood:publish-composite● mrt:moment● aldeed:collection2● accounts-ui, accounts-google, accounts-github, accounts-

password● matb33:collection-hooks● iron:router