Muutke küpsiste eelistusi

Node.js, MongoDB and Angular Web Development: The definitive guide to using the MEAN stack to build web applications 2nd edition [Pehme köide]

  • Formaat: Paperback / softback, 640 pages, kõrgus x laius x paksus: 229x178x30 mm, kaal: 1005 g
  • Sari: Developer's Library
  • Ilmumisaeg: 02-Feb-2018
  • Kirjastus: Addison Wesley
  • ISBN-10: 0134655532
  • ISBN-13: 9780134655536
Teised raamatud teemal:
  • Pehme köide
  • Hind: 59,94 €*
  • * saadame teile pakkumise kasutatud raamatule, mille hind võib erineda kodulehel olevast hinnast
  • See raamat on trükist otsas, kuid me saadame teile pakkumise kasutatud raamatule.
  • Kogus:
  • Lisa ostukorvi
  • Tasuta tarne
  • Lisa soovinimekirja
  • Formaat: Paperback / softback, 640 pages, kõrgus x laius x paksus: 229x178x30 mm, kaal: 1005 g
  • Sari: Developer's Library
  • Ilmumisaeg: 02-Feb-2018
  • Kirjastus: Addison Wesley
  • ISBN-10: 0134655532
  • ISBN-13: 9780134655536
Teised raamatud teemal:
Node.js, MongoDB and Angular Web Development

The definitive guide to using the MEAN stack to build web applications











Node.js is a leading server-side programming environment, MongoDB is the most popular NoSQL database, and Angular is the leading framework for MVC-based front-end development. Together, they provide an easy-to-implement, fully integrated web development stack that allows web programmers to create high-performance sites and applications built completely in JavaScript, from server to client.







Updated for Angular 2, Angular 4, and subsequent versions, this new edition of Node.js, MongoDB and Angular Web Development shows you how to integrate these three technologies into complete working solutions. It begins with concise, crystal-clear tutorials on each technology and then quickly moves on to building common web applications.







Youll learn how to use Node.js and MongoDB to build more scalable, high-performance sites, how to leverage Angulars innovative MVC approach to structure more effective pages and applications, and how to use all three together to deliver outstanding next-generation Web solutions.









Implement a highly scalable and dynamic web server using Node.js and Express Implement a MongoDB data store for your web applications Access and interact with MongoDB from Node.js JavaScript code Learn the basics of TypeScript Define custom Angular directives that extend the HTML language Build server-side web services in JavaScript Implement client-side services that can interact with the Node.js web server Build dynamic browser views that provide rich user interaction Add authenticated user accounts and nested comment components to your web applications and pages

Contents at a Glance

Part I: Getting Started

1 Introducing the Node.js-to-Angular Stack

2 JavaScript Primer

Part II: Learning Node.js

3 Getting Started with Node.js

4 Using Events, Listeners, Timers, and Callbacks in Node.js

5 Handling Data I/O in Node.js

6 Accessing the File System from Node.js

7 Implementing HTTP Services in Node.js

8 Implementing Socket Services in Node.js

9 Scaling Applications Using Multiple Processors in Node.js

10 Using Additional Node.js Modules

Part III: Learning MongoDB

11 Understanding NoSQL and MongoDB

12 Getting Started with MongoDB

13 Getting Started with MongoDB and Node.js

14 Manipulating MongoDB Documents from Node.js

15 Accessing MongoDB from Node.js

16 Using Mongoose for Structured Schema and Validation

17 Advanced MongoDB Concepts

Part IV: Using Express to Make Life Easier

18 Implementing Express in Node.js

19 Implementing Express Middleware

Part V: Learning Angular

20 Jumping into TypeScript

21 Getting Started with Angular

22 Angular Components

23 Expressions

24 Data Binding

25 Built-in Directives

Part VI: Advanced Angular

26 Custom Directives

27 Events and Change Detection

28 Implementing Angular Services in Web Applications

29 Creating Your Own Custom Angular Services





