Skip to content

This document is a personal note space, driven by my own research and preferences, about full-stack development with Node.js.

Notifications You must be signed in to change notification settings

cdokolas/node-dev-notes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 

Repository files navigation

Node.js development notes

Introduction

This document is a personal note space, driven by my own research and preferences, about full-stack development with Node.js.

My aim is to distill current and cutting-edge frameworks, tools and practices that I want to keep track of, investigate or use in Node.js projects. These involve items in the following general categories:

  • Coding (IDEs, formatting, organization, documentation, frameworks/libraries, version control, etc.)
  • Testing (unit, load, API, coverage)
  • Security
  • Deployment (configuration, load balancing, automation, monitoring/logging, etc.)

Currently, this is mostly server-oriented.

Coding

Project/Source management and Code review

Code style/analysis

  • editorconfig and atom module for consistent code style on the IDE This keeps preferred formatting styles in a .editorconfig project-local file and very vcs-friendly!
  • atom-beautify (conflicts with editorconfig?) This works very well, but I have to look into: unifying formatting conventions with ESLint and possibly keeping settings in a project-local config file.
  • markdown-preview and markdown-preview-plus for previewing markdown documents (Not sure of proper "github-flavored" formatting; Brackets seems to better handle this with paragraphs inside lists being properly rendered AFAICT.)
  • ESLint (static analysis, lint) (with airbnb rules) I think this may be the most important component for writing clean ES6 code.
  • Flow (static type checker) Looks interesting
  • JSHint (static analysis)
  • complexity-report (?)

Documentation

  • Javascript code documentation with JSDoc (anything else available?)

Frameworks/Libraries

Full-stack

  • MERN MongoDB-Express-React-NodeJS (+Redux+WebPack)
  • Meteor

Server

Express

I like the Express framework, a "fast, unopinionated, minimalist web framework for Node.js".

With that, there are a few options that can be selected...

Templating engines for Express

  • Handlebars

    Handlebars is like Mustache but with limited logic added, which gives you the ability to handle simple cases where you would otherwise need to generate extra data to feed the template with.

  • Jade

    Jade is the classic templating engine for Express. It's a little weird and some features can be confusing. Also, it's not friendly to classic HTML developers as the syntax is not much like HTML.

  • Mustache/Hogan

  • React (with express-react-views). More about React below.

  • EJS (a simple templating engine)

Sources:

Meteor

"a large, opinionated Node.js framework"

Client (Web Browser)

Frontend tools (for development)

Also read:

Web Components (and related stuff)

I'm now mainly on the pro-Vue camp for the sole reason that Vue is highly regarded and is considered a much simpler solution than React.

I was previously on the pro-React camp for the following reasons:

  • JSX is better (being JS-with-HTML instead of the other way around, or separating them needlessly)
  • Server-side pre-render gives isomorphic apps
  • Cleaner HTML (HTML is HTML!)
  • ...?

With React, one should use:

  • Flux as an architecture
  • react-router for routing
  • Redux to control state transitions (a Flux implementation?)

Interesting reads from the front lines:

Important: There seems to be a proliferation of new, interesting frameworks trending:

  • vue.js is a contender for the 1st place in front-end frameworks and, AFAICT, tries to fill in the gap between functionality and ease-of-use in React
  • Polymer by Google

ORM - data access

  • loopback-datasource-juggler, part of the LoopBack tools ("An ORM/ODM that provides a common set of interfaces for interacting with databases, REST APIs, and other types of data sources.")
  • sails.js ? (rant by Kavin Burke here)

The Loopback stack (libraries) looks pretty good; a bit better than sails.js. I wonder if it is modular enough to get cherry-picked... a serving of ORM for starters and we'll see what else combines well with the rest.

Some more info:

GraphQL

Data Visualization (Graphs)

  • D3 (how well does it integrate with React?)

i18n

Testing

Security

Deployment

Configuration

Node.js process management


Base setup (with atom)

Notes on setting-up a development environment with Atom

Initial Atom setup

General

  • add package "atom-beautify"

linter

  • add package "linter"
  • add package "linter-eslint"

react

  • add package "react"

For each project

linter setup

  • eslint with airbnb rules (no react)

    npm i --save-dev eslint-config-airbnb-base eslint-plugin-import eslint
    

    add "extends": "airbnb-base" to .eslintrc

  • eslint with airbnb rules (with react)

    npm i --save-dev eslint-config-airbnb eslint-plugin-import eslint-plugin-react eslint-plugin-jsx-a11y eslint
    

    add "extends": "airbnb" to .eslintrc and "react" to plugins array


Sources

About

This document is a personal note space, driven by my own research and preferences, about full-stack development with Node.js.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published