万本电子书0元读

万本电子书0元读

顶部广告

JavaScript and JSON Essentials电子书

售       价:¥

9人正在读 | 0人评论 6.2

作       者:Bruno Joseph D'mello,Sai Srinivas Sriparasa

出  版  社:Packt Publishing

出版时间:2018-04-23

字       数:23.9万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Use JSON for building web applications with technologies like HTML, JavaScript, Angular, Node.js, Hapi.js, Kafka, socket.io, MongoDB, Gulp.js, and handlebar.js, and others formats like GEOJSON, JSON-LD, MessagePack, and BSON. About This Book ? Use JSON with trending technologies like Angular, Hapi.js, MongoDB, Kafka, and Socket.io ? Debug, validate, and format JSON using developer toolkits, JSONLint, and JSON Editor Online ? Explore other JSON formats like GeoJSON, JSON-LD, BSON, and MessagePack Who This Book Is For If you’re a web developer with a basic understanding of JavaScript and want to write JSON data, integrate it with RESTful APIs to create faster and scalable applications, this book is for you. What You Will Learn ? Use JSON to store metadata for dependency managers, package managers, configuration managers, and metadata stores ? Handle asynchronous behavior in applications using callbacks, promises, generators, and async-await functions ? Use JSON for Angular 5, Node.js, Gulp.js, and Hapi.js ? Implement JSON as BSON in MongoDB ? Make use of JSON in developing automation scripts ? Implement JSON for realtime using socket.io and distributed systems using Kafka In Detail JSON is an established and standard format used to exchange data. This book shows how JSON plays different roles in full web development through examples. By the end of this book, you'll have a new perspective on providing solutions for your applications and handling their complexities. After establishing a strong basic foundation with JSON, you'll learn to build frontend apps by creating a carousel. Next, you'll learn to implement JSON with Angular 5, Node.js, template embedding, and composer.json in PHP. This book will also help you implement Hapi.js (known for its JSON-configurable architecture) for server-side scripting. You'll learn to implement JSON for real-time apps using Kafka, as well as how to implement JSON for a task runner, and for MongoDB BSON storage. The book ends with some case studies on JSON formats to help you sharpen your creativity by exploring futuristic JSON implementations. By the end of the book, you'll be up and running with all the essential features of JSON and JavaScript and able to build fast, scalable, and efficient web applications. Style and approach JavaScript and JSON Essentials, Second Edition, takes you on a fast-paced, hands-on journey through building lightweight, scalable and faster web applications with JSON.
目录展开

Title Page

Copyright and Credits

JavaScript and JSON Essentials Second Edition

Dedication

Packt Upsell

Why subscribe?

PacktPub.com

Contributors

About the authors

About the reviewers

Packt is searching for authors like you

Preface

Who this book is for

What this book covers

To get the most out of this book

Download the example code files

Download the color images

Conventions used

Get in touch

Reviews

Getting Started with JSON

JSON, a data exchange format

The Hello World program with JSON

How is JSON stored in memory?

Datatypes in JSON

Languages that support JSON

JSON implementation in PHP

JSON implementation in Python

Summary

The JSON Structures

Inserting external JavaScript

Accessing objects in JSON

Performing complex operations

Modifying JSON

Summary

AJAX Requests with JSON

Basic web operations

Synchronous vs. asynchronous

Requirements for AJAX

Setting up a node.js server

Hosting JSON

Making your first AJAX call

Traditional callbacks

Handling asynchronousity using a promise

New ECMAScript generators

Parsing JSON data

Summary

Cross-Domain Asynchronous Requests

The API story

Making GET and POST AJAX calls with JSON data

The problem with cross-domain AJAX calls

Introduction to JSONP

Implementation at server-side

Implementing JSONP at client-side (browsers)

Summary

Debugging JSON

Using the developer tools

Validating JSON

Formatting JSON

Summary

Building the Carousel Application

Setting up the Carousel application

Building the JSON file for the Carousel application

Creating the Carousel application with jQuery Cycle

Introducing Bootstrap

Setting up Bootstrap

Bootstrap responsiveness and styles

Summary

Alternate Implementations of JSON

Dependency management

Using composer.json in PHP

Node.js using the package.json registry

JSON for storing application configurations

Configuration in PHP and Python

Configuration in frontend frameworks – Angular 5

Linting with tslint.json

Configuring TypeScript using tsconfig.json

Using package.json and package-lock.json files

Using the angular-cli.json file

JSON for storing application metadata

Metadata in Angular 5

Constants in Node.js

Template embedding

Comparisons with YAML

Summary

Introduction to hapi.js

Basic server setup using JSON

Using JSON metadata and constants

Configuring API using JSON

Configuring a plugin in hapi

Testing the APIs using POSTMAN

Testing hapi server APIs using POSTMAN

JSON beneath POSTMAN

Summary

Storing JSON Documents in MongoDB

Setting up MongoDB

Connecting the hapi app with MongoDB

JSON versus BSON

Collections

MongoDB shell

Inserting a JSON document

Retrieving a JSON document

JSON-based schemas in MongoDB

Summary

Configuring the Task Runner Using JSON

What is a task runner?

Introducing gulp.js

Creating tasks in gulp.js

Writing a unit test

Automation testing

Gulp JSON configuration

Summary

JSON for Real-Time and Distributed Data

Using JSON with Socket.IO

Designing the board

Setting up the Socket.IO server

How Socket.IO works

Setting up the Socket.IO client

Using JSON with Apache Kafka

Setting up Apache Kafka

Implementing Kafka with a Socket.IO application

Implementing the Kafka consumer

Summary

Case Studies in JSON

GeoJSON – a geospatial JSON data format

JSONLD – a JSON format for SEO

BSON – a fast-traversal JSON format

Better compressions with messagePack

Summary

Other Books You May Enjoy

Leave a review - let other readers know what you think

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部