Skip to content

Using Javascript

JungSu Kim edited this page Feb 3, 2016 · 1 revision

Reference

개발노트

  • 다양한 모듈이 존재하는건 좋지만 어떤 모듈이 우리의 프로젝트에 가장 적합한지는 직접 찾아야 함
    • 특히 같은 기능을 하는데 좀 더 편하게 사용할 수 있는 모듈을 사용하자
    • dependencies express express-validator passport passport-http-bearer async protobufjs helmet lodash mysql redis socket.io winston
    • testing mocha supertest assert
    • profiler memwatch-next heapdump dtrace stackvis strong-cpu-profiler chrome-cpu-profiler dtrace-provider lynx async-profile
  • 비동기 동작 흐름에 적응하자
    • 모든 함수나 로직은 되도록 비동기로 작성해야 성능의 이점을 얻을 수 있음
  • 콜백 헬을 제어할 수 있는 방법은 꼭 익혀두자
    • 콜백이 중첩되어 많아지게되면 코드보기도 힘듬
    • Promise, Async, Generator의 개념을 이해
  • 최신 스펙내용에 귀기울이자
    • ES6 표준에 제정된 스펙 및 ES7에 추가될 스펙 내용 확인
  • 디버깅 기술을 익히자
    • 코드 및 동작은 리눅스에서 작업하고 디버깅은 Visual Studio를 사용하는 방법도 좋음
    • node의 debugger는 최악이지만 Visual Studio 디버깅기능은 좋음
    • Visual Studio Remote Debugging 기능도 익혀두면 좋음
    • PORT=9000 node --debug= bin/www

  • 웹 프레임워크의 구조를 이해하자
    • Express의 미들웨어 이해
  • node.js 프레임워크 구조를 이해하자
    • node/V8/libuv
  • 최적의 배포방법을 고민하자
    • PM2 모듈
    • PM2 대시보드
  • 프로파일링 방법을 고민하자
    • CPU snapshot
    • Heap snapshot
    • 크롬의 도구더보기의 Profile으로 V8엔진의 snapshot 정보를 확인할 수 있음

Features

  • V8 Javascript Engine
  • Event Driven
  • npm echo system

Development Process

* Application Structure * Project Structure
  • Monitoring
    • PM2
    • New Reric

Flow control in Javascript

Development Tools

Framework

  • StrongLoop LoopBack
  • Pomelo
  • Express 4.X

Development Libraries

Useful

Clone this wiki locally