Muutke küpsiste eelistusi

E-raamat: Web Development with Node and Express: Leveraging the JavaScript Stack

  • Formaat: 346 pages
  • Ilmumisaeg: 13-Nov-2019
  • Kirjastus: O'Reilly Media
  • Keel: eng
  • ISBN-13: 9781492053484
Teised raamatud teemal:
  • Formaat - PDF+DRM
  • Hind: 40,37 €*
  • * hind on lõplik, st. muud allahindlused enam ei rakendu
  • Lisa ostukorvi
  • Lisa soovinimekirja
  • See e-raamat on mõeldud ainult isiklikuks kasutamiseks. E-raamatuid ei saa tagastada.
  • Formaat: 346 pages
  • Ilmumisaeg: 13-Nov-2019
  • Kirjastus: O'Reilly Media
  • Keel: eng
  • ISBN-13: 9781492053484
Teised raamatud teemal:

DRM piirangud

  • Kopeerimine (copy/paste):

    ei ole lubatud

  • Printimine:

    ei ole lubatud

  • Kasutamine:

    Digitaalõiguste kaitse (DRM)
    Kirjastus on väljastanud selle e-raamatu krüpteeritud kujul, mis tähendab, et selle lugemiseks peate installeerima spetsiaalse tarkvara. Samuti peate looma endale  Adobe ID Rohkem infot siin. E-raamatut saab lugeda 1 kasutaja ning alla laadida kuni 6'de seadmesse (kõik autoriseeritud sama Adobe ID-ga).

    Vajalik tarkvara
    Mobiilsetes seadmetes (telefon või tahvelarvuti) lugemiseks peate installeerima selle tasuta rakenduse: PocketBook Reader (iOS / Android)

    PC või Mac seadmes lugemiseks peate installima Adobe Digital Editionsi (Seeon tasuta rakendus spetsiaalselt e-raamatute lugemiseks. Seda ei tohi segamini ajada Adober Reader'iga, mis tõenäoliselt on juba teie arvutisse installeeritud )

    Seda e-raamatut ei saa lugeda Amazon Kindle's. 

Build dynamic web applications with Express, a key component of the Node/JavaScript development stack. In this updated edition, author Ethan Brown teaches you Express fundamentals by walking you through the development of an example application. This hands-on guide covers everything from server-side rendering to API development suitable for use in single-page apps (SPAs).

Express strikes a balance between a robust framework and no framework at all, allowing you a free hand in your architecture choices. Frontend and backend engineers familiar with JavaScript will also learn best practices for building multipage and hybrid web apps with Express. Pick up this book and discover new ways to look at web development.

Create a templating system for rendering dynamic data Dive into request and response objects, middleware, and URL routing Simulate a production environment for testing Persist data in document databases with MongoDB and relational databases with PostgreSQL Make your resources available to other programs with APIs Build secure apps with authentication, authorization, and HTTPS Integrate with social media, geolocation, and more Implement a plan for launching and maintaining your app Learn critical debugging skills
Preface xiii
1 Introducing Express
1(10)
The JavaScript Revolution
1(2)
Introducing Express
3(1)
Server-Side and Client-Side Applications
4(1)
A Brief History of Express
5(1)
Node: A New Kind of Web Server
5(2)
The Node Ecosystem
7(1)
Licensing
8(1)
Conclusion
9(2)
2 Getting Started with Node
11(10)
Getting Node
11(1)
Using the Terminal
12(1)
Editors
13(1)
npm
14(1)
A Simple Web Server with Node
15(5)
Hello World
15(1)
Event-Driven Programming
16(1)
Routing
17(1)
Serving Static Resources
18(2)
Onward to Express
20(1)
3 Saving Time with Express
21(10)
Scaffolding
21(1)
The Meadowlark Travel Website
22(1)
Initial Steps
22(4)
Views and Layouts
26(3)
Static Files and Views
29(1)
Dynamic Content in Views
30(1)
Conclusion
30(1)
4 Tidying Up
31(10)
File and Directory Structure
31(1)
Best Practices
32(1)
Version Control
32(1)
How to Use Git with This Book
33(3)
If You're Following Along by Doing It Yourself
33(2)
If You're Following Along by Using the Official Repository
35(1)
Npm Packages
36(1)
Project Metadata
37(1)
Node Modules
38(2)
Conclusion
40(1)
5 Quality Assurance
41(18)
The QA Plan
42(1)
QA: Is It Worth It?
43(1)
Logic Versus Presentation
44(1)
The Types of Tests
45(1)
Overview of QA Techniques
45(1)
Installing and Configuring Jest
45(1)
Unit Testing
46(5)
Mocking
47(1)
Refactoring the Application for Testability
47(1)
Writing Our First Test
48(2)
Test Maintenance
50(1)
Code Coverage
50(1)
Integration Testing
51(3)
Linting
54(4)
Continuous Integration
58(1)
Conclusion
58(1)
6 The Request and Response Objects
59(14)
The Parts of a URL
59(2)
HTTP Request Methods
61(1)
Request Headers
61(1)
Response Headers
62(1)
Internet Media Types
62(1)
Request Body
63(1)
The Request Object
63(2)
The Response Object
65(2)
Getting More Information
67(1)
Boiling It Down
68(4)
Rendering Content
68(1)
Processing Forms
69(1)
Providing an API
70(2)
Conclusion
72(1)
7 Templating with Handlebars
73(16)
There Are No Absolute Rules Except This One
75(1)
Choosing a Template Engine
75(1)
Pug: A Different Approach
76(1)
Handlebars Basics
77(11)
Comments
78(1)
Blocks
78(2)
Server-Side Templates
80(1)
Views and Layouts
81(1)
Using Layouts (or Not) in Express
82(1)
Sections
83(2)
Partials
85(2)
Perfecting Your Templates
87(1)
Conclusion
88(1)
8 Form Handling
89(14)
Sending Client Data to the Server
89(1)
HTML Forms
90(1)
Encoding
91(1)
Different Approaches to Form Handling
91(2)
Form Handling with Express
93(2)
Using Fetch to Send Form Data
95(2)
File Uploads
97(3)
File Uploads with Fetch
99(1)
Improving File Upload UI
100(1)
Conclusion
100(3)
9 Cookies and Sessions
103(10)
Externalizing Credentials
105(1)
Cookies in Express
106(1)
Examining Cookies
107(1)
Sessions
107(3)
Memory Stores
108(1)
Using Sessions
109(1)
Using Sessions to Implement Flash Messages
110(2)
What to Use Sessions For
112(1)
Conclusion
112(1)
10 Middleware
113(8)
Middleware Principles
114(1)
Middleware Examples
115(3)
Common Middleware
118(2)
Third-Party Middleware
120(1)
Conclusion
120(1)
11 Sending Email
121(12)
SMTP, MS As, and MTAs
121(1)
Receiving Email
122(1)
Email Headers
122(1)
Email Formats
123(1)
HTML Email
123(1)
Nodemailer
124(3)
Sending Mail
125(1)
Sending Mail to Multiple Recipients
126(1)
Better Options for Bulk Email
127(1)
Sending HTML Email
127(4)
Images in HTML Email
127(1)
Using Views to Send HTML Email
128(2)
Encapsulating Email Functionality
130(1)
Conclusion
131(2)
12 Production Concerns
133(14)
Execution Environments
133(1)
Environment-Specific Configuration
134(2)
Running Your Node Process
136(1)
Scaling Your Website
137(6)
Scaling Out with App Clusters
138(2)
Handling Uncaught Exceptions
140(2)
Scaling Out with Multiple Servers
142(1)
Monitoring Your Website
143(1)
Third-Party Uptime Monitors
143(1)
Stress Testing
143(2)
Conclusion
145(2)
13 Persistence
147(26)
Filesystem Persistence
147(2)
Cloud Persistence
149(1)
Database Persistence
150(19)
A Note on Performance
151(1)
Abstracting the Database Layer
151(2)
Setting Up MongoDB
153(1)
Mongoose
154(1)
Database Connections with Mongoose
154(1)
Creating Schemas and Models
155(1)
Seeding Initial Data
156(2)
Retrieving Data
158(2)
Adding Data
160(2)
PostgreSQL
162(6)
Adding Data
168(1)
Using a Database for Session Storage
169(3)
Conclusion
172(1)
14 Routing
173(12)
Routes and SEO
175(1)
Subdomains
175(2)
Route Handlers Are Middleware
177(1)
Route Paths and Regular Expressions
178(1)
Route Parameters
179(1)
Organizing Routes
180(1)
Declaring Routes in a Module
181(1)
Grouping Handlers Logically
182(1)
Automatically Rendering Views
183(1)
Conclusion
184(1)
15 REST APIs and JSON
185(10)
JSON and XML
186(1)
Our API
186(1)
API Error Reporting
187(1)
Cross-Origin Resource Sharing
188(1)
Our Tests
189(2)
Using Express to Provide an API
191(1)
Conclusion
192(3)
16 Single-Page Applications
195(22)
A Short History of Web Application Development
195(3)
SPA Technologies
198(1)
Creating a React App
199(1)
React Basics
200(15)
The Home Page
202(2)
Routing
204(2)
Vacations Page---Visual Design
206(1)
Vacations Page---Server Integration
207(3)
Sending Information to the Server
210(2)
State Management
212(3)
Deployment Options
215(1)
Conclusion
215(2)
17 Static Content
217(8)
Performance Considerations
218(1)
Content Delivery Networks
219(1)
Designing for CDNs
220(1)
Server-Rendered Website
220(1)
Single-Page Applications
221(1)
Caching Static Assets
221(1)
Changing Your Static Content
222(1)
Conclusion
223(2)
18 Security
225(26)
HTTPS
225(8)
Generating Your Own Certificate
226(1)
Using a Free Certificate Authority
227(1)
Purchasing a Certificate
228(2)
Enabling HTTPS for Your Express App
230(1)
A Note on Ports
231(1)
HTTPS and Proxies
232(1)
Cross-Site Request Forgery
233(1)
Authentication
234(16)
Authentication Versus Authorization
234(1)
The Problem with Passwords
235(1)
Third-Party Authentication
236(1)
Storing Users in Your Database
236(2)
Authentication Versus Registration and the User Experience
238(1)
Passport
238(10)
Role-Based Authorization
248(1)
Adding Authentication Providers
249(1)
Conclusion
250(1)
19 Integrating with Third-Party APIs
251(16)
Social Media
251(7)
Social Media Plugins and Site Performance
251(1)
Searching for Tweets
252(3)
Rendering Tweets
255(3)
Geocoding
258(5)
Geocoding with Google
258(2)
Geocoding Your Data
260(2)
Displaying a Map
262(1)
Weather Data
263(2)
Conclusion
265(2)
20 Debugging
267(12)
The First Principle of Debugging
267(1)
Take Advantage of REPL and the Console
268(1)
Using Node's Built-in Debugger
269(1)
Node Inspector Clients
270(4)
Debugging Asynchronous Functions
274(1)
Debugging Express
274(3)
Conclusion
277(2)
21 Going Live
279(14)
Domain Registration and Hosting
279(11)
Domain Name System
280(1)
Security
281(1)
Top-Level Domains
281(1)
Subdomains
282(1)
Nameservers
283(2)
Hosting
285(2)
Deployment
287(3)
Conclusion
290(3)
22 Maintenance
293(10)
The Principles of Maintenance
293(7)
Have a Longevity Plan
293(2)
Use Source Control
295(1)
Use an Issue Tracker
295(1)
Exercise Good Hygiene
296(1)
Don't Procrastinate
296(1)
Do Routine QA Checks
296(1)
Monitor Analytics
297(1)
Optimize Performance
297(1)
Prioritize Lead Tracking
298(1)
Prevent "Invisible" Failures
299(1)
Code Reuse and Refactoring
300(2)
Private npm Registry
300(1)
Middleware
300(2)
Conclusion
302(1)
23 Additional Resources
303(8)
Online Documentation
303(1)
Periodicals
304(1)
Stack Overflow
304(2)
Contributing to Express
306(2)
Conclusion
308(3)
Index 311
Ethan Brown is the Director of Technology at VMS, where he is responsible for the architecture and implementation of VMSPro(R), cloud-based software for decision support, risk analysis, and creative ideation for large projects. He has over 20 years of programming experience, from embedded to the Web, and has embraced the JavaScript stack as the web platform of the future. He is author of the first edition of Web Development with Node and Express (O'Reilly).