You are previewing Modern JavaScript.
O'Reilly logo
Modern JavaScript

Book Description

JavaScript has moved quickly to become the powerful dominant scripting language of the Web—not just in the browser and on the server, but also in the realm of hardware. If you work with JavaScript, staying on top of the latest methodologies, tools, and techniques is critical, whether you’re building single page web apps with front-end frameworks or building a RESTful API using Node.

This free ebook gets you started, bringing together concepts that are helpful to understand before tackling your next modern JavaScript app. With a collection of chapters from the O’Reilly JavaScript library’s published books, you’ll learn about the scope and challenges that await you in the world of modern web development.

This ebook includes excerpts from these books:

  • Web Development with Node and Express
  • Developing Web Components
  • Beautiful JavaScript
  • JavaScript Cookbook

Table of Contents

  1. Preface
  2. I. Web Development with Node and Express
  3. 1. Introducing Express
    1. The JavaScript Revolution
    2. Introducing Express
    3. A Brief History of Express
    4. Upgrading to Express 4.0
    5. Node: A New Kind of Web Server
    6. The Node Ecosystem
    7. Licensing
  4. 2. Getting Started with Node
    1. Getting Node
    2. Using the Terminal
    3. Editors
    4. npm
    5. A Simple Web Server with Node
      1. Hello World
      2. Event-Driven Programming
      3. Routing
      4. Serving Static Resources
    6. Onward to Express
  5. II. JavaScript Cookbook, 2nd Edition
  6. 3. Modularizing and Managing JavaScript
    1. Loading Scripts with a Script Loader
      1. Problem
      2. Solution
      3. Discussion
    2. Loading Scripts Asynchronously the HTML5 Way
      1. Problem
      2. Solution
      3. Discussion
    3. Converting Your JavaScript to AMD and RequireJS
      1. Problem
      2. Solution
      3. Discussion
      4. See Also
    4. Using RequireJS with jQuery or Another Library
      1. Problem
      2. Solution
      3. Discussion
    5. Loading and Using Dojo Modules
      1. Problem
      2. Solution
      3. Discussion
    6. Installing and Maintaining Node Modules with npm
      1. Problem
      2. Solution
      3. Discussion
    7. Searching for a Specific Node Module via npm
      1. Problem
      2. Solution
      3. Discussion
    8. Converting Your Library into a Node Module
      1. Problem
      2. Solution
      3. Discussion
      4. See Also
    9. Taking Your Code Across All Module Environments
      1. Problem
      2. Solution
      3. Discussion
      4. See Also
    10. Creating an Installable Node Module
      1. Problem
      2. Solution
      3. Discussion
      4. Extra: The README File and Markdown Syntax
    11. Packaging and Managing Your Client-Side Dependencies with Bower
      1. Problem
      2. Solution
      3. Discussion
    12. Compiling Node.js Modules for Use in the Browser with Browserify
      1. Problem
      2. Solution
      3. Discussion
    13. Unit Testing Your Node Modules
      1. Problem
      2. Solution
      3. Discussion
    14. Running Tasks with Grunt
      1. Problem
      2. Solution
      3. Discussion
      4. See Also
  7. 4. Developing Web Components
  8. 5. Working with the Shadow DOM
    1. What Is the Shadow DOM?
    2. Shadow DOM Basics
      1. Shadow Host
      2. Shadow Root
    3. Using a Template with the Shadow DOM
    4. Shadow DOM Styling
      1. Style Encapsulation
      2. Styling the Host Element
      3. Styling Shadow Root Elements from the Parent Page
    5. Content Projection
      1. Projection via a Content Tag
      2. Projection via Content Selectors
      3. Getting Distributed Nodes and Insertion Points
    6. Shadow Insertion Points
    7. Events and the Shadow DOM
    8. Updating the Dialog Template to Use the Shadow DOM
      1. Dialog Markup
      2. Dialog API
      3. Updating the Dialog show Method
      4. Instantiating a Dialog Component Instance
    9. Summary
  9. III. Beautiful JavaScript
  10. 6. Functional JavaScript
    1. Functional Programming
    2. Functional JavaScript
    3. Objects
    4. Now What?