30 Having Fun with Angular
Introduction 1(6)
I: Getting Started
1 Introducing the Node.js-to-Angular Stack
7(8)
Understanding the Basic Web Development Framework
7(4)
User
8(1)
Browser
8(2)
Webserver
10(1)
Backend Services
10(1)
Understanding the Node.js-to-Angular Stack Components
11(3)
Node.js
11(1)
MongoDB
12(1)
Express
13(1)
Angular
13(1)
Summary
14(1)
Next
14(1)
2 JavaScript Primer
15(24)
Defining Variables
15(1)
Understanding JavaScript Data Types
16(1)
Using Operators
17(4)
Arithmetic Operators
17(1)
Assignment Operators
18(1)
Applying Comparison and Conditional Operators
18(3)
Implementing Looping
21(3)
while Loops
21(1)
do/while Loops
22(1)
for Loops
22(1)
for/in Loops
23(1)
Interrupting Loops
23(1)
Creating Functions
24(2)
Defining Functions
24(1)
Passing Variables to Functions
24(1)
Returning Values from Functions
25(1)
Using Anonymous Functions
25(1)
Understanding Variable Scope
26(1)
Using JavaScript Objects
27(2)
Using Object Syntax
27(1)
Creating Custom-Defined Objects
28(1)
Using a Prototyping Object Pattern
29(1)
Manipulating Strings
29(3)
Combining Strings
31(1)
Searching a String for a Substring
31(1)
Replacing a Word in a String
31(1)
Splitting a String into an Array
32(1)
Working with Arrays
32(3)
Combining Arrays
33(1)
Iterating Through Arrays
34(1)
Converting an Array into a String
34(1)
Checking Whether an Array Contains an Item
34(1)
Adding and Removing Items to Arrays
34(1)
Adding Error Handling
35(2)
try/catch Blocks
35(1)
Throw Your Own Errors
36(1)
Using finally
36(1)
Summary
37(1)
Next
37(2)
II: Learning Node.js
3 Getting Started with Node.js
39(16)
Understanding Node.js
39(3)
Who Uses Node.js?
40(1)
What Is Node.js Used For?
40(1)
What Does Node.js Come With?
40(2)
Installing Node.js
42(1)
Looking at the Node.js Install Location
42(1)
Verify Node.js Executables
42(1)
Selecting a Node.js IDE
43(1)
Working with Node Packages
43(5)
What Are Node Packaged Modules?
43(1)
Understanding the Node Package Registry
43(1)
Using the Node Package Manager
44(1)
Searching for Node Package Modules
45(1)
Installing Node Packaged Modules
46(1)
Usingpackage.json
47(1)
Creating a Node.js Application
48(5)
Creating a Node.js Packaged Module
49(1)
Publishing a Node.js Packaged Module to the NPM Registry
50(2)
Using a Node.js Packaged Module in a Node.js Application
52(1)
Writing Data to the Console
53(1)
Summary
54(1)
Next
54(1)
4 Using Events, Listeners, Timers, and Callbacks in Node.js
55(18)
Understanding the Node.js Event Model
55(4)
Comparing Event Callbacks and Threaded Models
55(2)
Blocking I/O in Node.js
57(1)
The Conversation Example
57(2)
Adding Work to the Event Queue
59(8)
Implementing Timers
60(3)
Using nextTick to Schedule Work
63(1)
Implementing Event Emitters and Listeners
64(3)
Implementing Callbacks
67(4)
Passing Additional Parameters to Callbacks
67(1)
Implementing Closure in Callbacks
68(2)
Chaining Callbacks
70(1)
Summary
71(1)
Next
71(2)
5 Handling Data I/O in Node.js
73(22)
Working with JSON
73(1)
Converting JSON to JavaScript Objects
74(1)
Converting JavaScript Objects to JSON
74(1)
Using the Buffer Module to Buffer Data
74(7)
Understanding Buffered Data
75(1)
Creating Buffers
75(1)
Writing to Buffers
76(1)
Reading from Buffers
77(1)
Determining Buffer Length
78(1)
Copying Buffers
79(1)
Slicing Buffers
80(1)
Concatenating Buffers
81(1)
Using the Stream Module to Stream Data
81(10)
Readable Streams
82(2)
Writable Streams
84(2)
Duplex Streams
86(2)
Transform Streams
88(1)
Piping Readable Streams to Writable Streams
89(2)
Compressing and Decompressing Data with Zlib
91(2)
Compressing and Decompressing Buffers
91(1)
Compressing/Decompressing Streams
92(1)
Summary
93(1)
Next
93(2)
6 Accessing the File System from Node.js
95(20)
Synchronous Versus Asynchronous File System Calls
95(1)
Opening and Closing Files
96(1)
Writing Files
97(5)
Simple File Write
98(1)
Synchronous File Writing
98(1)
Asynchronous File Writing
99(2)
Streaming File Writing
101(1)
Reading Files
102(4)
Simple File Read
102(1)
Synchronous File Reading
103(1)
Asynchronous File Reading
104(1)
Streaming File Reading
105(1)
Other File System Tasks
106(7)
Verifying Path Existence
106(1)
Getting File Info
107(1)
Listing Files
108(2)
Deleting Files
110(1)
Truncating Files
110(1)
Making and Removing Directories
111(1)
Renaming Files and Directories
112(1)
Watching for File Changes
112(1)
Summary
113(1)
Next
113(2)
7 Implementing HTTP Services in Node.js
115(24)
Processing URLs
115(2)
Understanding the URL Object
116(1)
Resolving the URL Components
117(1)
Processing Query Strings and Form Parameters
117(1)
Understanding Request, Response, and Server Objects
118(7)
The http.ClientRequest Object
118(3)
The http.ServerResponse Object
121(1)
The http.IncomingMessage Object
122(1)
The http.Server Object
123(2)
Implementing HTTP Clients and Servers in Node.js
125(9)
Serving Static Files
125(2)
Implementing Dynamic GET Servers
127(3)
Implementing POST Servers
130(2)
Interacting with External Sources
132(2)
Implementing HTTPS Servers and Clients
134(3)
Creating an HTTPS Client
135(2)
Creating an HTTPS Server
137(1)
Summary
137(1)
Next
137(2)
8 Implementing Socket Services in Node.js
139(20)
Understanding Network Sockets
139(1)
Understanding TPC Server and Socket Objects
140(7)
The net.Socket Object
140(4)
The net.Server Object
144(3)
Implementing TCP Socket Servers and Clients
147(5)
Implementing a TCP Socket Client
147(3)
Implementing a TCP Socket Server
150(2)
Implementing TLS Servers and Clients
152(5)
Creating a TLS Socket Client
153(1)
Creating a TLS Socket Server
154(3)
Summary
157(1)
Next
157(2)
9 Scaling Applications Using Multiple Processors in Node.js
159(22)
Understanding the Process Module
159(5)
Understanding Process I/O Pipes
159(1)
Understanding Process Signals
160(1)
Controlling Process Execution with the process Module
161(1)
Getting Information from the process Module
161(3)
Implementing Child Processes
164(10)
Understanding the ChildProcess Object
164(2)
Executing a System Command on Another Process Using exec ( )
166(2)
Executing an Executable File on Another Process Using execFile ()
168(1)
Spawning a Process in Another Node.js Instance Using spawn ( )
169(2)
Implementing Child Forks
171(3)
Implementing Process Clusters
174(5)
Using the Cluster Module
174(1)
Understanding the Worker Object
175(1)
Implementing an HTTP Cluster
176(3)
Summary
179(1)
Next
179(2)
10 Using Additional Node.js Modules
181(10)
Using the os Module
181(2)
Using the util Module
183(3)
Formatting Strings
183(1)
Checking Object Types
184(1)
Converting JavaScript Objects to Strings
184(1)
Inheriting Functionality from Other Objects
185(1)
Using the dns Module
186(2)
Using the crypto Module
188(2)
Other Node Modules and Objects
190(1)
Summary
190(1)
Next
190(1)
III: Learning MongoDB
11 Understanding NoSQL and MongoDB
191(10)
Why NoSQL?
191(1)
Understanding MongoDB
192(1)
Understanding Collections
192(1)
Understanding Documents
192(1)
MongoDB Data Types
193(1)
Planning Your Data Model
194(6)
Normalizing Data with Document References
195(1)
Denormalizing Data with Embedded Documents
196(1)
Using Capped Collections
197(1)
Understanding Atomic Write Operations
198(1)
Considering Document Growth
198(1)
Identifying Indexing, Sharding, and Replication Opportunities
198(1)
Large Collections Versus Large Numbers of Collections
199(1)
Deciding on Data Life Cycles
199(1)
Considering Data Usability and Performance
200(1)
Summary
200(1)
Next
200(1)
12 Getting Started with MongoDB
201(20)
Building the MongoDB Environment
201(5)
Installing MongoDB
201(1)
Starting MongoDB
202(1)
Stopping MongoDB
203(1)
Accessing MongoDB from the Shell Client
203(3)
Administering User Accounts
206(3)
Listing Users
206(1)
Creating User Accounts
207(2)
Removing Users
209(1)
Configuring Access Control
209(2)
Creating a User Administrator Account
209(1)
Turning on Authentication
210(1)
Creating a Database Administrator Account
211(1)
Administering Databases
211(3)
Displaying a List of Databases
211(1)
Changing the Current Database
212(1)
Creating Databases
212(1)
Deleting Databases
212(1)
Copying Databases
213(1)
Managing Collections
214(5)
Displaying a List of Collections in a Database
214(1)
Creating Collections
214(1)
Deleting Collections
215(1)
Finding Documents in a Collection
216(1)
Adding Documents to a Collection
217(1)
Deleting Documents in a Collection
217(1)
Updating Documents in a Collection
218(1)
Summary
219(1)
Next
219(2)
13 Getting Started with MongoDB and Node.js
221(20)
Adding the MongoDB Driver to Node.js
221(1)
Connecting to MongoDB from Node.js
222(4)
Understanding the Write Concern
222(1)
Connecting to MongoDB from Node.js Using the MongoClient Object
223(3)
Understanding the Objects Used in the MongoDB Node.js Driver
226(7)
Understanding the Db Object
227(2)
Understanding the Admin Object
229(1)
Understanding the Collection Object
229(3)
Understanding the Cursor Object
232(1)
Accessing and Manipulating Databases
233(4)
Listing Databases
233(1)
Creating a Database
234(1)
Deleting a Database
234(1)
Creating, Listing, and Deleting Databases Example
234(2)
Getting the Status of the MongoDB Server
236(1)
Accessing and Manipulating Collections
237(3)
Listing Collections
237(1)
Creating Collections
237(1)
Deleting Collections
238(1)
Collection Creation, Listing, and Deleting Example
238(1)
Getting Collection Information
239(1)
Summary
240(1)
Next
240(1)
14 Manipulating MongoDB Documents from Node.js
241(20)
Understanding Database Change Options
241(1)
Understanding Database Update Operators
242(2)
Adding Documents to a Collection
244(2)
Getting Documents from a Collection
246(2)
Updating Documents in a Collection
248(2)
Atomically Modifying Documents in a Collection
250(2)
Saving Documents in a Collection
252(1)
Upserting Documents in Collection
253(2)
Deleting Documents from a Collection
255(2)
Removing a Single Document from a Collection
257(2)
Summary
259(1)
Next
259(2)
15 Accessing MongoDB from Node.js
261(30)
Introducing the Data Set
261(1)
Understanding Query Objects
262(2)
Understanding Query Options Objects
264(1)
Finding Specific Sets of Documents
265(3)
Counting Documents
268(2)
Limiting Result Sets
270(5)
Limiting Results by Size
270(1)
Limiting Fields Returned in Objects
271(2)
Paging Results
273(2)
Sorting Result Sets
275(1)
Finding Distinct Field Values
276(1)
Grouping Results
277(5)
Applying MapReduce by Aggregating Results
282(7)
Understanding the aggregate ( ) Method
283(1)
Using Aggregation Framework Operators
283(2)
Implementing Aggregation Expression Operators
285(2)
Aggregation Examples
287(2)
Summary
289(1)
Next
289(2)
16 Using Mongoose for Structured Schema and Validation
291(36)
Understanding Mongoose
291(1)
Additional Objects
292(1)
Connecting to a MongoDB Database Using Mongoose
292(2)
Defining a Schema
294(4)
Understanding Paths
294(1)
Creating a Schema Definition
294(1)
Adding Indexes to a Schema
295(1)
Implementing Unique Fields
296(1)
Forcing Required Fields
296(1)
Adding Methods to the Schema Model
296(1)
Implementing the Schema on the Words Database
297(1)
Compiling a Model
298(1)
Understanding the Query Object
298(6)
Setting the Query Database Operation
299(2)
Setting the Query Database Operation Options
301(1)
Setting the Query Operators
302(2)
Understanding the Document Object
304(1)
Finding Documents Using Mongoose
305(2)
Adding Documents Using Mongoose
307(2)
Updating Documents Using Mongoose
309(5)
Saving Document Changes
310(1)
Updating a Single Document
311(2)
Updating Multiple Documents
313(1)
Removing Documents Using Mongoose
314(3)
Removing a Single Document
314(1)
Removing Multiple Documents
315(2)
Aggregating Documents Using Mongoose
317(3)
Using the Validation Framework
320(2)
Implementing Middleware Functions
322(3)
Summary
325(1)
Next
325(2)
17 Advanced MongoDB Concepts
327(16)
Adding Indexes
327(3)
Using Capped Collections
330(1)
Applying Replication
330(4)
Replication Strategy
332(1)
Deploying a Replica Set
333(1)
Implementing Sharding
334(7)
Sharding Server Types
335(1)
Choosing a Shard Key
336(1)
Selecting a Partitioning Method
337(1)
Deploying a Sharded MongoDB Cluster
338(3)
Repairing a MongoDB Database
341(1)
Backing Up MongoDB
341(1)
Summary
342(1)
Next
342(1)
IV: Using Express to Make Life Easier
18 Implementing Express in Node.js
343(24)
Getting Started with Express
343(2)
Configuring Express Settings
343(2)
Starting the Express Server
345(1)
Configuring Routes
345(5)
Implementing Routes
346(1)
Applying Parameters in Routes
347(3)
Using Requests Objects
350(2)
Using Response Objects
352(8)
Setting Headers
352(1)
Setting the Status
353(1)
Sending Response
353(2)
Sending JSON Responses
355(1)
Sending Files
356(3)
Sending a Download Response
359(1)
Redirecting the Response
359(1)
Implementing a Template Engine
360(5)
Defining the Engine
360(1)
Adding Locals
361(1)
Creating Templates
361(2)
Rendering Templates in a Response
363(2)
Summary
365(1)
Next
365(2)
19 Implementing Express Middleware
367(16)
Understanding Middleware
367(2)
Assigning Middleware Globally to a Path
368(1)
Assigning Middleware to a Single Route
368(1)
Adding Multiple Middleware Functions
369(1)
Using the query Middleware
369(1)
Serving Static Files
369(2)
Handling POST Body Data
371(2)
Sending and Receiving Cookies
373(1)
Implementing Sessions
374(1)
Applying Basic HTTP Authentication
375(2)
Implementing Session Authentication
377(3)
Creating Custom Middleware
380(1)
Summary
381(1)
Next
382(1)
V: Learning Angular
20 Jumping into TypeScript
383(8)
Learning the Different Types
383(2)
Understanding Interfaces
385(1)
Implementing Classes
386(1)
Class Inheritance
387(1)
Implementing Modules
387(1)
Understanding Functions
388(1)
Summary
389(1)
Next
389(2)
21 Getting Started with Angular
391(12)
Why Angular?
391(1)
Understanding Angular
391(2)
Modules
392(1)
Directives
392(1)
Data Binding
392(1)
Dependency Injection
392(1)
Services
393(1)
Separation of Responsibilities
393(1)
Adding Angular to Your Environment
393(1)
Using the Angular CLI
394(1)
Generating Content with the CLI
394(1)
Creating a Basic Angular Application
395(7)
Creating Your First Angular App
396(1)
Understanding and Using NgModule
397(1)
Creating the Angular Bootstrapper
398(4)
Summary
402(1)
Next
402(1)
22 Angular Components
403(12)
Component Configuration
403(1)
Defining a Selector
404(1)
Building a Template
404(3)
Using Inline CSS and HTML in Angular Applications
405(2)
Using Constructors
407(1)
Using External Templates
408(2)
Injecting Directives
410(4)
Building a Nested Component with Dependency Injection
410(2)
Passing in Data with Dependency Injection
412(1)
Creating an Angular Application that Uses Inputs
413(1)
Summary
414(1)
Next
414(1)
23 Expressions
415(14)
Using Expressions
415(7)
Using Basic Expressions
416(2)
Interacting with the Component Class in Expressions
418(1)
Using TypeScript in Angular Expressions
419(3)
Using Pipes
422(4)
Using Built-in Pipes
424(2)
Building a Custom Pipe
426(2)
Creating a Custom Pipe
427(1)
Summary
428(1)
Next
428(1)
24 Data Binding
429(12)
Understanding Data Binding
429(11)
Interpolation
430(1)
Property Binding
431(2)
Attribute Binding
433(1)
Class Binding
433(2)
Style Binding
435(1)
Event Binding
436(3)
Two-Way Binding
439(1)
Summary
440(1)
Next
440(1)
25 Built-in Directives
441(8)
Understanding Directives
441(1)
Using Built-in Directives
441(7)
Components Directives
442(1)
Structural Directives
442(3)
Attribute Directives
445(3)
Summary
448(1)
Next
448(1)
VI: Advanced Angular
26 Custom Directives
449(8)
Creating a Custom Attribute Directive
449(3)
Creating a Custom Directive with a Component
452(4)
Summary
456(1)
Next
456(1)
27 Events and Change Detection
457(12)
Using Browser Events
457(1)
Emitting Custom Events
458(6)
Emitting a Custom Event to the Parent Component Hierarchy
458(1)
Handling Custom Events with a Listener
458(1)
Implementing Custom Events in Nested Components
458(3)
Deleting Data in a Parent Component from a Child Component
461(3)
Using Observables
464(4)
Creating an Observable Object
464(1)
Watching for Data Changes with Observables
465(3)
Summary
468(1)
Next
468(1)
28 Implementing Angular Services in Web Applications
469(34)
Understanding Angular Services
469(1)
Using the Built-in Services
469(1)
Sending HTTP GET and PUT Requests with the http Service
470(5)
Configuring the HTTP Request
471(1)
Implementing the HTTP Response Callback Functions
471(1)
Implementing a Simple JSON File and Using the http Service to Access It
472(3)
Implementing a Simple Mock Server Using the http Service
475(11)
Implementing a Simple Mock Server and Using the http Service to Update Items on the Server
481(5)
Changing Views with the router Service
486(2)
Using routes in Angular
488(1)
Implementing a Simple Router
488(4)
Implementing a Router with a Navigation Bar
492(5)
Implementing a Router with Parameters
497(4)
Summary
501(1)
Next
501(2)
29 Creating Your Own Custom Angular Services
503(22)
Integrating Custom Services into Angular Applications
503(2)
Adding an Angular Service to an Application
504(1)
Implementing a Simple Application that Uses a Constant Data Service
505(1)
Implementing a Data Transform Service
506(4)
Implementing a Variable Data Service
510(5)
Implementing a Service that Returns a Promise
515(1)
Implementing a Shared Service
516(7)
Summary
523(1)
Next
523(2)
30 Having Fun with Angular
525(24)
Implementing an Angular Application that Uses the Animation Service
525(5)
Implementing an Angular Application that Zooms in on Images
530(3)
Implementing an Angular Application that Enables Drag and Drop
533(6)
Implementing a Star Rating Angular Component
539(8)
Summary
547(2)
Index 549
Brad Dayley is a senior software engineer with more than 20 years of experience developing enterprise applications and web interfaces. He has used JavaScript and jQuery for years and is the author of Learning Angular, jQuery and JavaScript Phrasebook and Sams Teach Yourself AngularJS, JavaScript, and jQuery All in One. He has designed and implemented a wide array of applications and services, from application servers to complex web applications.







Brendan Dayley is a web application developer who loves learning and implementing the latest and greatest technologies. He is the co-author of Learning Angular and Sams Teach Yourself AngularJS, JavaScript, and jQuery All in One. He has written a number of web applications using JavaScript, TypeScript, and Angular, and he is exploring the capabilities of new web and mobile technologies such as augmented reality and how to use them for innovative solutions.







Caleb Dayley is a university student studying computer science. He tries to learn all that he can and has taught himself much of what he knows about programming. He has taught himself several languages, including JavaScript, C#, and, using the first edition of this book, NodeJS, MongoDB and Angular. He is excited for what the future holds, and the opportunities to help design and create the next generation of innovative software that will continue to improve the way we live, work, and play.