You are currently in PREVIEW mode

Buy this book or become a member for full access.


Full Stack JavaScript Development with MEAN

and

Full Stack JavaScript Development with MEAN

Full Stack JavaScript Development with MEAN

by Adam Bretz and Colin J. Ihrig
Product Manager: Simon Mackie
Technical Editor: Don Nguyen
English Editor: Kelly Steele
Cover Designer: Alex Walker

Notice of Rights

All rights reserved. No part of this book may be reproduced, stored in a retrieval system or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embodied in critical articles or reviews.

Notice of Liability

The author and publisher have made every effort to ensure the accuracy of the information herein. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors and SitePoint Pty. Ltd., nor its dealers or distributors will be held liable for any damages to be caused either directly or indirectly by the instructions contained in this book, or by the software or hardware products described herein.

Trademark Notice

Rather than indicating every occurrence of a trademarked name as such, this book uses the names only in an editorial fashion and to the benefit of the trademark owner with no intention of infringement of the trademark.

Published by SitePoint Pty. Ltd.

48 Cambridge Street Collingwood
VIC Australia 3066

Web: www.sitepoint.com
Email: business@sitepoint.com
Table of Contents
About the Authors
Preface
Who Should Read This Book
Conventions Used
Supplementary Materials
Want to Take Your Learning Further?
1. Introduction
The Rise of Full-stack JavaScript
Summary
2. Node.js Introduction
Familiarity with JavaScript
The Problem with I/O
Your First Node.js Server
Summary
3. Modules and npm
npm
package.json
The node_modules Folder
require()
Writing a Module
Summary
4. Node’s Programming Model
The Event Loop
Asynchronous Coding
Callback Functions
Event Emitters
Listening for Events
Exception Handling
Promises
Summary
5. Core Modules
Command Line Arguments
Working with the File System
The Current Working Directory
Streams
Web Programming
Summary
6. Building the Node Server
Server Plan
Structuring the Application
Getting Started
Routing
Database Module
Querying the Database
Response Generator
Putting It Back Together
Summary
7. MongoDB Introduction
NoSQL Databases
History of MongoDB
Installing MongoDB Locally
Cloud Hosting
The MongoDB Shell
Summary
8. Interacting with MongoDB Using Mongoose
Mongoose Node Module
Summary
9. Using MongoDB and Mongoose in Our Sample App
Adding Mongoose Models
Populating the Database
Accessing the Database
Summary
10. Alternatives to Mongo
Relational Databases and SQL
The mysql Module
Connecting to a Database
Closing Connections
Executing Queries
Summary
11. Introduction to Express
The Building Blocks of Express
Putting It Together
Generating an Express App
Summary
12. Architecture of an Express Application
Starting the Server
app.js
Router Object
Exercise
Summary
13. Using Express in Our App
Updates to package.json
The npm start Script
Defining Routes
Update index.js
Summary
14. Alternative Server Frameworks
hapi Overview
Express Comparison
Summary
15. AngularJS Overview
Single-page Applications
Model-View-Controller Architecture
Getting Angular
Angular "Hello World"
Summary
16. Data Binding
One-Way Data Binding
Two-Way Data Binding
Technical Overview
Simple Controllers
Data Binding with Lists
Summary
17. Angular Directives
Overview
Creating Directives
Summary
18. Controllers
Syntax
Dependencies
Expanding on Our Example
Simple Service
Summary
19. Client-side Routing
Getting Started with ngRoute
Application Overview
Code
Summary
20. Angular in Our App
The Home Page
app.js
Template Files
Summary
21. Task Runners
Introducing Gulp
Setting Up Gulp
Designing a Gulp File
Summary
22. Debugging
The debugger Statement
Node’s Debugger
node-inspector
Summary
23. Testing
Testing Node
Testing Angular
Summary

Have your say! or become a member now to take part in the discussion

Loading...

Code Archive

Save time, download the code archive here