SlideShare a Scribd company logo
TodoAppwith Meteor
» Long Nguyen
» @vangnol
Whatis Meteor?
Meteor is a framework for building incredible web
application. Meteor helps you build complex web
application but in minimal amount of time. It's full-
stack framework. On the server it runs on Nodejs,
which means Meteor written in Javascript. Meteor has
out of the box integration with MongoDB database.
Meteor uses DDP Protocal to communicate between
client and server.
Setup
» MacOS or Ubuntu
curl https://install.meteor.com/ | sh
» Windows
Go get a Mac or a Ubuntu laptop
Demo
Simple Todo App with Meteor
♡♡♡
task.html
<head>
<title>Simple Todo App</title>
</head>
<body>
<h1>Awesome Todo App</h1>
<hr/>
<div class="container">
{{> CreateTask}}
{{> ListTasks}}
{{> CompleteCounter}}
</div>
</body>
<template name="ListTasks">
<ul>
{{#each tasks}}
<li class="task {{doneClass}}">{{> Task}}</li>
{{/each}}
</ul>
</template>
<template name="Task">
<input type="checkbox" name="is_done" {{isDoneChecked}} />
{{subject}}
</template>
<template name="CreateTask">
<form class="create-task" >
<input type="text" placeholder="Creating new task...!" />
</form>
</template>
<template name="CompleteCounter">
<h3>{{completeTask}} / {{totalTasks}} tasks completed</h3>
</template>
task.css
.task{
font-size: 20px;
background-color: #EBEBEB;
padding: 10px;
margin-bottom: 2px;
}
.done{
text-decoration: line-through;
}
task.js
Todos = new Meteor.Collection('todos');
if(Meteor.isClient){
Template.ListTasks.helpers({
tasks: function(){
return Todos.find();
},
doneClass: function(){
return this.is_done ? 'done' : '';
}
});
Template.Task.helpers({
isDoneChecked: function(){
return this.is_done ? 'checked' : ''
}
});
Template.Task.events({
"click [name=is_done]": function(e, tmpl){
var id = this._id;
var isDone = tmpl.find('input').checked;
Todos.update({_id: id}, {$set: { is_done: isDone}});
}
});
Template.CreateTask.events({
'submit form': function(e, tmpl){
e.preventDefault();
var subject = tmpl.find('input').value;
Todos.insert({subject: subject, created_at: new Date, is_done: false});
var form = tmpl.find('form');
form.reset();
}
});
}
Template.CompleteCounter.helpers({
completeTask: function(){
return Todos.find({is_done: true}).count();
},
totalTasks: function(){
return Todos.find({}).count();
}
});
}
if(Meteor.isServer){
}
References
» MeteorHacks
» Best Learning Resources
» Meteor Packages
» Why Meteor will kill Ruby on Rails
» Meteor Won’t Kill Rails Anytime Soon
» How to Learn JavaScript Properly
Thankyou!

More Related Content

PPT
Starting with Reactjs
PPTX
Introduction to ReactJs & fundamentals
PPTX
W3C Web Performance - A detailed overview
PDF
Breaking the Server-Client Divide with Node.js and React
PPTX
Building high-performance web applications with Preact
PPTX
ReactJS.NET - Fast and Scalable Single Page Applications
PPTX
React for .net developers
DOCX
Train screens
Starting with Reactjs
Introduction to ReactJs & fundamentals
W3C Web Performance - A detailed overview
Breaking the Server-Client Divide with Node.js and React
Building high-performance web applications with Preact
ReactJS.NET - Fast and Scalable Single Page Applications
React for .net developers
Train screens

What's hot (20)

PDF
Robust web apps with React.js
PDF
Getting started with node JS
PPTX
Meteor Day Athens (2014-11-07)
PPTX
Gatling
PDF
Qtp Tutorial 4 Recording Of Tests In Qtp With Drag And Drop Web Elements
PPT
IBM and Node.js - Old Doge, New Tricks
PDF
Introduction to ReactJS
PDF
Web Development with NodeJS
PDF
React JS - Introduction
PPTX
007. Redux middlewares
PPTX
JavaScript innovaties: ECMAScript 6 & 7
PDF
Brad wood - Integrating MVC Into Legacy [Into The Box 2020]
PDF
Building time machine with .net core
PDF
Introduction to ReactJS
PDF
Introduction to ReactJS
PPTX
React, Flux and more (p1)
PPTX
Enterprise level application in 5 min
PDF
Wicket Live on Stage
PDF
JavaScript Roadmap - DOM Manipulation
Robust web apps with React.js
Getting started with node JS
Meteor Day Athens (2014-11-07)
Gatling
Qtp Tutorial 4 Recording Of Tests In Qtp With Drag And Drop Web Elements
IBM and Node.js - Old Doge, New Tricks
Introduction to ReactJS
Web Development with NodeJS
React JS - Introduction
007. Redux middlewares
JavaScript innovaties: ECMAScript 6 & 7
Brad wood - Integrating MVC Into Legacy [Into The Box 2020]
Building time machine with .net core
Introduction to ReactJS
Introduction to ReactJS
React, Flux and more (p1)
Enterprise level application in 5 min
Wicket Live on Stage
JavaScript Roadmap - DOM Manipulation
Ad

Viewers also liked (20)

PDF
AWS Summit Berlin 2013 - Keynote - 6wunderkinder
PPT
Nano Goals App
PDF
Bibstrip Wunderlist - lijstjes maken
PPTX
Project
PDF
Engineering Wunderlist for Android - Ceasr Valiente, 6Wunderkinder
PPT
Myriam al dhaheri 201017821 - wunderlist – helps you manage your daily list...
PPTX
To Do List Karma - Life style gamification - Manu Melwin Joy
PPTX
Todoist iPhone App - Onboarding Roast
PDF
Todoist Logo Design Process
PPTX
How To Grow Your SMS Marketing Database
PDF
Empower Customer Engagement with Mobile Context
PDF
Mobile Means Business
PDF
The Mobile Content Mandate
PDF
The Do's and Dont's of Stellar Push and In-App Messaging: September 2014 Webinar
PDF
Create and Convert Mobile Moments of Truth
PDF
Social Action Mobile Marketing
PDF
Mobile Metrics 101: Everything web marketers need to know about app analytics
PPTX
Computers
PDF
Selling The Mobile Web
PDF
Apresentação Nova D9 Clube nova marco 2017 equipe Associação Unitel
AWS Summit Berlin 2013 - Keynote - 6wunderkinder
Nano Goals App
Bibstrip Wunderlist - lijstjes maken
Project
Engineering Wunderlist for Android - Ceasr Valiente, 6Wunderkinder
Myriam al dhaheri 201017821 - wunderlist – helps you manage your daily list...
To Do List Karma - Life style gamification - Manu Melwin Joy
Todoist iPhone App - Onboarding Roast
Todoist Logo Design Process
How To Grow Your SMS Marketing Database
Empower Customer Engagement with Mobile Context
Mobile Means Business
The Mobile Content Mandate
The Do's and Dont's of Stellar Push and In-App Messaging: September 2014 Webinar
Create and Convert Mobile Moments of Truth
Social Action Mobile Marketing
Mobile Metrics 101: Everything web marketers need to know about app analytics
Computers
Selling The Mobile Web
Apresentação Nova D9 Clube nova marco 2017 equipe Associação Unitel
Ad

Similar to Simple todo app with meteor (20)

ODP
code-camp-meteor
PDF
METEOR 101
PDF
Meteor.js Workshop by Dopravo
PPT
Rob Tweed :: Ajax and the Impact on Caché and Similar Technologies
PDF
Frontend microservices: architectures and solutions
PDF
Javascript MVVM with Vue.JS
PPTX
Meteor Day Talk
PDF
Beginning MEAN Stack
PDF
Full Stack React Workshop [CSSC x GDSC]
PPT
State of modern web technologies: an introduction
PPT
Ta Javaserverside Eran Toch
PPTX
Test Automation for NoSQL Databases
PDF
Rest web service_with_spring_hateoas
PDF
Node JS Express: Steps to Create Restful Web App
PDF
AngularJS for Web and Mobile
PDF
CraftCamp for Students - Introduction to Meteor.js
PPTX
Full Stack_Reac web Development and Application
PPTX
Java Script - A New Look
PDF
How to Build ToDo App with Vue 3 + TypeScript
PPTX
Practical OData
code-camp-meteor
METEOR 101
Meteor.js Workshop by Dopravo
Rob Tweed :: Ajax and the Impact on Caché and Similar Technologies
Frontend microservices: architectures and solutions
Javascript MVVM with Vue.JS
Meteor Day Talk
Beginning MEAN Stack
Full Stack React Workshop [CSSC x GDSC]
State of modern web technologies: an introduction
Ta Javaserverside Eran Toch
Test Automation for NoSQL Databases
Rest web service_with_spring_hateoas
Node JS Express: Steps to Create Restful Web App
AngularJS for Web and Mobile
CraftCamp for Students - Introduction to Meteor.js
Full Stack_Reac web Development and Application
Java Script - A New Look
How to Build ToDo App with Vue 3 + TypeScript
Practical OData

Recently uploaded (20)

PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PPTX
Machine Learning_overview_presentation.pptx
PPT
Teaching material agriculture food technology
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Empathic Computing: Creating Shared Understanding
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Approach and Philosophy of On baking technology
PDF
Encapsulation theory and applications.pdf
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Machine learning based COVID-19 study performance prediction
PDF
A comparative analysis of optical character recognition models for extracting...
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Machine Learning_overview_presentation.pptx
Teaching material agriculture food technology
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Empathic Computing: Creating Shared Understanding
Programs and apps: productivity, graphics, security and other tools
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Approach and Philosophy of On baking technology
Encapsulation theory and applications.pdf
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Network Security Unit 5.pdf for BCA BBA.
Mobile App Security Testing_ A Comprehensive Guide.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
Machine learning based COVID-19 study performance prediction
A comparative analysis of optical character recognition models for extracting...
The AUB Centre for AI in Media Proposal.docx
Building Integrated photovoltaic BIPV_UPV.pdf

Simple todo app with meteor

  • 1. TodoAppwith Meteor » Long Nguyen » @vangnol
  • 2. Whatis Meteor? Meteor is a framework for building incredible web application. Meteor helps you build complex web application but in minimal amount of time. It's full- stack framework. On the server it runs on Nodejs, which means Meteor written in Javascript. Meteor has out of the box integration with MongoDB database. Meteor uses DDP Protocal to communicate between client and server.
  • 3. Setup » MacOS or Ubuntu curl https://install.meteor.com/ | sh » Windows Go get a Mac or a Ubuntu laptop
  • 4. Demo Simple Todo App with Meteor ♡♡♡
  • 5. task.html <head> <title>Simple Todo App</title> </head> <body> <h1>Awesome Todo App</h1> <hr/> <div class="container"> {{> CreateTask}} {{> ListTasks}} {{> CompleteCounter}} </div> </body> <template name="ListTasks"> <ul> {{#each tasks}} <li class="task {{doneClass}}">{{> Task}}</li> {{/each}} </ul> </template>
  • 6. <template name="Task"> <input type="checkbox" name="is_done" {{isDoneChecked}} /> {{subject}} </template> <template name="CreateTask"> <form class="create-task" > <input type="text" placeholder="Creating new task...!" /> </form> </template> <template name="CompleteCounter"> <h3>{{completeTask}} / {{totalTasks}} tasks completed</h3> </template>
  • 7. task.css .task{ font-size: 20px; background-color: #EBEBEB; padding: 10px; margin-bottom: 2px; } .done{ text-decoration: line-through; }
  • 8. task.js Todos = new Meteor.Collection('todos'); if(Meteor.isClient){ Template.ListTasks.helpers({ tasks: function(){ return Todos.find(); }, doneClass: function(){ return this.is_done ? 'done' : ''; } }); Template.Task.helpers({ isDoneChecked: function(){ return this.is_done ? 'checked' : '' } });
  • 9. Template.Task.events({ "click [name=is_done]": function(e, tmpl){ var id = this._id; var isDone = tmpl.find('input').checked; Todos.update({_id: id}, {$set: { is_done: isDone}}); } }); Template.CreateTask.events({ 'submit form': function(e, tmpl){ e.preventDefault(); var subject = tmpl.find('input').value; Todos.insert({subject: subject, created_at: new Date, is_done: false}); var form = tmpl.find('form'); form.reset(); } }); }
  • 10. Template.CompleteCounter.helpers({ completeTask: function(){ return Todos.find({is_done: true}).count(); }, totalTasks: function(){ return Todos.find({}).count(); } }); } if(Meteor.isServer){ }
  • 11. References » MeteorHacks » Best Learning Resources » Meteor Packages » Why Meteor will kill Ruby on Rails » Meteor Won’t Kill Rails Anytime Soon » How to Learn JavaScript Properly