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

The JavaScript Software Factory

The JavaScript Software Factory

A talk I gave at ForwardJS March 1, 2017.

Chris Castle

March 01, 2017
Tweet

More Decks by Chris Castle

Other Decks in Programming

Transcript

  1. The JavaScript
    SOFTWARE FACTORY
    ForwardJS
    March 1, 2017
    Image: Jackson Jost

    View full-size slide

  2. Chris Castle
    Developer Advocate
    @crc
    Image: Ferdinand Stöhr

    View full-size slide

  3. THUNDER SNOW

    View full-size slide

  4. Image: Kalle K

    View full-size slide

  5. Programming is easy.
    Software development is
    hard.
    Image: Vladimir Chuchadeev

    View full-size slide

  6. Programming is easy.
    Image: Vladimir Chuchadeev

    View full-size slide

  7. Software development is
    hard.
    Image: Vladimir Chuchadeev

    View full-size slide

  8. You want to know what
    makes it even harder?
    Image: Markus Spiske

    View full-size slide

  9. Fools ignore complexity.
    Pragmatists suffer it.
    Geniuses remove it.
    - Alan Perlis

    View full-size slide

  10. Simplicity is a great
    virtue but it requires hard
    work to achieve it and
    education to appreciate it.
    - E.W. Dijkstra

    View full-size slide

  11. SOME
    SIMPLIFYING
    TIPS

    View full-size slide

  12. Stop spending time
    on the bottom two
    layers.

    View full-size slide

  13. No global modules

    View full-size slide

  14. 1 {
    2 "name": "js-software-factory-samples",
    3 "version": "1.0.0",
    4 "description": "Sample codez!",
    5 "main": "index.js",
    6 "author": "Chris Castle",
    7 "license": "MIT",
    8 "dependencies": {
    9 "left-pad": "^1.1.3"
    10 },
    11 "devDependencies": {
    12 "gulp": "^3.9.1"
    13 }
    14 }

    View full-size slide

  15. The Twelve-Factor App

    View full-size slide

  16. https://12factor.net

    View full-size slide

  17. - Predictability
    - Security
    - Performance

    View full-size slide

  18. Deploy a lot

    View full-size slide

  19. Make testing
    automatic

    View full-size slide

  20. winston
    bunyan
    log4js
    morgan

    View full-size slide

  21. 1 const debug = require('debug')('http')
    2 const http = require('http')
    3
    4 http.createServer((req, res) => {
    5 debug(`${req.method} ${req.url}`)
    6 res.end('hello\n')
    7 }).listen(3000, () => {
    8 debug('listening');
    9 })

    View full-size slide

  22. no debug output

    View full-size slide

  23. debug output

    View full-size slide

  24. Thank you
    Image: SpaceX

    View full-size slide