web development with node.js
TRANSCRIPT
Web Development with Node.jsFrom simple to scalable
OverviewWeb fundamentals
Architecture
DOM
Introduction to JavaScriptHistory
ECMAScript 5
ES2015 (ES6)
Babel
Quirks
Overview (cont)Introduction to Node.js
History
Node API
NPM
Quick Introduction to Git and Github
Hands-on exercisesSimple Web Server (Hello, World!)
Data Driven App (CRM)
ScalabilitySystem Architecture
Test, Standardize, and Monitor
Questions?
Who am I?
Lead Developer - Information Technology Solutions Center
Senior - Information Technology: Software Development track
Originally from Columbus, OH
Developing web applications with Node.js since 2013
Web Fundamentals - Architecture
Web Fundamentals
1.Enter URL in address bar
2.If not cached, URL will be resolved to an IP address using a Domain Name System (DNS)
3.Web server receives and handles request
4.Web server responds with payload (HTML, CSS, JS, images, etc.)
5.Browser receives request and renders response
Web Fundamentals - DOM
Document Object Model
A way of representing the HTML
Tree structure
Accessible via a JavaScript API
Can be easily manipulated
Web Fundamentals - DOM
Introduction to JavaScript - History
Brendan Eich - May 23, 1995
Netscape
Developed in 10 days
Mocha - LiveScript - JavaScript
European Computer Manufacturers Association (ECMA)
Introduction to JavaScript - History
Submitted for standardization - November 1996
1st Edition - June 1997
2nd Edition - June 1998
3rd Edition - December 1999
4th Edition - Abandoned
5th Edition - December 2009
6th Edition - June 2015 - Current Standard
7th Edition - In Development
Introduction to JavaScript - History
Stage 0 - Strawman
Stage 1 - Proposal
Stage 2 - Draft
Stage 3 - Candidate
Stage 4 - Finished
Introduction to JavaScript - ECMAScript 5
Dynamically typed
Prototype-based
Functions are first class citizens
Event loop
Single threaded
Asynchronous
Concurrent
Introduction to JavaScript - ECMAScript 5
Number
String
Boolean
Symbol (New in the 6th Edition)
Object (Function, Array, Date, RegExp)
null
Undefined
Introduction to JavaScript - ECMAScript 5
+
-
*
/
%
< and >
<= and >=
== and ===
Introduction to JavaScript - ECMAScript 5
if
else
else if
while
do-while
switch
Introduction to JavaScript - ES2015 (ES6)
Arrow function
Promises
Classes
Enhanced Object Literals
Template Strings
Destructuring
Default + Rest + Spread
Let + Const
Iterators + For..Of
Introduction to JavaScript - ES2015 (ES6)
Generators
Modules
Map + Set + WeakMap + WeakSet
Proxies
Symbols
Math + Number + String + Array + Object APIs
Binary and Octal Literals
Introduction to JavaScript - Babel
Transpiler + Polyfill
ES2015+
Transpile or require hook
JSX, TypeScript, and more
Introduction to JavaScript - Quirks
Implicit conversion
undefined and null
Normal equality (==)
Dot and Bracket notation
Introduction to Node.js - History
Netscape Enterprise Server - December 1995
Node.js - 2009 - Ryan Dahl
Joyent
Google’s V8 Engine
io.js fork - December 2014 - “The Great Split”
Node.js Foundation - June 2015
Node.js and io.js merge - September 2015
Introduction to Node.js - Node API
Cluster
Crypto
DNS
File System
HTTP/HTTPS
Modules
Net
Process
https://nodejs.org/docs/v4.4.2/api/
Introduction to Node.js - NPM
Built in 2009
npm, Inc - Founded in 2014
“The” package manager for Node.js
Command-line tool to install and publish packages
package.json
node_modules
Quick Introduction to Git and Github
Development began in April 2005
Distributed revision control system
Linus Torvalds
Github - Hosted git solution
Founded February 2008
Offers free and paid plans
Hands-on Exercises - Simple Web Server
Handle HTTP requests
Retrieve data from the request
Respond with HTML
Respond with JSON
Hands-on Exercises - Data Driven App
Serve rendered HTML
Interact with database (PostgreSQL)
Authentication
Add featuresSign up
Update customer information
Write test
Scalability - System Architecture
Linux
Nginx/HAProxy
pm2/Docker
DBaaS (Amazon RDS)
PaaS (Amazon Elastic Beanstalk)
Microservices
Messaging systems (RabbitMQ)
Scalability - Test, Standardize, and Monitor
Linters (ESLint, JSLint, JSHint, etc)
Code Analysis (Bithound, Codacy, etc)
Unit Testing (Mocha, Jest, etc)
Browser testing (Nightwatch.js, Protractor, etc)
Continuous Integration/Delivery (Jenkins, Travis-CI, Drone, etc)
Error Logging (Sentry, Airbrake, Rollbar, etc)
Application Monitoring (AppDynamics, New Relic, etc)
Questions?
Sources
https://developer.mozilla.org/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScript
https://en.wikipedia.org/wiki/JavaScript#History
http://www.2ality.com/2015/11/tc39-process.html
https://github.com/lukehoban/es6features
https://en.wikipedia.org/wiki/Node.js#History
https://en.wikipedia.org/wiki/Git_(software)