Node Meetup 
Tuesday, December 2, 2014
$ whoiam
{ 
name : “Hengki Sihombing” 
email : “hengki.sihombing@gmail.com”, 
twitter : “hengkiardo”, 
github : “aredo” 
} 
module.export =
Kickstarter Your 
Node.JS Application 
http://blog.efvincent.com/wp-content/uploads/2011/06/Capture.png
require(‘express’) 
require(‘mongoose’) 
require(‘passport’) 
require(‘async’) 
require(‘grunt’) 
require(‘demo’) 
require(‘QA’)
Why Node.JS
Answer by your self 
Why you come to this meetup :)
Express.JS 
Fast, unopinionated, minimalist web framework for Node.js 
expressjs.com 
$ npm install express
MVC Framework base on 
Express.JS 
• KrakenJs http://locomotivejs.org/ 
• Locomotive.JS http://locomotivejs.org/ 
• Sails http://locomotivejs.org/ 
• Sleek.JS http://sleekjs.com/ 
• …… 
http://www.quora.com/Why-should-I-use-Express-when-developing-a-web-app-with-Node-js 
http://evanhahn.com/understanding-express/
Why Express.JS ??? 
• Express is a lightweight framework, meaning it does not make too many 
assumptions but gives you enough to avoid re-inventing the wheel. 
• Express is preferred because it adds dead simple routing and support for 
Connect middleware, allowing many extensions and useful features 
• Like any abstraction, Express hides difficult bits and says "don't worry, you 
don't need to understand this part". It does things for you so that you don't 
have to bother. In other words, it's magic 
• https://www.google.com/#q=why+express.js 
http://www.quora.com/Why-should-I-use-Express-when-developing-a-web-app-with-Node-js 
http://evanhahn.com/understanding-express/
Simple Express App
Why Mongoose ? 
• Because it provides easy-to-use methods for interacting with MongoDB. It 
is ORM, actually. It helps you forget about driver's query documentation, 
and focus on your models. 
• Mongoose provides a straight-forward, schema-based solution to modeling 
your application data and includes built-in type casting, validation, query 
building, business logic hooks and more, out of the box. 
• Mongoose provides various functionalities which makes your life easy such 
as
MongoDB Connection with 
Mongoose
https://github.com/jaredhanson/passport 
• 140+ authentication strategies 
• Easily handle success and failure 
• Supports persistent sessions 
• Dynamic scope and permissions 
• Pick and choose required strategies 
• Implement custom strategies 
• Lightweight code base 
•Easy To Use!!
Sample Twitter Auth with Passport
Sample FB Auth with Passport
Sample Linkedin Auth with Passport
Because Javascript 
ASYNCHRONOUS
Promises 
Promises… Promises… Never break your promises. 
Personally, never make promises. 
https://blog.domenic.me/youre-missing-the-point-of-promises

Not part of the Node 
“until latest stable version” 
Makes integration more difficult. 
Makes swapping code in / out more painful. 
Callbacks 
So good it’s got it’s own website callbackhell.com
async 
https://github.com/caolan/async 
Async is a utility module which provides straight-forward, 
powerful functions for working with 
asynchronous JavaScript. Although originally 
designed for use with Node.js, it can also be 
used directly in the browser. 
$ npm install async — save
Node.JS Workshop
Node.JS Workshop
Node.JS Workshop
another build tools: Gulp, Make, NPM, Ant, Maven 
Why use a task runner 
or 
build system?
Automation
Automation isn’t about being 
lazy. 
It’s about being efficient
Node.JS Workshop
Node.JS Workshop
Node.JS Workshop
Before you get started 
$ npm install -g grunt-cli 
$ npm install —save-dev grunt
package.json to manage dependencies
Grunt Overview
Demo 
https://express4-bootstrap-starter.herokuapp.com/ 
https://github.com/aredo/express4-bootstrap-starter 
$ git clone git@github.com:aredo/express4-bootstrap-starter.git
QA! 
{ 
name : “Hengki Sihombing” 
email : “hengki.sihombing@gmail.com”, 
twitter : “hengkiardo”, 
github : “aredo” 
} 
module.export =

