2. Meteor is developed by the Meteor Development Group. The
startup was incubated by Y Combinator and received
$11.2MM in funding from Andreessen Horowitz in July 2012.
HISTORY
https://en.wikipedia.org/wiki/Meteor_(web_framework)
4. REUNIÃO DE LIBS
Sockjs - framework emulador de websocket e responsavel pelo funcioamendto do protocolo DDP
Websocket-based data protocol DDP is like "REST for websockets". Like REST, it is a simple, pragmatic approach to
providing an API. But it is websocket-based, unlike REST, allowing it to be used to deliver live updates as data
changes. Implementation of DDP is simple (it's just a few JSON messages over a websocket) and the spec fits on a
couple of pages.
MongoDB - duh
5. REUNIÃO DE LIBS2
Handlebars - template engine
PubSub - lib de emissao e escuta de eventos via patter pubsub
MiniMongo - API clinet-side que possui a maioria das funcionalidades do mongodb (mongodb no front)
The minimongo package is a reimplementation of (almost) the entire MongoDB API, against an in-memory
JavaScript database. It is like a MongoDB emulator that runs inside your web browser. You can insert data into it and
search, sort, and update that data.
Connect - modulo node com funcionalidades para trabalhar com protocolo HTTP
6. SOCKJS
SockJS is a browser JavaScript library that provides a WebSocket-like object. SockJS gives you a coherent, cross-
browser, Javascript API which creates a low latency, full duplex, cross-domain communication channel between the
browser and the web server. Under the hood SockJS tries to use native WebSockets first. If that fails it can use a variety of
browser-specific transport protocols and presents them through WebSocket-like abstractions. SockJS is intended to
work for all modern browsers and in environments which don't support the WebSocket protocol -- for example, behind
restrictive corporate proxies. SockJS-client does require a server counterpart:
7. OS 7 PRÍNCIPIOS DO
METEOR
Data on the wire: Não envie HTML pela rede e sim apenas dados para deixar o cliente decidir como renderizá-lo.
One language: Escreva código Javascript em ambas camadas: cliente e servidor.
Database anywhere: Utilize uma API de interface única e transparente que te permite acessar o banco de dados tanto no
cliente como no servidor.
Latency compensation: No cliente é usado prefetching e model simulation na API do banco de dados para atingir latência
zero no acesso de seus recursos.
Full-Stack Reactivity: Por default tudo funciona em real-time. E todas as camadas da aplicação adotam o paradigma
orientado à eventos, que é herdado do Node.js.
Embrace the ecosystem: Totalmente open-source o Meteor possui suas convenções pelo qual agrega novos valores ao
invés de ser ferramenta uma que vai substituir outros frameworks atuais.
Simplicity equals Productivity: Seja produtivo! Desenvolva de forma simplificada, utilize APIs fáceis de aprender e
implementar, afinal essa será a melhor forma de criar uma aplicação.
11. TESTES :S
VELOCITY
sanjo:jasmine - Write client and server unit and integration tests with Jasmine.
mike:mocha - A Velocity version of mocha-web. Runs mocha tests in the Meteor context which is great for integration
testing.
xolvio:cucumber - Use BDD Gherkin-syntax cucumber to test your app. Includes PhantomJS and Selenium as well as
SauceLabs support.
rsbatech:robotframework - Robot Framework end to end test integration using Selenium and many other test libraries
Big news! Work is underway on Velocity, the official testing framework for
Meteor.
July 14, 2014 By Alice Yu
13. SUPPORTED
BROWSERS
METEOR IS ACTIVELY TESTED BY MDG TO WORK PROPERLY
ON THE FOLLOWING BROWSERS:
Android stock browser (Webkit based)
Chrome
Firefox 7+
iOS browser
IE8+
Safari 4+
Desktop Opera
Mobile Opera
src: http://meteorpedia.com/read/Supported_Browsers (2014-06-19)
14. WHEN NOT TO USE
METEOR
Meteor is best suited for Single-Page Apps, and less suited: relational minds
For graphics-heavy mobile games, it may be better to build a native app
For applications with very large numbers of concurrent connections, Meteor might require larger amounts of RAM
Scaling - if you need Facebook-scale now, Meteor is not the best solution LOL
-- Dan Dascalescu, @dandv
15. WHAT METEOR LACKS
Native reactive "joins" for MongoDB
A native mechanism to load templates dynamically
Two-way data binding as in Angular
Native server-side rendering (useful for SEO).
Production-ready support for Windows (Risos)
Easy explicit control over file load ordering
One blessed or recommended package for a given 3rd party library you find in its package repository, Atmosphere. The
Atmosphere is still in need of cleanup
-- Dan Dascalescu, @dandv
21. MONGO ON THE
FRONT!
insecure: Meteor also has a special "insecure mode" for quickly prototyping new applications. In insecure mode, if you
haven't set up any allow or deny rules on a collection, then all users have full write access to the collection. This is the only
effect of insecure mode.
Autopublish: self explained
Obs: Remova insecure e autopublish quanto antes do seu projeto
23. LATENCY
COMPENSATION
There are only two places where you can do a write
operation to a data store: inside a method call or directly via
a local collection.
24. SEM LATENCY COMPENSATION :(
// File: /client/app.js
Template.addPost.events({
"click button": function() {
var title = $('#title').val();
var content = $('#content').val();
var post = {
title: title,
content: content
};
Meteor.call('addPost', post, function(err, postId) {
if(err) {
alert(err.reason);
} else {
Router.go('/post/' + postId);
25. COM LATENCY COMPENSATION :)
// File: /client/app.js
Template.addPost.events({
"click button": function() {
var title = $('#title').val();
var content = $('#content').val();
var post = {
title: title,
content: content,
_id: Random.id()
};
Meteor.call('addPost', post, function(err) {
if(err) {
alert(err.reason);
}
});
29. GOOD PACKAGES!
accounts-base 1.1.3* A user account system
accounts-meteor-developer 1.0.3* Login service for Meteor developer accounts
accounts-password 1.0.6* Password support for accounts
accounts-ui 1.1.4* Simple templates to add login widgets to an app
alanning:roles 1.2.13 Role-based authorization
aldeed:autoform 4.2.2* Easily create forms with automatic insert and update, and automatic reactive validation.
aldeed:collection2 2.3.2* Automatic validation of insert and update operations on the client and server.
aldeed:simple-schema 1.3.0* A simple schema validation object with reactivity. Used by collection2 and autoform.
cfs:filesystem 0.1.1* Filesystem storage adapter for CollectionFS
cfs:gridfs 0.0.27* GridFS storage adapter for CollectionFS
cfs:standard-packages 0.5.3* Filesystem for Meteor, collectionFS
email 1.0.5* Send email messages
insecure 1.0.2* Allow all database writes by default
iron:router 1.0.7 Routing specifically designed for Meteor
meteor-platform 1.2.1* Include a standard set of Meteor packages in your app
meteorhacks:npm 1.2.2* Use npm modules with your Meteor App
mizzao:user-status 0.6.4 User connection and idle state tracking for Meteor
npm-container 1.0.0+ Contains all your npm dependencies
okgrow:iron-router-autoscroll 0.0.7* Fixes page position after changing pages using Iron Router
pascoual:pdfkit 1.0.5 PDFKit, the PDF generation library
yogiben:admin 1.1.0* A complete admin dashboard solution
yogiben:autoform-file 0.2.0* File upload for AutoForm