What is Meteor.js?
- CLI tool (meteor)
- Library of packages
- Open source
- Built on Node.js
- Seven Principals of Meteor
- Data on the Wire
- One language
- Database Everywhere
- Latency Compensation
- Full Stack Reactivity
- Embrace the Ecosystem
- Simplicity Equals Productivity
- Meteor sends data between the client and server, not fully rendered HTML.
- JavaScript on the client and server
- Same API is used to access the database on the client and server
- Application appear very fast for the client since Meteor automatically synchronizes models for fast prefetching
- Live page updates when the database changes, without browser refreshes, thanks to the event-driven interface. Drupal? Wordpress?
- Can't reiterate enough the importance of Meteor being Open source
- Easy to learn thanks to Meteor's simple and beautiful API
- Hot code pushes
- Handlebars is used for HTML templates
- MongoDB is currently used as the database behind Meteor apps. Other database types may be supported in the future.
- Atmosphere is a list of additional packages which can installed with Meteorite. More info.
- Note: Meteor 1.0 fully support Atmosphere
- Structuring your application
$ meteor create app-name
uses a skeleton to create a folder namedapp-name
and three files,app-name.html
,app-name.css
, andapp-name.js
.- Note: You can update the default skel structure here:
~/.meteor/tools/latest/tools/skel/
- Note: You can update the default skel structure here:
- Meteor automatically finds all HTML templates, JavaScript, and CSS in an application and handles processing these
main.*
files are loaded last at each folder level. Example:client/main.js
will load afterclient/file1.js
andclient/file2.js
.- Files which don't exist in
app-name/client
, app-name/server, and
app-name/tests` are loaded on the client and server. You can use isClient and isServer to separate code to run on only client or server. here is a better way to organize server and client code:- Files in
app-name/client
are only loaded on the client - Files in
app-name/server
are only loaded on the server
- Files in
- Files in the
app-name/private
directory are for static server assets. See Assets. - Files in the
app-name/lib
directory are loaded first - Files in subdirectories are loaded before files in parent directories
- Files are loaded alphabetically by filename in each directory
app-name/public
is the place to store assets such as common images,favicon.ico
, androbots.txt
app-name/client/compatibility
is a place to place JavaScript libraries and are executed prior to other client-side JavaScript files
$ meteor deploy myapp.meteor.com
will deploy your app on meteor.com's web infrastructure easily- Packages
autopublish
andinsecure
are included in new Meteor apps by default to ease development. You will probably want to remove these and provide your own functions to handle subscriptions and security before deploying your application in production. - Want to expose your app's data as an API? See Collection API
- Deployment options
- Meteor comes with a number of helpful packages to help make development faster. Try
$ meteor list
- accounts-ui is worth a look
- The Meteor server restarts when file changes happen
- The Meteor serer will wait for errors to be resolved if it can't start the application due to an error.
- Meteor code is synchronous in style thanks to Node Fibers. This means that each connection can have blocking code and no "pyramid of doom" due to lots of callbacks in asynchronous Node.js programming techniques. While each connection has blocking code, Fibers runs ontop of he Node event loop, allowed it to simultanrously server other clients.
- Meteor uses minimongo on the client side. This is a lightweight MongoDB basically.
$ curl https://install.meteor.com | sh
- You can use a VM (like at Digital Ocean or Nitrous.io for remote development. See this blog article for details on developing Meteor apps on Nitrous.io. This blog article discusses Developing Meteor apps on an iPad with Nitrous.io.
$ npm install -g meteorite
- You can install npm with Homebrew
$ brew install npm
if you don't already have it installed.
- You can install npm with Homebrew
$ meteor create my-app
$ meteor help
$ meteor help command
$ mrt add package
$ mrt install package
$ mrt update package
$ meteor run
$ meteor add
$ meteor remove
$ meteor list
$ meteor logs
$ meteor mongo
$ meteor reset
$ meteor bundle
$ meteor update
- Templates
- Collections
- etc.
- meteor.com
- Official documentation
- Meteor API
- Unofficial meteor FAQ
- Example code
- meteor.com Blog
- @meteorjs
- Stack Overflow
- Meteorpedia! The unofficial Meteor Wiki
- Abee - Scaffolding tool
- Meteor Weekly
- crater.io
- Mailing Lists
- IRC
- #meteor on irc.freenode.net
- Screencasts/Presentations
- Screencast 1 on meteor.com
- Screencast 2 on meteor.com
- Meteor YouTube channel
- Meteor.js with Matt Debergalis
- RealtimeConf - "Meteor" by Matt DeBergalis -
- meteor.js by Roger Zurawicki - Comp Sci class video. May want to skip over parts as it gets kind of long as he is instructing new students.
- TakeOff 2013 - Meteor.js - Geoff Schmidt
- How do Client Cursors Work?
- Introduction to Node.js with Ryan Dahl - Node.js video, but worth the watch since Ryan is the creator of Node.js
- Books
- Discover Meteor - The best out there. The authors are releasing updates. I recommend the Premium version since it includes some additional chapters, screencasts, podcasts, etc.
- Meteor JavaScript Framework Starter - Quick read. Older, so some items might be a little out of date, but still worth the read.
- Getting Started with Meteor.js JavaScript Framework - Okay read. Worth checking out for the money.
- Blogs
- differential.io blog - Company blog with a good many Meteor related posts.
- Podcasts
- Meteor Podcast - The first Metoer podcast (that I am aware of)