More Related Content

PDF
12-2015-Meetup
PDF
Kickstarter Your Node.JS Application
PDF
WordPress security & sanitation for beginners
PDF
Learning through gaming
PDF
Front end workflow with yeoman
PDF
Going Node.js at Netflix
PDF
Introduction to Web Development Career
KEY
SlickGrid Touch: Making complex JavaScript widgets work on mobile devices
12-2015-Meetup
Kickstarter Your Node.JS Application
WordPress security & sanitation for beginners
Learning through gaming
Front end workflow with yeoman
Going Node.js at Netflix
Introduction to Web Development Career
SlickGrid Touch: Making complex JavaScript widgets work on mobile devices

What's hot (20)

PDF
Websites for Hackers
PDF
Rapidly scaffold your frontend with yeoman
PPT
Building fast webapps, fast - Velocity 2010
PDF
Wulin kungfu final
PPTX
Automated perf optimization - jQuery Conference
PDF
Meebo performance ny_web_performance
PPT
High performance java script why everything youve been taught is wrong
PPTX
Basic web Deveopment
PDF
What Multisite can do for You - Anthony Cole - WordCamp Sydney 2012
PPTX
Web Front End Performance
PDF
WeBB MeetUp#1 Web applications caching techniques
PDF
5 Quick JavaScript Performance Improvement Tips
PDF
A team 43 C
PDF
Getting Started with Angular - Stormpath Webinar, January 2017
PPTX
Simplicity - develop modern web apps with tiny frameworks and tools
PDF
4 JavaScript Tools Every Designer Should Know About
PDF
Transforming Front-End Disaster Code™ Into A Maintainable Masterpiece
PDF
Staying Connected: Securing Your WordPress Website
KEY
New Perspectives on Performance
PDF
3 Gifts My Users Gave Me - Alexandra Draghici - WordCamp Europe 2017
Websites for Hackers
Rapidly scaffold your frontend with yeoman
Building fast webapps, fast - Velocity 2010
Wulin kungfu final
Automated perf optimization - jQuery Conference
Meebo performance ny_web_performance
High performance java script why everything youve been taught is wrong
Basic web Deveopment
What Multisite can do for You - Anthony Cole - WordCamp Sydney 2012
Web Front End Performance
WeBB MeetUp#1 Web applications caching techniques
5 Quick JavaScript Performance Improvement Tips
A team 43 C
Getting Started with Angular - Stormpath Webinar, January 2017
Simplicity - develop modern web apps with tiny frameworks and tools
4 JavaScript Tools Every Designer Should Know About
Transforming Front-End Disaster Code™ Into A Maintainable Masterpiece
Staying Connected: Securing Your WordPress Website
New Perspectives on Performance
3 Gifts My Users Gave Me - Alexandra Draghici - WordCamp Europe 2017
Ad

Similar to Node.JS Workshop (20)

PPTX
Intro To Node.js
PDF
Node azure
KEY
Practical Use of MongoDB for Node.js
PPTX
Introduction to node.js by jiban
PDF
Front End Development for Back End Developers - vJUG24 2017
PPTX
Single Page Application Development with backbone.js and Simple.Web
PPTX
Building a REST API Microservice for the DevNet API Scavenger Hunt
PPTX
AD113 Speed Up Your Applications w/ Nginx and PageSpeed
PDF
Complete MVC on NodeJS
PPTX
Meanstack overview
PDF
Front End Development for Back End Developers - Devoxx UK 2017
PPTX
Developing JavaScript Widgets
PPTX
Intro to node and mongodb 1
PDF
BackEnd-Roadmap.pdf
PDF
Develop & Deploy Node.js app on Windows Azure
KEY
Nodejs web,db,hosting
PDF
OWASP SF - Reviewing Modern JavaScript Applications
PPTX
PDF
General Assembly Workshop: Advanced JavaScript
PDF
WebAssemlby vs JavaScript
Intro To Node.js
Node azure
Practical Use of MongoDB for Node.js
Introduction to node.js by jiban
Front End Development for Back End Developers - vJUG24 2017
Single Page Application Development with backbone.js and Simple.Web
Building a REST API Microservice for the DevNet API Scavenger Hunt
AD113 Speed Up Your Applications w/ Nginx and PageSpeed
Complete MVC on NodeJS
Meanstack overview
Front End Development for Back End Developers - Devoxx UK 2017
Developing JavaScript Widgets
Intro to node and mongodb 1
BackEnd-Roadmap.pdf
Develop & Deploy Node.js app on Windows Azure
Nodejs web,db,hosting
OWASP SF - Reviewing Modern JavaScript Applications
General Assembly Workshop: Advanced JavaScript
WebAssemlby vs JavaScript
Ad

