Laurentiu macovei meteor. a better way of building apps
-
Upload
codecampiasi -
Category
Technology
-
view
78 -
download
0
description
Transcript of Laurentiu macovei meteor. a better way of building apps
Laurențiu MacoveiDotNetWise
[25th of October 2014]
A better wayto build apps.
Laurențiu MacoveiDotNetWise
[25th of October 2014]
A better wayto build apps.
AgendaWhere we are today
Principles of Meteor
Demo
WorldwideMeteor Day
NOVEMBER 6, 2014
A welcome party in your own city, hosted by Meteor developers all around the world.
http://meteorday.com/
See you on 6 Nov 19:00meetup.com/Meteor-Iasi
So what is Meteor anyways?
Meteor = Code + Community
Meteor is an open sourcefull stack framework that makes reactive real time applications really easy to build
Meteor = Code + Community
Community is organizing people to accomplish great things
Monthly Meteor Devshop is held in San Francisco and London (http://goo.gl/mWhWZC)
Today?
Where are we?
6 nov 2011 the
first commit of
Meteor
11340 commits
eversince
Knockout JS
Durandal JS
Derby
http://code.tutsplus.com/tutorials/important-considerations-when-building-single-page-web-apps--net-29356
Knockout JS
Durandal JS
Derby
XML / REST / SOAP / POX / JSON / JSV / ...
Knockout JS
Durandal JS
Derby
XML / REST / SOAP / POX / JSON / JSV / ... Reactive
Rective programming
A programming paradigm oriented around data flows and the propagation of change.
Meteor Roadmap: 0.9.4 today
1.0 will be released on 6th Nov
Under consideration for 1.1+Native Windows support Until then you can use vagrant https://github.com/shoebappa/vagrant-meteor-windows
Other databases support than MongoDBroadmap.meteor.com
D:\Work\Codecamp\2014\CoffeesScript.png
Stargazers (as of 14 oct 2014)
Reactive
Reactive
000 Funding
...not only has a team of dedicated and capable engineers with a vision for changing the world (nearly every team has that),
but it also has a lovely bank account: $11.2 million in funding (hardly any team has that)
http://goo.gl/Gnfcww
Nine principles of Meteor1. One language2. Simplicity ===
Productivity
3. Data on the Wire4. Database Everywhere5. Latency Compensation6. Hot Code Pushes
7. Embrace the Ecosystem
8. Interoperability9. Smart packages
10. Full Stack Reactivity
Nine principles of Meteor1. One language2. Simplicity ===
Productivity
3. Data on the Wire4. Database Everywhere5. Latency Compensation6. Hot Code Pushes
7. Embrace the Ecosystem
8. Interoperability9. Smart packages
10. Full Stack Reactivity
001 Pure Javascript
Write your entire app in pure JavaScript.
JAVASCRIPT
JAVASCRIPT EVERYWHERE
001 Pure Javascript
All the same APIs are available on the client and the server — including database APIs!
001 Pure Javascript
All the same APIs are available on the client and the server — including database APIs!
001 Pure Javascript
All the same APIs are available on the client and the server — including database APIs!
001 Traditional Stack vs Pure Javascript
ClientHTML, CSS, Javascript
ServerProgramming Language, Database Access, Marshalling Language
001 Traditional Stack vs Pure Javascript
ClientHTML, CSS, Javascript
ServerProgramming Language, Database Access, Marshalling Language
SQL rows -> Entities -> JSON
001 Meteor Stack embraces Pure Javascript
ClientHTML, CSS, Javascript, MiniMongo
ServerJavascript, Mongo
001 Pure Javascript
https://meteorhacks.com/introduction-to-ddp.html
001 Pure Javascript
Even MongoDB stores JSON documents and uses Javascript syntax to query, insert, update and delete data
002 Simplicity === Productivity
One command to create an app meteor create awesome
002 Simplicity === Productivity
One command to locally run your app
meteor
002 Simplicity === Productivity
One command to compile your entire application into a fully self-contained bundle
meteor build
002 Simplicity === Productivity
One command to deploy your app into the cloud
meteor deploy awesome
-> http://awesome.meteor.com
002 Simplicity === Productivity
One command to run on premises: Unpack it anywhere there's node.js
forever start bundle/main.js
003 Data on the Wire.Live page updates.
„Apps need Templates, Templates need DATA”
003 Live page updates„Apps need Templates, Templates need
DATA”
Just write your templates.
003 Data on the wire.They automatically update when data in the database changes
003 Data on the wire.
Supports any templating language. (But as of 0.9.4 only ships with Blaze)
003 Data on the wire.
Supports any templating language. (But as of 0.9.4 only ships with Blaze)
Jade, Knockout and Famo.us are community supported.
003 Data on the wire. Live page updates – KO example
004 Database Everywhere. Clean, powerful data synchronization.
Write your client code as if it were running on the server and had direct access to the database.
004 Database Everywhere.Write your client code as if it were running on the server and had direct access to the database.
004 Database Everywhere.
Publish / Subscribe mechanism
004 Database Everywhere.
Publish / Subscribe mechanism
004 Database Everywhere.
Publish / Subscribe mechanism
004 Database Everywhere.Publish / Subscribe mechanism
004 Database Everywhere.
The code itself is your API.
No more loading your data from REST endpoints.
005 Latency compensation.
When a user makes a change, their screen updates immediately — no waiting for the server.
005 Latency compensation.In a traditional app, the client does an action and waits for the server to respond. Wait time increases gradually with the server load.
Traditional
005 Latency compensation.When a user makes a change, their screen updates immediately — no waiting for the server.
With latency compensationTraditional
005 Latency compensation.
If the server rejects their request –or– executes it differentlyThe client is patched up with what actually happened.
006 Hot Code Pushes.
Update your app while users are connected without disturbing them.
006 Hot Code Pushes.
When you push a new version, the new code is seamlessly injected into each browser frame in which the app is open.
006 Hot Code Pushes.
Supports mobile platforms too with Cordova / Phonegap:
meteor add platform androidmeteor add platform ios
006 Hot Code Pushes.
Yes! Apple allows hot code pushes in IOS & AppStore.
Although, LocalStorage is limited to 5MB!
007 Embrace the Ecosystem.
Meteor is open source and integrates, rather than replaces, existing open source tools and frameworks.
007 Embrace the Ecosystem.Meteor integrates with: open source popular examples:
Angular https://medium.com/@zfxuan/the-wonderful-duo-using-meteor-and-angularjs-together-4d603a4651bf
Famo.us https://www.youtube.com/watch?v=bmd-cXSGQAA
Polymer https://github.com/ecwyne/meteor-polymer
officially: Velocity – Unit Testing for Meteor using
jasmine mocha selenium
008 Interoperability.
You can connect anything to Meteor, from native mobile apps to legacy databases to Arduinos.
Just implement the simple DDP (Distributed Data Protocol).http://www.meteorpedia.com/read/DDP_Clients
009 Smart Packages.Meteor's Smart Packages are actually little programs that can inject code into the client or the server, or even hook into the bundler to preprocess your source.
https://atmospherejs.com
meteor add iron:router
Some examples:iron:router accounts-uiless spiderable – enable SEO to your site
ResourcesBeginners
discovermeteor.com
Best meteor resources I’ve found
Meteor Tips 30 Days with MeteorDiscover MeteorMeteor Hacks
Gentlenodemeteor.hackpad.comyauh.dejavascriptissexy.comandrewscala.com/meteormeteortuts.comdifferential.ioMeteor cookbookMeteor Academy
Is it a better way to build apps?
1. Your applications are real-time by default.
2. You can develop with just one language.
3. The community is extremely supportive.
Is it a better way to build apps?
4. You can save a lot of time with smart packages.
5. It’s optimized for developer happiness.
6. It’s friendly to beginner developers.
7. It’s ahead of the tech curve.
Q & AThe End of Dinosaurs
happened because of [a] Meteor
See you @Meteor Devshop on 6th Nov
meetup.com/Meteor-Iasi
kadira.io
Telescope
https://meteorhacks.com/profiling-a-meteor-app-telescope.html