Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
METEOR DE PEGASUS
DESENVOLVENDO APLICAÇÕES WEB COM METEOR.JS
Meteor is developed by the Meteor Development Group. The
startup was incubated by Y Combinator and received
$11.2MM in fun...
ONE LANGUAGE
Node - back
Javascript - front
Mongodb - database
REUNIÃO DE LIBS
Sockjs - framework emulador de websocket e responsavel pelo funcioamendto do protocolo DDP
Websocket-based...
REUNIÃO DE LIBS2
Handlebars - template engine
PubSub - lib de emissao e escuta de eventos via patter pubsub
MiniMongo - AP...
SOCKJS
SockJS is a browser JavaScript library that provides a WebSocket-like object. SockJS gives you a coherent, cross-
b...
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...
HTTPS://WWW.METEO
R.COM/TRY/
PACKAGE MANAGER
PROPRIO
HTTPS://ATMOSPHEREJS.COM/
LIVE RELOAD!
But only on the server ://
TESTES :S
VELOCITY
sanjo:jasmine - Write client and server unit and integration tests with Jasmine.
mike:mocha - A Velocit...
SUCCESS CASES
SUPPORTED
BROWSERS
METEOR IS ACTIVELY TESTED BY MDG TO WORK PROPERLY
ON THE FOLLOWING BROWSERS:
Android stock browser (Web...
WHEN NOT TO USE
METEOR
Meteor is best suited for Single-Page Apps, and less suited: relational minds
For graphics-heavy mo...
WHAT METEOR LACKS
Native reactive "joins" for MongoDB
A native mechanism to load templates dynamically
Two-way data bindin...
.METEOR
The build folder
INTEGRAÇAO COM PACKAGE.JSON
BUILT IN MONGODB AND SERVER
Obs: Ids zuados! Não já ObjectId
WTF!
REALTIME DESGRAÇA!
WHAT BELONGS TO
WHO
MONGO ON THE
FRONT!
insecure: Meteor also has a special "insecure mode" for quickly prototyping new applications. In insec...
REACTIVE TEMPLATE!
BLAZE
http://meteor.github.io/blaze/
LATENCY
COMPENSATION
There are only two places where you can do a write
operation to a data store: inside a method call or...
SEM LATENCY COMPENSATION :(
// File: /client/app.js
Template.addPost.events({
"click button": function() {
var title = $('...
COM LATENCY COMPENSATION :)
// File: /client/app.js
Template.addPost.events({
"click button": function() {
var title = $('...
PUBSUB
Meteor.publish('Clients', function(){
return Clients.find({});
});
Meteor.subscribe("Clients");
MÃE, QUERO USAR
ANGULAROU
EMBER.JS!
NA NANANA NÃO, NOT A GOOD IDEA.
QUANDO USAR
METEOR EM UMA
APLICAÇÃO?
GOOD PACKAGES!
accounts-base 1.1.3* A user account system
accounts-meteor-developer 1.0.3* Login service for Meteor develo...
HTTP://WWW.TELESC.P
E/
CONTATO@QUADRISYSTEMS.COM
remoto *.*
Meteoro de pegasuus! Desenvolvendo aplicações realtime com MeteorJS
Upcoming SlideShare
Loading in …5
×

Meteoro de pegasuus! Desenvolvendo aplicações realtime com MeteorJS

423 views

Published on

Meteoro de pegasuus! Desenvolvendo aplicações realtime com MeteorJS

Published in: Software
  • Be the first to comment

  • Be the first to like this

Meteoro de pegasuus! Desenvolvendo aplicações realtime com MeteorJS

  1. 1. METEOR DE PEGASUS DESENVOLVENDO APLICAÇÕES WEB COM METEOR.JS
  2. 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)
  3. 3. ONE LANGUAGE Node - back Javascript - front Mongodb - database
  4. 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. 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. 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. 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.
  8. 8. HTTPS://WWW.METEO R.COM/TRY/
  9. 9. PACKAGE MANAGER PROPRIO HTTPS://ATMOSPHEREJS.COM/
  10. 10. LIVE RELOAD! But only on the server ://
  11. 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
  12. 12. SUCCESS CASES
  13. 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. 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. 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
  16. 16. .METEOR The build folder INTEGRAÇAO COM PACKAGE.JSON BUILT IN MONGODB AND SERVER Obs: Ids zuados! Não já ObjectId
  17. 17. WTF!
  18. 18. REALTIME DESGRAÇA!
  19. 19. WHAT BELONGS TO WHO
  20. 20. 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
  21. 21. REACTIVE TEMPLATE! BLAZE http://meteor.github.io/blaze/
  22. 22. 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.
  23. 23. 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);
  24. 24. 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); } });
  25. 25. PUBSUB Meteor.publish('Clients', function(){ return Clients.find({}); }); Meteor.subscribe("Clients");
  26. 26. MÃE, QUERO USAR ANGULAROU EMBER.JS! NA NANANA NÃO, NOT A GOOD IDEA.
  27. 27. QUANDO USAR METEOR EM UMA APLICAÇÃO?
  28. 28. 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
  29. 29. HTTP://WWW.TELESC.P E/
  30. 30. CONTATO@QUADRISYSTEMS.COM remoto *.*

×