Node.JS Workshop

  • 1. Node Meetup Tuesday, December 2, 2014
  • 3. { name : “Hengki Sihombing” email : “hengki.sihombing@gmail.com”, twitter : “hengkiardo”, github : “aredo” } module.export =
  • 4. Kickstarter Your Node.JS Application http://blog.efvincent.com/wp-content/uploads/2011/06/Capture.png
  • 5. require(‘express’) require(‘mongoose’) require(‘passport’) require(‘async’) require(‘grunt’) require(‘demo’) require(‘QA’)
  • 7. Answer by your self Why you come to this meetup :)
  • 8. Express.JS Fast, unopinionated, minimalist web framework for Node.js expressjs.com $ npm install express
  • 9. MVC Framework base on Express.JS • KrakenJs http://locomotivejs.org/ • Locomotive.JS http://locomotivejs.org/ • Sails http://locomotivejs.org/ • Sleek.JS http://sleekjs.com/ • …… http://www.quora.com/Why-should-I-use-Express-when-developing-a-web-app-with-Node-js http://evanhahn.com/understanding-express/
  • 10. Why Express.JS ??? • Express is a lightweight framework, meaning it does not make too many assumptions but gives you enough to avoid re-inventing the wheel. • Express is preferred because it adds dead simple routing and support for Connect middleware, allowing many extensions and useful features • Like any abstraction, Express hides difficult bits and says "don't worry, you don't need to understand this part". It does things for you so that you don't have to bother. In other words, it's magic • https://www.google.com/#q=why+express.js http://www.quora.com/Why-should-I-use-Express-when-developing-a-web-app-with-Node-js http://evanhahn.com/understanding-express/
  • 12. Why Mongoose ? • Because it provides easy-to-use methods for interacting with MongoDB. It is ORM, actually. It helps you forget about driver's query documentation, and focus on your models. • Mongoose provides a straight-forward, schema-based solution to modeling your application data and includes built-in type casting, validation, query building, business logic hooks and more, out of the box. • Mongoose provides various functionalities which makes your life easy such as
  • 14. https://github.com/jaredhanson/passport • 140+ authentication strategies • Easily handle success and failure • Supports persistent sessions • Dynamic scope and permissions • Pick and choose required strategies • Implement custom strategies • Lightweight code base •Easy To Use!!
  • 15. Sample Twitter Auth with Passport
  • 16. Sample FB Auth with Passport
  • 17. Sample Linkedin Auth with Passport
  • 19. Promises Promises… Promises… Never break your promises. Personally, never make promises. https://blog.domenic.me/youre-missing-the-point-of-promises
  • 20.
  • 21. Not part of the Node “until latest stable version” Makes integration more difficult. Makes swapping code in / out more painful. Callbacks So good it’s got it’s own website callbackhell.com
  • 22. async https://github.com/caolan/async Async is a utility module which provides straight-forward, powerful functions for working with asynchronous JavaScript. Although originally designed for use with Node.js, it can also be used directly in the browser. $ npm install async — save
  • 26. another build tools: Gulp, Make, NPM, Ant, Maven Why use a task runner or build system?
  • 28. Automation isn’t about being lazy. It’s about being efficient
  • 32. Before you get started $ npm install -g grunt-cli $ npm install —save-dev grunt
  • 33. package.json to manage dependencies
  • 36. QA! { name : “Hengki Sihombing” email : “hengki.sihombing@gmail.com”, twitter : “hengkiardo”, github : “aredo” } module.export =