Ebook Programming JavaScript Applications

Programming JavaScript Applications
Programming JavaScript Applications

Download

THÔNG TIN TÀI LIỆU

Nhà xuất bản O’Reilly Media
Tác giả Eric Elliott
Số trang 253
Ngày xuất bản 2014
File PDF

NỘI DUNG TÀI LIỆU
1. The JavaScript Revolution
Advantages of JavaScript 2
Performance 2
Objects 2
Syntax 3
First-Class Functions 3
Events 3
Reusability 4
The Net Result 4
Anatomy of a Typical Modern JavaScript App 4
Infrastructure 4
JSON: Data Storage and Communication 5
NoSQL Data Stores 6
RESTful JSON Web Services 6

2. Functions
Minimize Side Effects 10
Function Definition 12
Named Function Expressions 14
Lambdas 16
Immediately Invoked Function Expressions 18
Method Context 20
Function Scope 22
Hoisting 22
Closures 25
Method Design 27
Named Parameters 28
Function Polymorphism 29
Generics and Collection Polymorphism 32
Method Chaining and Fluent APIs 35
Functional Programming 36
Stateless Functions (aka Pure Functions) 38
Partial Application and Currying 40
Asynchronous Operations 41
Callbacks 41
Promises and Deferreds 42
Conclusion 44

3. Objects
Classical Inheritance Is Obsolete 48
Fluent-Style JavaScript 51
Prototypes 53
Delegate Prototypes 53
Prototype Cloning 56
The Flyweight Pattern 57
Object Creation 59
Factories 61
Prototypal Inheritance with Stamps 64
Conclusion 69

4. Modules
Principles of Modularity 72
Interfaces 73
The Module Pattern 77
Asynchronous Module Definition 79
Plug-Ins 81
Node-Style Modules 82
npm 84
ES6 Modules 86
Building Client-Side Code with CommonJS, npm, Grunt, and Browserify 87
Defining the App 87
Feature Implementation 90
Bundling and Deployment 93
Conclusion 98

5. Separation of Concerns
Client-Side Concerns 100
Module Management 101
Events 106
Presentation and DOM Manipulation 117
Server-Side Concerns 125
Getting Started with Node and Express 125
Conclusion 134

6. Access Control
Authentication 137
Passwords 137
Credential 141
Multifactor Authentication 143
Federated and Delegated Authentication 145
Authorization 147
Authorizing Applications 148
OAuth 2.0 149
Conclusion 150

7. Logging
Debugging 151
Server Operations 153
Security 153
Auditing 154
Business Analytics 154
Viral Factor 155
Logging Checklist 155
Logging Requests 156
Logging Errors 160
Sample Log Output 162
Logging Service Alerts 165
Logging Goals 166
Profiling and Instrumentation 166
Logging Client-Side Events 167
Deciphering Data 168
Conclusion 169

8. Building RESTful APIs
Usable 172
Focus 172
Consistency 174
Self-Describing: Hypermedia 182
Affordances 182
HATEOAS 183
Jade 185
Jiron 187
Responsive APIs 189
Optimizing for Speed 191
Conclusion 192

9. Feature Toggle
Organizing Features 193
Scale of a Feature 193
Feature Groups 194
Lifespan of a Feature 195
Development 195
Staging 195
Production Testing 195
Feature Rollout 195
Default Activation 196
Full Integration 196
Implementation 196
Conclusion 200

10. Internationalization
Conclusion 205

A. JavaScript Style Guide

Be the first to comment

Leave a Reply

Your email address will not be published.

*