🗼 Table of Contents molily Mastodon

molily Mastodon

Robust Client-Side JavaScript

Download this book as EPUB (724 KB)

Table of Contents

  1. Introduction
    1. Characteristics of JavaScript
    2. The browser as a runtime environment
    3. JavaScript standards
  2. Achieving Robustness
    1. Graceful Degradation
    2. Progressive Enhancement
    3. Graceful Degradation vs. Progressive Enhancement
    4. Fault tolerance
    5. Postel’s Law
  3. How JavaScript might fail
    1. Web crawlers without JavaScript support
    2. Disabled JavaScript execution
    3. Network and loading errors
    4. Parsing errors
    5. Conflicting scripts
    6. Exceptions
    7. Reference errors
    8. Type errors
    9. Security errors
  4. How to prevent failure
    1. Failing fast
    2. Feature detection
    3. Types of checks
    4. Conditional statements and truthy values
    5. Existence checks
    6. Type checks with typeof
    7. Type checks with instanceof
    8. Duck typing
    9. Value checks
    10. Handling exceptions with try…catch
    11. Programmatic exceptions
    12. Encapsulated code
    13. The Strict Mode
    14. Promises
    15. Abstraction libraries
    16. Polyfills
    17. Linters
    18. The Babel compiler
    19. Languages that compile to JavaScript
      1. CoffeeScript
      2. TypeScript
      3. ClojureScript
      4. Elm
    20. Error logging
    21. Manual testing
    22. Automated testing
    23. Unit tests
    24. Integration tests
    25. Acceptance tests
    26. Writing less JavaScript
  5. References
  6. About