Javascript and open data

This book will teach you how to take advantage of the JavaScript language to process data provided on the Internet. Much attention is given to the main JavaScript backbone: prototype based objects, and functional capabilities, while common features (loops, etc.) are summarized in a few cheat-sheets....

Descripción completa

Detalles Bibliográficos
Otros Autores: Jeansoulin, Robert, author (author)
Formato: Libro electrónico
Idioma:Inglés
Publicado: London, UK : Hoboken, NJ : ISTE, Ltd 2018.
Edición:1st edition
Colección:Computer engineering series
Materias:
Ver en Biblioteca Universitat Ramon Llull:https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009630620506719
Tabla de Contenidos:
  • Cover
  • Half-Title Page
  • Dedication
  • Title Page
  • Copyright Page
  • Contents
  • Introduction
  • I.1. Motivation
  • I.2. Organization of the book
  • I.3. The history of JavaScript
  • I.3.1. Analyzing this biography of JavaScript
  • I.4. To code without "var", nor "for", nor "new"
  • I.4.1. Comments
  • I.4.2. Deliberate bias of this book
  • I.4.3. Prerequisites
  • I.4.4. Some useful, easy, and free programming tools
  • I.5. Mechanisms and features of the script language
  • I.5.1. JavaScript is interpreted and run within an ecosystem
  • I.5.2. What does a JavaScript engine do?
  • I.5.3. Variables and instructions: the functionalities of an "imperative language"
  • I.5.4. Objects: functionalities of a "prototype-based objectoriented language"
  • I.5.5. Functions as "first-class objects": the functionalities of a "functional language"
  • I.6. Conclusion
  • PART 1: Core JavaScript
  • Introduction to Part 1
  • 1. Variables: Declaration, Definition and Type
  • 1.1. Declarations of functions and variables
  • 1.1.1. The different declaration keywords
  • 1.1.2. Lexical scope and definition of a variable according to declaration mode: var, let, const
  • 1.1.3. Comments (important improvements carried over by ES6)
  • 1.1.4. General conclusion about the variable declarations in JavaScript
  • 1.1.5. Naming variables and functions: best practices
  • 1.2. Variable definition, initialization and typing in JavaScript
  • 1.2.1. Variables initialization and definition
  • 1.2.2. Types
  • 1.2.3. How to use the type "undefined" and the value undefined
  • 2. Controls: Booleans, Branch and Loops
  • 2.1. Truth values and boolean operators
  • 2.1.1. Boolean operators: "!" (not), "&amp
  • &amp
  • " (and), " ||" (or)
  • 2.1.2. Relational operators: &gt
  • , &lt
  • , &gt
  • =, &lt
  • =
  • 2.1.3. Comparison operators: ==, != (simple) or ===, !== (strict).
  • 2.2. Conditional instructions: branch test, loop test
  • 2.2.1. Conditional instructions: if ... else, if ... else if ... else
  • 2.2.2. Ternary conditional operator
  • 2.2.3. Instruction "switch"
  • 2.2.4. Classical iteration loop: instruction "for"
  • 2.2.5. Repeat under condition: instructions "while", and "do..while"
  • 2.2.6. Implicit casting of values "undefined" and "null" in boolean context
  • 2.2.7. Short-cut evaluation: tips for the uncertain definitions
  • 2.2.8. Exception handling
  • 3. Data: Numbers and Strings
  • 3.1. Handling numbers
  • 3.1.1. Literal notation of type "number" variables
  • 3.1.2. Arithmetic operators
  • 3.1.3. Math operations using the methods of the object Math
  • 3.1.4. Evaluation in the "numerical context" versus "boolean context"
  • 3.2. Handling character strings
  • 3.2.1 Literal notation of strings
  • 3.2.2. Backtick syntax, or template syntax, introduced by ES6
  • 3.2.3. Concatenation operator
  • 3.2.4. Resolving polymorphism issues with operator + in numerical or string context
  • 3.2.5. Behavior of the relational and equality operators
  • 3.2.6. Various facets of string-related issues in a sample application
  • 3.3. The String.prototype methods
  • 3.3.1. The need for preprocessing before Comparison
  • 3.3.2. Handling partial comparisons
  • 3.3.3. Methods for handling strings
  • 3.3.4. Regular expressions
  • 3.3.5. Evaluation and uses
  • 3.3.6. Some examples of useful patterns
  • 3.3.7. General syntax of a regular expression
  • 3.3.8. Combining RegExp and String.prototype methods
  • 4. Objects and Prototypes
  • 4.1. Introduction
  • 4.2. The objects: concepts versus named entities
  • 4.3. Object literal notation in JavaScript
  • 4.3.1. Syntax for "object literal":
  • 4.3.2. Important warnings about writing JavaScript object notation
  • 4.3.3. The object literal first use: to define an object type variable.
  • 4.3.4. The object literal second use: data notation in JSON format
  • 4.3.5. Accessing the individual properties of an object
  • 4.3.6. Notation syntax evolution with ES6
  • 4.4. The built-in methods of Object and Object.prototype
  • 4.4.1. The methods of Object, Object.prototype, and JSON
  • 4.4.2. Create an object and specify its properties
  • 4.4.3. Syntax and usage of the "descriptor" property
  • 4.4.4. Listing the properties of an object, analyzing a literal
  • 4.5. Basics of the "prototypal approach" in JavaScript
  • 4.5.1. JavaScript object's fundamental relation: "has prototype"
  • 4.5.2. Role of the prototypes and inheritance mechanism
  • 4.5.3. Object construction: the "literal approach"
  • 4.5.4. Object construction: the "prototypal approach"
  • 4.5.5. The pattern "assign/create"
  • 4.5.6. Object construction: the "classical approach"
  • 4.6. Comparing "prototypal" and "classical" approaches
  • 4.6.1. Simulating a class hierarchy in JavaScript
  • 4.6.2. Summing up what we learned so far
  • 5. Arrays
  • 5.1. Handling arrays: creation and access to its elements
  • 5.1.1. Creating an array with the array literal notation
  • 5.1.2. Checking if a variable is an array
  • 5.1.3. The length property, the index count
  • 5.1.4. Accessing individual values in an array: the indices
  • 5.2. Methods of the object Array and Array.prototype
  • 5.2.1. The "Mutators" family
  • 5.2.2. The "Accessors" family
  • 5.2.3. The "Iteration" family
  • 5.2.4. Iterating over the elements of an array
  • 5.2.5. Iteration without a loop, with Array/Array.prototype methods
  • 5.2.6. Chaining array methods
  • 5.2.7. Arrays and the arrow function syntax
  • 5.2.8. The "Iterables"
  • 5.3. Array of arrays (multidimensional array)
  • 5.3.1. Frameworks proposing an "augmented Array.prototype"
  • 6. Functions
  • 6.1. General syntax of a JavaScript function
  • 6.1.1. Name.
  • 6.1.2. Parameters
  • 6.1.3. Return
  • 6.1.4. Function code block and scope
  • 6.1.5. Creating functions
  • 6.2. Invoking a function with operator (.)
  • 6.2.1. The three facets of the "parentheses operator" in a function context
  • 6.3. Choosing function declaration versus function expression
  • 6.4. Arguments
  • 6.4.1. The arguments are passed by value
  • 6.4.2. The inner object "arguments"
  • 6.5. Scope: global scope, function scopes and block scopes
  • 6.5.1. Vocabulary: lexical scope and "namespace"
  • 6.5.2. Wrapping-up and warnings
  • 6.6. Function "closures"
  • 6.6.1. Saving the value of a free variable in a given context
  • 6.6.2. Creating a list of functions linked to an array of data
  • 6.6.3. "Currying": breaking down a function into 1-parameter functions
  • 6.6.4. Compositing functions from an array of functions
  • 6.7. Immediately invocable functions: IIFE
  • 6.7.1. Creating a "namespace", or a named library, with an IIFE
  • 6.8. The methods of Function.prototype
  • 6.8.1. Function.prototype.call() and .apply(), and pronoun 'this'
  • 6.8.2. Function.prototype.bind()
  • 6.9. Built-in functions
  • 6.10. Closure and IIFE cheat-sheet
  • 7. From Signs to Patterns
  • 7.1. Reserved words
  • 7.2. The pronoun "this"
  • 7.2.1. The many ways to link the pronoun "this"
  • 7.2.2. How to explicitly bind the pronoun?
  • 7.3. Operator: new
  • 7.4. Punctuation signs
  • 7.5. JavaScript usual design patterns
  • 7.5.1. Programming idioms
  • 7.5.2. Creational pattern: "Assign/Create Combo"
  • 7.5.3. Structural pattern: singleton or namespace pattern
  • 7.5.4. Another structural pattern: the Decorator pattern
  • 7.5.5. Behavioral pattern: the observer or publish/subscribe pattern
  • 7.6. Metaprogramming with ES6
  • 7.6.1. "Reflection" by "Symbols"
  • 7.6.2. New tool for measuring code performance
  • PART 2: Client-Side JavaScript
  • Introduction to Part 2.
  • 8. JavaScript in the Web Page
  • 8.1. Ecosystem of the web page: the HTML sequence
  • 8.1.1. Structure and semantics/layout and presentation
  • 8.1.2. Reminder about HTML5 tags
  • 8.2. Building the web page DOM: the layout engine
  • 8.2.1. DOM tree built by the layout engine: selecting nodes via CSS
  • 8.2.2. CSS rules and relationship with JavaScript selection methods
  • 8.3. Dynamic behavior of the web page: the script engine
  • 8.4. Interface with the DOM
  • 8.4.1. DOM interface 1: selecting elements
  • 8.4.2. DOM interface 2: reading/writing/creating an element
  • 8.4.3. Methods for HTML DOM document and element prototypes
  • 8.5. The events in client side JavaScript
  • 8.5.1. The browser event loop
  • 8.5.2. Handling DOM events
  • 8.6. Interacting with the DOM: to link elements/events
  • 8.6.1. Waiting for the DOM
  • 8.6.2. Example: to build an HTML list
  • 8.6.3. Using events: modifying attributes and class names of an element
  • 8.6.4. Dispatching events, creating a CustomEvent
  • 9. Graphic and Multimedia Tools
  • 9.1. To draw in the web page
  • 9.1.1. The elements &lt
  • figure&gt
  • and &lt
  • canvas&gt
  • 9.1.2. 2D curve plot
  • 9.2. SVG language
  • 9.3. Handling time in graphics animation
  • 9.3.1. Methods setTimeout, setInterval, requestAnimationFrame
  • 9.3.2. Performance considerations, generator functions
  • 9.4. Data persistence between client sessions
  • 9.4.1. Http cookies
  • 9.4.2. Local storages
  • 9.5. Note about "JavaScript frameworks" (jQuery, D3, etc.)
  • 9.5.1. A few words about jQuery
  • 9.5.2. Recommendation
  • 10. AJAX Technology (Asynchrony)
  • 10.1. Architecture for client-server data exchange
  • 10.1.1. The object XMLHttpRequest
  • 10.1.2. Using XMLHttpRequest: several steps
  • 10.2. Remarks about HTTP
  • 10.3. "Promises" and asynchronous programming
  • 10.3.1. Example: promisifying XMLHttpRequest.
  • 10.3.2. Chaining promises.