Introduction to Meteor

By Abhijeet S  {ajduke}

About Me

  • Self-taught Developer
  • Doing Node since 1.5 years
  • Doing Meteor since 1 year
  • Asst. Organizer at Meteor Mumbai Meetup Group
  • Technology enthusiast
  • Loves Open Source
  • Blogger

@_ajduke

ajduke

http://blog.ajduke.in

About you 

Overview

  • What is Meteor
  • Quick Start
  • App Demo
  • Meteor Architecture
  • Meteor Components
  • More about Meteor
  • Examples Apps 
  • Meteor Production apps
  • Learning Resources

What is Meteor?

Open Source Platform for Building Real-time apps 

For Web and Mobile apps

Built to Power for Next -gen Modern Apps

Its both Front and Backend

Provides Full stack reactivity

One Language- Javascript

Maintained by Meteor Development Group (MDG) and community

Meteor Vs. Other Node stack

Some Node Stack

  • Derby.js
  • Sails.js
  • MEAN Stack

Source:  http://wiki.dandascalescu.com/essays/meteor_js_vs_the_mean_stack

What Meteor is Composed of 

  • Node.js
  • MongoDB
  • Handlebars like Templating
  • JQuery
  • Sock.js
  • and much more

Quick Start

Install Meteor

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

Linux/ OS X

Windows

  Download Official Installer-
  https://install.meteor.com/windows

Create Project

meteor create myapp 

Run Project

$ cd myapp
$ meteor
=> Meteor server running on: http://localhost:3000/

App Demo 

App Source Code

Meteor Architecture

Source: http://joshowens.me/what-is-meteor-js/

Meteor Components

  • Live Query:  Handling Realtime database queries
  • DDP: Communication Protocol for real-time feature
  • MiniMongo: Small version of Mongodb in browser
  • Tracker: Reactive component on client 
  • Blaze: Keeps view up to date with Data
  • Spacebars: Handlerbar like but built for reactiveness                 

More on this here:  http://meteor.com/projects

Main Components

Running Mobile Apps

Running for Android


meteor install-sdk android

meteor add-platform android

// run on android simulator
meteor run android

// run on connected android device
meteor run android-device

Running for iOS

// install SDk
meteor install-sdk ios

// add the platform
meteor add-platform ios

// run ios simulator
meteor run ios

// run on connected ios device
meteor run ios-device

App Directory Structure  

Directory Structure

/.meteor/...
/client/...
/lib/...
/server/...
/public/...
/tests/...

Packaging System

AtmosphereJS

  • Official Package Repository
  • Over  5600+ packages 
  • Built with Meteor
  • Growing no. packages built by community

NPM

  • Community port for using NPM modules 
  • Direct access to 1.5 Lacs npm packages

Deployment

On Meteor Infrastructure

deployment using CLI

  • free small instances 
  • only for apps prototype 
  • easy to deploy
  • handy urls (youappname.meteor.com)
  • No Management UI
$ meteor deploy myapp.meteor.com

On Other Infrastructures

Create bundle using CLI

  • Bundle Meteor App to Node
  • Bundled app can be used anywhere with Node like EC2, Heruko Paas etc
  • Modulus has infrastructure for deployment of Meteor
  • MDG working on Product- Galaxy, Not yet released !
$ meteor bundle myapp.tgz

Example Apps

Todo 

Local Market

        meteor create --example todo
        meteor create --example localmarket

Production Apps

Learning Resources

That's all folk's

Questions?

ajduke@ajduke.in

@_ajduke

http://blog.ajduke.in

Made with Slides.com