Introduction |
|
xv | |
|
|
|
|
2 | (40) |
|
|
4 | (1) |
|
|
4 | (1) |
|
Putting the web in the cloud |
|
|
5 | (3) |
|
|
8 | (2) |
|
JavaScript heroes: functions |
|
|
10 | (1) |
|
The JavaScript function object |
|
|
10 | (1) |
|
Lifting the lid on JavaScript |
|
|
11 | (9) |
|
References to JavaScript function objects |
|
|
20 | (2) |
|
|
22 | (1) |
|
Function references as function arguments |
|
|
22 | (5) |
|
Returning values from function calls |
|
|
27 | (2) |
|
Returning multiple values from a function call |
|
|
29 | (3) |
|
|
32 | (1) |
|
Getting the date and time |
|
|
32 | (4) |
|
|
36 | (2) |
|
|
38 | (4) |
|
|
42 | (44) |
|
|
44 | (1) |
|
|
44 | (2) |
|
|
46 | (1) |
|
GitHub and open-source software |
|
|
47 | (4) |
|
|
51 | (5) |
|
|
56 | (1) |
|
Loading a page and displaying it |
|
|
57 | (6) |
|
|
63 | (1) |
|
Interact with the document object |
|
|
63 | (6) |
|
|
69 | (3) |
|
Making a time travel clock |
|
|
72 | (1) |
|
|
73 | (1) |
|
Share values with global variables |
|
|
74 | (6) |
|
|
80 | (1) |
|
|
81 | (5) |
|
|
86 | (38) |
|
|
88 | (1) |
|
|
88 | (5) |
|
|
93 | (2) |
|
Storing data on the local machine |
|
|
95 | (4) |
|
JavaScript heroes: let, var, and const |
|
|
99 | (7) |
|
Making page elements from JavaScript |
|
|
106 | (1) |
|
|
107 | (11) |
|
|
118 | (6) |
|
|
124 | (42) |
|
|
126 | (6) |
|
JavaScript heroes: modules |
|
|
132 | (1) |
|
Create a module and require it |
|
|
133 | (5) |
|
|
138 | (1) |
|
Using import in the browser |
|
|
139 | (5) |
|
The dark side of imported code |
|
|
144 | (1) |
|
|
145 | (1) |
|
|
146 | (7) |
|
|
153 | (6) |
|
|
159 | (1) |
|
|
160 | (6) |
|
Part 2 Make a cloud-based application |
|
|
|
5 Build a shared application |
|
|
166 | (44) |
|
|
168 | (1) |
|
|
168 | (7) |
|
|
175 | (2) |
|
|
177 | (3) |
|
|
180 | (5) |
|
|
185 | (3) |
|
|
188 | (1) |
|
Design a protocol for a conversation |
|
|
189 | (1) |
|
|
190 | (1) |
|
|
191 | (6) |
|
|
197 | (4) |
|
|
201 | (5) |
|
|
206 | (4) |
|
6 Create a shared experience |
|
|
210 | (46) |
|
|
212 | (1) |
|
|
213 | (2) |
|
|
215 | (9) |
|
Make pseudo-random values |
|
|
224 | (7) |
|
Create a pseudo-random library |
|
|
231 | (1) |
|
Generate timed randomness |
|
|
232 | (2) |
|
|
234 | (1) |
|
|
235 | (1) |
|
|
235 | (4) |
|
|
239 | (1) |
|
|
240 | (2) |
|
|
242 | (1) |
|
|
242 | (1) |
|
|
242 | (8) |
|
|
250 | (6) |
|
|
256 | (42) |
|
The Tiny Survey application |
|
|
258 | (1) |
|
Ethics, privacy, and security |
|
|
258 | (3) |
|
|
261 | (1) |
|
|
261 | (1) |
|
|
262 | (2) |
|
|
264 | (2) |
|
|
266 | (1) |
|
|
267 | (3) |
|
|
270 | (1) |
|
|
270 | (11) |
|
|
281 | (1) |
|
|
281 | (2) |
|
|
283 | (7) |
|
|
290 | (4) |
|
|
294 | (4) |
|
|
298 | (54) |
|
Put on the style with Bootstrap |
|
|
300 | (3) |
|
Getting started with Express |
|
|
303 | (1) |
|
Express and node package manager |
|
|
303 | (7) |
|
|
310 | (1) |
|
|
311 | (1) |
|
|
311 | (4) |
|
Use page templates with EJS |
|
|
315 | (3) |
|
Get the example application |
|
|
318 | (2) |
|
|
320 | (1) |
|
|
321 | (1) |
|
Receive input from a post |
|
|
322 | (5) |
|
|
327 | (1) |
|
|
327 | (2) |
|
Generate pages using an EJS template |
|
|
329 | (6) |
|
Use named route parameters |
|
|
335 | (1) |
|
Build a survey data object |
|
|
336 | (3) |
|
Build a select option page |
|
|
339 | (4) |
|
|
343 | (2) |
|
|
345 | (3) |
|
|
348 | (4) |
|
|
352 | (40) |
|
|
354 | (3) |
|
|
357 | (3) |
|
|
360 | (7) |
|
|
367 | (6) |
|
|
373 | (1) |
|
|
373 | (1) |
|
Store application status with cookies |
|
|
374 | (1) |
|
|
374 | (1) |
|
|
375 | (1) |
|
Use cookies in Tiny Survey |
|
|
376 | (9) |
|
|
385 | (7) |
|
Part 3 Building with cloud technologies |
|
|
|
|
392 | (44) |
|
|
394 | (1) |
|
|
394 | (1) |
|
Asynchronous file writing |
|
|
395 | (1) |
|
JavaScript heroes: the Promise |
|
|
395 | (6) |
|
JavaScript heroes: await and async |
|
|
401 | (1) |
|
Using async in Tiny Survey |
|
|
402 | (1) |
|
|
403 | (2) |
|
Create error-handling middleware |
|
|
405 | (4) |
|
|
409 | (1) |
|
|
409 | (3) |
|
|
412 | (2) |
|
The SurveyManagerDB class |
|
|
414 | (3) |
|
Testing asynchronous code |
|
|
417 | (2) |
|
|
419 | (1) |
|
|
419 | (2) |
|
|
421 | (1) |
|
Manage environment variables |
|
|
421 | (2) |
|
Code and deploy with the nodemon package |
|
|
423 | (4) |
|
|
427 | (5) |
|
|
432 | (4) |
|
11 Activity tracking and sessions |
|
|
436 | (50) |
|
|
438 | (1) |
|
Create a Globally Unique Identifier (GUID) |
|
|
438 | (1) |
|
|
439 | (1) |
|
Use activity diagrams to describe workflow |
|
|
439 | (2) |
|
|
441 | (1) |
|
Create tracking middleware |
|
|
442 | (7) |
|
|
449 | (1) |
|
Recognize survey creators |
|
|
450 | (9) |
|
|
459 | (1) |
|
|
460 | (1) |
|
|
460 | (1) |
|
Register and login workflow |
|
|
461 | (1) |
|
|
462 | (1) |
|
|
463 | (1) |
|
|
464 | (3) |
|
|
467 | (2) |
|
|
469 | (4) |
|
|
473 | (2) |
|
|
475 | (1) |
|
|
476 | (1) |
|
|
477 | (3) |
|
|
480 | (1) |
|
|
481 | (5) |
|
12 JavaScript technologies |
|
|
486 | (38) |
|
|
488 | (4) |
|
|
492 | (1) |
|
|
493 | (3) |
|
Use MongoDB on your server |
|
|
496 | (1) |
|
|
496 | (1) |
|
|
497 | (1) |
|
Control hardware from a server |
|
|
497 | (1) |
|
|
497 | (4) |
|
|
501 | (4) |
|
Use WebSockets to send values from a server |
|
|
505 | (1) |
|
|
505 | (4) |
|
|
509 | (1) |
|
MQTT in a node.js application |
|
|
510 | (3) |
|
Create an Internet of Things network |
|
|
513 | (1) |
|
Create your own IoT devices |
|
|
513 | (2) |
|
Manage devices using the Connected Little Boxes server |
|
|
515 | (1) |
|
Create a game using Phazer |
|
|
516 | (1) |
|
Serving static files from Express |
|
|
516 | (2) |
|
|
518 | (1) |
|
|
518 | (1) |
|
|
518 | (1) |
|
|
518 | (1) |
|
|
519 | (1) |
|
|
519 | (1) |
|
|
519 | (1) |
|
|
519 | (1) |
|
|
520 | (4) |
Index |
|
524 | |