WARNING!
This is talk is focused on provide you another way to develop apps using Meteor, so please make sure you understood all the pros/cons related to this platform, since it couldn't satisfy your requirements.
Kenji Lozano (@kenji_lozano)
@kenji_lozano
Senior Software Developer, Truextend
Organizer of Angular Bolivia Community
Organizer of NG-Bolivia and NgGirls
Speaker and Javascript Lover
Sucre, Bolivia
Cochabamba
Cycling Fan
THE FASTEST WAY TO BUILD
Meteor is an open source platform for web, mobile and desktop
Library
Framework
Platform
THE FASTEST WAY TO BUILD
Meteor is an open source platform for web, mobile and desktop
Links and Forums
Modern UI/UX
Single Pages
Runs in the browser
No refresh button
Browser, mobile and more
Stateless
Statefull
Request / Response
Presentation on the wire
Publish / Subscribe
Data on the wire
ws
Server
Client
Publish & Subscribe
How does it works?
How does it works?
// on the server
Meteor.publish('posts', function() {
return Posts.find({flagged: false});
});
How does it works?
// on the server
Meteor.publish('posts', function(author) {
return Posts.find({
flagged: false,
author: author
});
});
// on the client
Meteor.subscribe('posts', 'bob-smith');
You can think of the publication / subscription system as a funnel that transfers data from a collection on the server (source) to one on the client (destination).
Sends data to backend to perform a transaction.
Meteor.methods({
addMessage(content: string, from: string,
type: 'MSG' | 'INFO',
avatar: string) {
return Messages.insert({
from,
content,
type,
avatar
});
}
});
var name = response.name
GET http://myServer/user
SELECT name
FROM users
WHERE id=12345
Users.find(
{ _id: 12345 },
{
fields: { name: 1 }
}
);
DDP
Server
Client
Subscription
Publication
Method
Minimongo
Mongo
Post.insert
Optimistic UI
Post.insert
Method
Ship more with less code.
Build apps for any device.
Integrates technologies that you already use.
// on the server
Meteor.publish('posts', function(author) {
return Posts.find({
flagged: false,
author: author
});
});
// on the client
Meteor.subscribe('posts', 'bob-smith');
Meteor.methods({
addMessage(content: string, from: string,
type: 'MSG' | 'INFO',
avatar: string) {
return Messages.insert({
from,
content,
type,
avatar
});
}
});
Users.find(
{ _id: 12345 },
{
fields: { name: 1 }
}
);
#For OSX/LINUX Users
$ curl https://install.meteor.com/ | sh
#For WINDOWS Users
$ choco install meteor
#Create a project
$ meteor create myapp
#Run it locally
$ cd myapp
$ meteor npm install
$ meteor
$ # Meteor server running on: http://localhost:3000/
What about NodeJs and MongoDb?
Meteor docs says: