This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.
Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"
Begin your JavaScript journey with this comprehensive, hands-on guide. You’ll learn everything there is to know about professional JavaScript programming, from core language concepts to essential client-side tasks. Build dynamic web applications with step-by-step instructions and expand your knowledge by exploring server-side development and mobile development. Work with advanced language features, write clean and efficient code, and much more!
Your all-in-one guide to JavaScript
Work with objects, reference types, events, forms, and web APIs
Build server-side applications, mobile applications, desktop applications, and more
Consult and download practical code examples
Language Review
Refresh your knowledge or learn JavaScript as a beginner with in-depth coverage of JavaScript basics. Understand how to store values, use data types, control flow, and debug your code.
Client-Side Programming
Build dynamic web applications by learning to process events, load content, create images, and use web APIs.
Advanced Concepts
Explore server-side application development with Node.js, mobile application development with React Native and Iconic, and desktop programming with Electron and NW.js. Work with advanced language features and more.
Author(s): Philip Ackermann Edition: 1 Publisher: Rheinwerk Publishing Year: 2022
Language: English Pages: 1024
Rheinwerk
Imprint
The Library of Congress has cataloged the printed edition as follows:
Dear Reader,
Hareem Shafi
Notes on Usage
Notes on the Screen Presentation
Table of Contents
Book Resources
Preface
1 Basics and Introduction
1.1 Programming Basics
1.2 Introduction to JavaScript
1.3 Summary
2 Getting Started
2.1 Introduction to JavaScript and Web Development
2.2 Integrating JavaScript into a Web Page
2.3 Creating Output
2.4 Summary
3 Language Core
3.1 Storing Values in Variables
3.2 Using the Different Data Types
3.3 Deploying the Different Operators
3.4 Controlling the Flow of a Program
3.5 Creating Reusable Code Blocks
3.6 Responding to Errors and Handling Them Correctly
3.7 Commenting the Source Code
3.8 Debugging the Code
3.9 Summary
4 Working with Reference Types
4.1 Difference between Primitive Data Types and Reference Types
4.2 Encapsulating State and Behavior in Objects
4.3 Working with Arrays
4.4 Extracting Values from Arrays and Objects
4.5 Working with Strings
4.6 Using Maps
4.7 Using Sets
4.8 Other Global Objects
4.9 Working with Regular Expressions
4.10 Functions as Reference Types
4.11 Summary
5 Dynamically Changing Web
Pages
5.1 Structure of a Web Page
5.2 Selecting Elements
5.3 Working with Text Nodes
5.4 Working with Elements
5.5 Working with Attributes
5.6 Summary
6 Processing and Triggering Events
6.1 The Concept of Event-Driven Programming
6.2 Responding to Events
6.3 The Different Types of Events
6.4 Understanding and Influencing the Flow of Events
6.5 Programmatically Triggering Events
6.6 Summary
7 Working with Forms
7.1 Accessing Forms and Form Fields
8 Controlling Browsers and
Reading Browser Information
9 Dynamically Reloading
Contents of a Web Page
9.3 The JSON Format
9.4 Making Requests via Ajax
9.5 Summary
10 Simplifying Tasks with jQuery
10.1 Introduction
10.2 Working with the DOM
10.3 Responding to Events
10.4 Creating Ajax Requests
10.5 Summary
11 Dynamically Creating Images and Graphics
11.1 Drawing Images
11.2 Integrating Vector Graphics
11.3 Summary
12 Using Modern Web APIs
12.1 Communicating via JavaScript
12.2 Recognizing Users
12.3 Using the Browser Storage
12.4 Using the Browser Database
12.5 Accessing the File System
12.6 Moving Components of a Web Page
12.7 Parallelizing Tasks
12.8 Determining the Location of Users
12.9 Reading the Battery Level of an End Device
12.10 Outputting Speech and Recognizing Speech
12.11 Creating Animations
12.12 Working with the Command Line
12.13 Developing Multilingual Applications
12.14 Overview of Various Web APIs
12.15 Summary
13 Object-Oriented
Programming
13.1 The Principles of Object-Oriented
Programming
13.2 Prototypical Object Orientation
13.3 Pseudoclassical Object Orientation
13.4 Object Orientation with Class Syntax
13.5 Summary
14 Functional Programming
14.1 Principles of Functional Programming
14.2 Imperative Programming and Functional Programming
14.3 Summary
15 Correctly Structuring the Source Code
15.1 Avoiding Name Conflicts
15.2 Defining and Using Modules
15.3 Summary
16 Using Asynchronous Programming and Other Advanced Features
16.1 Understanding and Using Asynchronous Programming
16.2 Encapsulating Iteration over Data
Structures
16.3 Pausing and Resuming Functions
16.4 Intercepting Access to Objects
16.5 Summary
17 Creating Server-Based
Applications with Node.js
17.1 Introduction to Node.js
17.2 Managing Node.js Packages
17.3 Processing and Triggering Events
17.4 Accessing the File System
17.5 Creating a Web Server
17.6 Accessing Databases
17.7 Working with Streams
17.8 Summary
18 Creating Mobile Applications with JavaScript
18.1 The Different Types of Mobile Applications
18.2 Creating Mobile Applications with React Native
18.3 Summary
19 Desktop Applications with JavaScript
19.1 NW.js
19.2 Electron
19.3 Summary
20 Controlling Microcontrollers with JavaScript
20.1 Espruino
20.2 Tessel
20.3 BeagleBone Black
20.4 Arduino
20.5 Cylon.js
20.6 Summary
21 Establishing a Professional Development Process
21.1 Automating Tasks
21.2 Automated Testing of Source Code
21.3 Source Code Version Management
21.4 Summary
A The Author
Index
Book Resources
Preface
Target Audience
Structure of the Book
How Should I Read This Book?
Acknowledgments
Philip Ackermann
1 Basics and Introduction
1.1 Programming Basics
1.1.1 Communicating with the Computer
Definition
Definition
Tip
1.1.2 Programming Languages
Note
Compiled Programming Languages
Definition
Interpreted Programming Languages
Note
Check Support for Individual Language Features
Note
Compiler
Interpreter
Intermediate Languages
Overview of Different Programming Languages
1.1.3 Tools for Program Design
1. Set the goal of the algorithm
2. Define the steps
3. Write the algorithm
Definition
Note
Other Elements in Flowcharts
Flowcharts Are Independent of the Programming Language
Pseudocode
Flowcharts, Pseudocode, and Programming Languages
1.2 Introduction to JavaScript
1.2.1 History
Other Variants of ECMAScript
1.2.2 Fields of Application
Definition of Terms
Frontend of Web Applications
Definition
Definition
Definition
Definition
Web Application Backend
• Native applications
• HTML5 applications
Desktop Applications
Embedded Systems
Games and 3D applications
JavaScript: Not the Best Choice for Everything
1.3 Summary
2 Getting Started
2.2 Integrating JavaScript into a Web Page
Learn HTML and CSS
2.2.1 Preparing a Suitable Folder Structure
Starting Point of a JavaScript Application
2.2.2 Creating a JavaScript File
Note
Supplemental Downloads for the Book
2.2.3 Embedding a JavaScript File in an HTML File
Definition
Embedding Multiple JavaScript Files
2.2.4 Defining JavaScript Directly within the HTML
Note
Tip
The