RESTful Web API Design with Node.js - Second Edition
图书信息
| 作者 | Valentin Bojinov |
| 出版社 | Packt Publishing |
| ISBN | 9781786463203 |
| 出版时间 | 2016-05-26 |
| 字数 | 49.9万 |
| 分类 | 进口书,外文原版书,电脑,网络 |
读书简介
Design and implement efficient RESTful solutions with this practical hands-on guideAbout This Book·Create a fully featured RESTful API solution from scratch.·Learn how to leverage Node.JS, Express, MongoDB and NoSQL datastores to give an extra edge to your REST API design.·Use this practical guide to integrate MongoDB in your Node.js application.Who This Book Is ForThe ideal target audience for this book is web developers who have some experience with RESTful services. Familiarity with basic JavaScript programming techniques is required. No prior experience with Node.JS or Express.js is required.What You Will Learn·Install, develop, and test your own Node.js user modules·Comprehend the differences between an HTTP and a RESTful application·Optimize RESTful service URI routing with best practices·Eliminate third-party dependencies in your tests with mocking·Learn about NoSQL data stores and integrate MongoDB in your Node.js application with Mongoose·Secure your services with NoSQL database integration within Node.js applications·Enrich your development skills to create scalable, server-side, RESTful applications based on the Node.js platformIn DetailIn this era of cloud computing, every data provisioning solution is built in a scalable and fail-safe way. Thus, when building RESTful services, the right choice for the underlying platform is vital. Node.js, with its asynchronous, event-driven architecture, is exactly the right choice to build RESTful APIs.This book will help you enrich your development skills to create scalable, server-side, RESTful applications based on the Node.js platform.Starting with the fundamentals of REST, you will understand why RESTful web services are better data provisioning solution than other technologies. You will start setting up a development environment by installing Node.js, Express.js, and other modules. Next, you will write a simple HTTP request handler and create and test Node.js modules using automated tests and mock objects. You will then have to choose the most appropriate data storage type, having options between a key/value or document data store, and also you will implement automated tests for it. This module will evolve chapter by chapter until it turns into a full-fledged and secure Restful service.Style and approachCreate state of the art RESTful API solutions leveraging Node.JS 4.x.
目录
RESTful Web API Design with Node.js - Second Edition
RESTful Web API Design with Node.js - Second Edition
Credits
About the Author
About the Reviewer
www.PacktPub.com
eBooks, discount offers, and more
Why subscribe?
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. REST – What You Did Not Know
REST fundamentals
Principle 1 - everything is a resource
Principle 2 - each resource is identifiable by a unique identifier
Principle 3 - use the standard HTTP methods
Principle 4 - resources can have multiple representations
Principle 5 - communicate statelessly
The REST goals
Separation of the representation and the resource
Visibility
Reliability
Scalability and performance
Working with WADL
Taking advantage of the existing infrastructure
Summary
2. Getting Started with Node.js
Installing Node.js
Node Package Manager
Installing the Express framework and other modules
Setting up a development environment
Handling HTTP requests
Modularizing code
Testing Node.js
Working with mock objects
Deploying an application
Microsoft Azure
Nodejitsu
Self-test questions
Summary
3. Building a Typical Web API
Specifying the API
Implementing routes
Querying the API
Content negotiation
Cross-origin resource sharing
API versioning
Self-test questions
Summary
4. Using NoSQL Databases
Key/value store - LevelDB
Document store - MongoDB
Database modeling with Mongoose
Testing a Mongoose model with Mocha
Creating a user-defined model around a Mongoose model
Wiring up a NoSQL database module to Express
Content delivery network
Self-test questions
Summary
5. Implementing a Fully-Fledged RESTful Service
Extensibility and versioning
Working with arbitrary data
Linking
Implementing paging and filtering
Caching
Supplying the Cache-Control header in Express applications
Discovering and exploring RESTful services
Self-test questions
Summary
6. Keeping the Bad Guys Out
Authentication
Basic authentication
Passport
Passport's basic authentication strategy
Passport's third-party authentication strategies
Authorization
Transport Layer Security
Self-test questions
Summary
- 第11集 趋势定位:如何从消费市场往创业市场和资本市场转型(此商品为视频课程)(周导)
- Dead Cat Bounce(Green, Norman)
- 欧洲的转折(郭方)
- 一本书看懂电影之《公民凯恩》(张帆)
- Delphi Collected Poetical Works of John Gower (Illustrated)(John Gower)
- 数据资本论([美]阿莱克斯·彭特兰[美]亚历山大·利普顿 [美]托马斯·哈德乔诺)
- Gone With the Windsors(Laurie Graham)
- 做事先做人(李元秀 主编)
