万本电子书0元读

万本电子书0元读

顶部广告

Isomorphic JavaScript Web Development电子书

售       价:¥

52人正在读 | 0人评论 9.8

作       者:Tomas Alabes,Konstantin Tarkus

出  版  社:Packt Publishing

出版时间:2017-10-11

字       数:25.6万

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

温馨提示:此类商品不支持退换货,不支持下载打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Leverage the power of React and Node to build complete web applications in pure JavaScript About This Book ? Combine the ease of React in the front end with the power of Node at the back end to build robust apps in pure JavaScript ? Get your hands dirty by building on an entire application throughout the course of the book ? Become productive and save precious time by adopting isomorphic JavaScript programming techniques Who This Book Is For This book is ideally meant for intermediate web developers who are interested in building isomorphic applications using JavaScript. What You Will Learn ? Build on the client side with the awesomeness of React ? Style your application effectively ? Render the server side using React ? Implement a GraphQL server based on Node, Express, and SQL ? Fetch application data using Relay ? Build an isomorphic router to use in the application ? Deploy your application to a cloud host ? Secure your application with a solid token-based authentication system In Detail The latest trend in web development, Isomorphic JavaScript, allows developers to overcome some of the shortcomings of single-page applications by running the same code on the server as well as on the client. Leading this trend is React, which, when coupled with Node, allows developers to build JavaScript apps that are much faster and more SEO-friendly than single-page applications. This book begins by showing you how to develop frontend components in React. It will then show you how to bind these components to back-end web services that leverage the power of Node. You'll see how web services can be used with React code to offload and maintain the application logic. By the end of this book, you will be able to save a significant amount of development time by learning to combine React and Node to code fast, scalable apps in pure JavaScript. Style and approach This step-by-step, example-based guide will get you acquainted with using React for the front end as well as back-end development.
目录展开

Title Page

Copyright

Isomorphic JavaScript Web Development

Credits

About the Authors

About the Reviewer

www.PacktPub.com

Why subscribe?

Customer Feedback

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

Downloading the color images of this book

Errata

Piracy

Questions

Getting Started with Isomorphic Web Apps

What are isomorphic apps?

How to write isomorphic JavaScript code?

Introduction to React.js

Sample app description

What we need to get started

Installing project dependencies

The basic project structure

Creating the first react component

Rendering a React app on both client and server

How to run and test our app locally

Summary

Creating a Web UI with React

Component-based UI development

Stateful versus stateless React components

Grouping UI components in a project

Breaking the UI into a component hierarchy

Building a static version in React

Implementing a basic isomorphic router

Summary

Working with CSS and Media Assets

Inline styles in React components

Getting started with CSS modules

Getting started with PostCSS

Getting started with Webpack loaders

Configuring Webpack for images and CSS

Sharing common settings across multiple CSS files

Summary

Working with Browsersync and Hot Module Replacement

Getting started with Browsersync

How to install

Getting started with Hot Module Replacement

Summary

Rendering React Components on the Server

The core concepts of server-side rendering

Troubleshooting

Passing the component's state from server to client

Working with the React context

How to set the page title and meta tags

Working with third-party libraries

Fetching data from the server

Summary

Creating Data API with GraphQL

The Basics of GraphQL

GraphQL query language

The GraphQL type system

Implementing a GraphQL server with Node.js

Backing GraphQL server by a SQL data store

Batching and caching

Summary

Implementing Routing and Navigation

Pure server routing

Express routing

Pure client routing

Hash versus history API

React routing

React server rendering

Rendering a view

Passing the state to the application

Initial state

Using react-router-config

Using redux

Summary

Authentication and Authorization

Token-based authentication and cookies

Cookies

Token-based authentication

JSON Web Token (JWT)

Using jwt-simple

Server authentication

Sign up

JWT token claims

JWT token secret

Log in

Routing redirection

Authenticating high order component

Server-side authentication check

Log out

Summary

Testing and Deploying Your App

Tests and deployment

Tests

Unit testing React with Mocha, Sinon, Chai, jsdom, and Enzyme

Mocha

Chai

Sinon

Testing

Enzyme

Integration tests with Nightwatch

Deployment

Production best practices

Things to do in your code

Using gzip compression

Don’t use synchronous functions

Lock dependencies

Carry out logging correctly

Be stateless

Error handling

Things to do in your environment/setup

Set NODE_ENV to production

Ensure your app automatically restarts

Use an init system

Run your app in a cluster

Balancing between application instances using the cluster API

Use tools that automatically detect vulnerabilities

Use a load balancer

Use a reverse proxy

Deploying on a cloud platform

Heroku

Summary

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

发表评论

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

买过这本书的人还买过

读了这本书的人还在读

回顶部