github.com/Slava
I am a Core Developer at Meteor, company building a new open-source, all JavaScript full-stack framework.
Find more about Meteor on https://meteor.com
Meteor allows you to build modern web and mobile apps fast and easy.
Instant response
Reactive UI
Fast Load Time
Mobile Support
Real-time data sync
Client-Server RPCs
Isomorphic JS
Declarative Structured Templates
Repeatable Builds
Introduction to Meteor
by Emily Stark
or https://meteor.com
Typeahead.js
React.js
Spark.js
Calendar JQuery
DataTables JQuery
D3.js or Chart.js
State of one component can affect another component
(made up example diagram)
Tracker.autorun(function () {
// do stuff!
});
var city = new ReactiveVar("San Francisco");
// Prints the message about San Francisco
Tracker.autorun(function () {
console.log( "Broadcasting from " + city.get() );
});
// Triggers autorun to rerun and print the new message
city.set("Singapore");
Any code wrapped into Tracker becomes reactive
var city = new ReactiveVar("London");
var secret = new ReactiveVar(true);
Tracker.autorun(function () {
if (secret.get())
console.log("It is a secret!");
else
console.log("The city is " + city.get());
});
Smart dependency tracking
Dead code block
Tracker is smart enough to understand that as long as "secret" doesn't change, changes to "city" won't matter
angular.module('scopeExample', [])
.controller('MyController', ['$scope', function($scope) {
$scope.firstName = 'Thomas';
$scope.lastName = 'Anderson';
$scope.sayHello = function() {
$scope.greeting = 'Hello ' + $scope.firstName + ' ' + $scope.lastName + '!';
};
}]);
App.Person = Ember.Object.extend({
firstName: null,
lastName: null,
fullName: function() {
return this.get('firstName') + ' ' + this.get('lastName');
}.property('firstName', 'lastName')
});
Chart.js
.update()
Video.js
.currentTime()
d3.js
.data()
fullcalendar
.gotoDate()
clicks/selections
clicks/selections
hover
playback, jumps
Typeahead.js
React.js
Spark.js
Calendar JQuery
DataTables JQuery
D3.js or Chart.js
React.js component
manual DOM manip.
charting library
var date = currentDate.get();
document.getElementById("day").innerText =
daysOfWeek[date.getDay()];
document.getElementById("forecast").innerText =
temperatures.get(date.getDay());
React.render(
React.createElement(OrderedList, {data: temperatures.toArray()}),
document.getElementById("react-mount"));
if (! temperatureChart)
temperatureChart = new Chart(ctx).Line(data);
else {
for (var i = 0; i < temperatures.length(); i++)
temperatureChart.datasets[0].points[i].value =
temperatures.get(i);
temperatureChart.update();
}
Tracker is a small library for deps tracking
Can glue things together pretty easily
Is smart enough to keep you lazy but not to do all the work for you
Meteor's reactive templating library Blaze uses Tracker under the hood implicitly.
This allows Blaze to track fine-grained changes and make minimal DOM updates to sync up the page.
<div class="friendList">
<ul>
{{#each friends}}
<li class="{{selected}}">
{{firstName}} {{lastName}}
</li>
{{/each}}
</ul>
</div>