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

Backend War: JavaScript

Backend War: JavaScript

Rizki Romadhoni

November 26, 2017
Tweet

More Decks by Rizki Romadhoni

Other Decks in Programming

Transcript

  1. History 1993, Beginnings at Netscape 1995, Server-side JavaScript 1996, ECMA

    Standardization 2008 and 2009, The JavaScript Engine Race 2009, Ryan Dahl’s V8 + Event Loop + I/O API = Node.js Formula
  2. JavaScript: The Good Side Features ➔ Cross Platform ➔ Cross

    Environment ➔ Web Assembly ➔ Non-blocking IO Package Manager ➔ Registry ➔ npm-cli ➔ yarn Performance ➔ Evolution of JavaScript
  3. JavaScript: The Good Side #2 Developer Experience ➔ Community Driven

    ➔ Fearless Coding: Static Analysis ➔ Yarn: Fast, Reliable, and Secure Dependency Management. Developer Experience #2 ➔ Transpilers: Evolution Conveyor in Presets ➔ Debugging: V8 Inspector Integration ➔ Javascript Everywhere: Boost Productivity
  4. Features Cross Platform Supported Platforms by Available Installer: ➔ Windows

    Installer (.msi) ➔ Windows Binary (.zip) ➔ macOS Installer (.pkg) ➔ macOS Binaries (.tar.gz) ➔ Linux Binaries (x86/x64) ➔ Linux Binaries (ARM) ➔ More.. Cross Environment Available Runtime: ➔ Modern Browsers ➔ Node.js
  5. Features #2 Non-blocking IO Yes, JavaScript is single-threaded. CPU is

    fast, but not with network, storage and database — I/O typical tasks. Let’s do the I/O thing, and wait for it to complete by doing something else. Like a us, human. Let the rice cooker tell us when the rice is ready to eat. While we watch Mr. Robot. Web Assembly (wasm) A typical healthy Node.js server application is I/O bound. So, move any cpu-bound tasks closer to the bare metal, such as cryptography. You can reuse it on the web browsers soon tho. Languages with wasm as a target: ➔ C ➔ C++ ➔ Rust
  6. Package Manager Registry The npm registry hosts almost half a

    million packages of free, reusable code — the largest software registry in the world. The official public npm registry is at https://registry.npmjs.org/. It is powered by a CouchDB database, of which there is a public mirror at https://skimdb.npmjs.com/registry. Clients Npm-cli: The Official Node Package Manager. Yarn: Fast, Reliable, and Secure Dependency Management.
  7. Evolution of JavaScript Performance Performance race is actually done by

    browser vendors. The need of faster web browser has significantly increased the performance of JavaScript itself. Chrome with V8, Mozilla with SpiderMonkey, Apple with Nitro, etc. Watch the race. Browser X Browser Y 20XX 20 5 15 20XX 29 4 25 20XX 39 4 35 20XX 27 5 22
  8. Developer Experience Fearless Coding: Static Analysis Flow: A Static Type

    Checker For JavaScript. Code faster, code smarter, code confidently, code bigger. Fearless Coding: Static Analysis #2 ESLint: The pluggable linting utility for JavaScript and JSX Used to find problematic patterns or code that doesn’t adhere to certain style guidelines
  9. Make it hard to write bad codes, being less stupid

    is better than trying to be very intelligent
  10. Developer Experience #2 Yarn: Fast, Reliable, and Secure Dependency Management.

    Ultra Fast, Mega Secure, Super Reliable. Features: ➔ Offline Mode ➔ Deterministic ➔ Network Performance ➔ Flat Mode ➔ Network Resilience ➔ Same Packages Transpilers: Evolution Conveyor in Presets Babel: The JavaScript Compiler Babel has support for the latest version of JavaScript through syntax transformers. These plugins allow you to use new syntax, right now without waiting for browser support. Check out env preset to get started.
  11. Developer Experience #3 Debugging: V8 Inspector Integration V8 Inspector integration

    allows attaching Chrome DevTools to Node.js instances for debugging and profiling. It uses the Chrome Debugging Protocol. JavaScript Everywhere: Boost Productivity Single language development is a CTO’s holy grail. Gone are the days of paying four teams to build the same thing in different languages. Here are the days of hyper-efficient dev where business logic is implemented once, then shared everywhere. Thanks to React Native, Electron, Node.js
  12. JavaScript within Companies • Node.js Helps NASA Keep Astronauts Safe

    and Data Accessible • Walmart Strives to Be an Online Retail Leader with Node.js • Node.js Drives Major Scale and Reliability at Uber • More..
  13. My Team Your Name, Data Scientist Rizki Romadhoni, Software Engineer

    Your Name, Front-end Engineer Your Name, Back-end Engineer Iya kamu.. ( ๑˃̵ᴗ˂̵ ) و Join me at https://careers.salestock.io/