Javascript Development Environment

Package managers available:

1. CPAN
2. GoDoc
3. Maven Central
4. npm (node)
5. nuget (.NET)
6. Packagist (PHP)
7. PyPI
8. Rubygems.org

Electron or  Nw.js
Electron enables you to create desktop applications with pure JavaScript by providing a runtime with rich native (operating system) APIs. You could see it as a variant of the Node.js runtime that is focused on desktop applications instead of web servers.

This doesn't mean Electron is a JavaScript binding to graphical user interface (GUI) libraries. Instead, Electron uses web pages as its GUI, so you could also see it as a minimal Chromium browser, controlled by JavaScript.

EmberJs
Ember.js is an open-source JavaScript web framework, based on the Model–view–viewmodel (MVVM) pattern. It allows developers to create scalable single-page web applications by incorporating common idioms and best practices into the framework.

Starter kit of JS:
1. Package Management
2. Bundling
3. Minification
4. Sourcemaps
5. Transpiling
6. Dynamic HTML generation
7. Centralized HTTP request
8. Mock API framework
9. Component Libraries
10. Development webserver
11. Linting
12. Automated testing
13. Continous Integration
14. Automated Build

Javascript Editor:
1. VS code
2. Atom
3. WebStorm
4. Brackets

Package Manager
1. Bower
2. npm
3. Jam
4. volo
5. jspm

Webserver:
1. http-server
2. live-server
3. express
4. budo
5. webpack
6. Browsersynch

Sharing WIP using webservices
1. localtunnel
2. ngrok
3. Surge
4. now

Automation
1. Gulp
2. Grunt
3. NPM scripts

Transpiling:
1. Babel
2. TypeScript
3. ELM

Bundling
1. Browserify
2. webpack
3. Rollup
4. JSPM

Linting the code
1. JSLint
2. JSHint
3. ESLint

Unit Testing
1. Mocha
2. Jasmine
3. Tape
4. Qunit
5. AVA
6. Jest
7. NodeUnit

Continous Integration
1. Travis
2. Appveyor
3. Jenkins
4. CircleCI
5. Semaphore
6. SnapCI

HTTPCall Approaches:
1. Node
2. Jquery fetch
3. isomorphic fetch
4. Superagent
5. xhr
6. Axios

Cloud Hosts
1. AWS
2. Google
3. Azure
4. Heroku
5. Firebase
6. Pubstorm



NVM : Node Version Manager allows to keep multiple versions of NodeJS

Refer:
http://dev.topheman.com/install-nvm-with-homebrew-to-use-multiple-versions-of-node-and-iojs-easily/

NSP (Node Security Package) :  To scan all dependencies for vulnerabilities.

npm install nsp


What is Transpiling:
Transpilers, or source-to-source compilers, are tools that read source code written in one programming language, and produce the equivalent code in another language. Languages you write that transpile to JavaScript are often called compile-to-JSlanguages, and are said to target JavaScript

There are literally 100 languages that compile down to JS today.
To Transpile JS there are two popular which standout today are :
1. Babel
2. TpeScript
3. ELM

Bundling: is a feature that combines (bundles) multiple files into one.



 Module Format: 5 common module formats available are:

1. IIFE
2. AMD (Asynchronous Module Definition)
3. CommonJS (CJS)
4. Universal Module Definition
5. ES6 Modules

Bundling options:
1. Browersify
2. webpack
3. Rollup
4. JSPM


Linting: is the process of running a program that will analyse code for potential errors

Unit Testing in JS:

1. Chose the Framework
2. Assertion Library
3. Helper Lib
4. Where to run tests
5. where to place tests
6. When to run tests


Testing Frameworks:
1. Mocha - Most popular
2. Jasmine
3. Tape
4. Qunit
5. AVA
6. Jest from Facebook

Assertion Library: Some frameworks come with inbuilt Assertions but frameworks like Mocha doesn't.
1. Chai
2. Should

Helper Library
1. JS DOM
2. Cheerio (for server side Jquery)
3.



 Where to run tests

Browser - Karma, Testem
Headless Browser - Phantom JS
In memory DOM - JSDOM

Where to Place Tests:
There are two approaches:
1. Centralised - Keep  a test folder and all tests files under this
2. Alongside - Keeping a test file for each file

Alongside is most recommended approach to keep the unit test files as it is convenient and clear visibility, no recreating of folder structure, easy file moves



When to run tests:
Everytime we hit save


















Comments

Popular posts from this blog

Interesting Facts about MVC framework`

AngularJS - Experiencing new era

ReactJS