Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Kickstarter Your Node.JS Application

Kickstarter Your Node.JS Application

How to start and developement your Node.JS Apps with Express.JS, Mongoose and GruntJS

Hengki Sihombing

December 03, 2014
Tweet

Other Decks in Technology

Transcript

  1. { name : “Hengki Sihombing” email : “[email protected]”, twitter :

    “hengkiardo”, github : “aredo” } module.export =
  2. 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/ • 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
  3. 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
  4. • 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!! https://github.com/jaredhanson/passport
  5. Promises Promises… Promises… Never break your promises. Personally, never make

    promises. https://blog.domenic.me/youre-missing-the-point-of-promises
  6. Not part of the Node “until latest stable version” Makes

    integration more difficult. Makes swapping code in / out more painful. So good it’s got it’s own website callbackhell.com Callbacks
  7. async $ npm install async — save 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. https://github.com/caolan/async
  8. Why use a task runner or build system? another build

    tools: Gulp, Make, NPM, Ant, Maven
  9. QA! { name : “Hengki Sihombing” email : “[email protected]”, twitter

    : “hengkiardo”, github : “aredo” } module.export =