Book description
Over 90 recipes to help you write clean code, solve common JavaScript problems, and work on popular use cases like SPAs, microservices, native mobile development with Node, React, React Native and Electron.
Key Features
- Over 90 practical recipes to help you write clean and maintainable JavaScript codes with the latest ES8
- Leverage the power of leading web frameworks like Node and React to build modern web apps
- Features comprehensive coverage of tools and techniques needed to create multi-platform apps with JavaScript
Book Description
JavaScript has evolved into a language that you can use on any platform. Modern JavaScript Web Development Cookbook is a perfect blend of solutions for traditional JavaScript development and modern areas that developers have lately been exploring with JavaScript. This comprehensive guide teaches you how to work with JavaScript on servers, browsers, mobile phones and desktops.
You will start by exploring the new features of ES8. You will then move on to learning the use of ES8 on servers (with Node.js), with the objective of producing services and microservices and dealing with authentication and CORS. Once you get accustomed to ES8, you will learn to apply it to browsers using frameworks, such as React and Redux, which interact through Ajax with services. You will then understand the use of a modern framework to develop the UI. In addition to this, development for mobile devices with React Native will walk you through the benefits of creating native apps, both for Android and iOS.
Finally, you'll be able to apply your new-found knowledge of server-side and client-side tools to develop applications with Electron.
What you will learn
- Use the latest features of ES8 and learn new ways to code with JavaScript
- Develop server-side services and microservices with Node.js
- Learn to do unit testing and to debug your code
- Build client-side web applications using React and Redux
- Create native mobile applications for Android and iOS with React Native
- Write desktop applications with Electron
Who this book is for
This book is for developers who want to explore the latest JavaScript features, frameworks, and tools for building complete mobile, desktop and web apps, including server and client-side code. You are expected to have working knowledge of JavaScript to get the most out of this book.
Table of contents
- Title Page
- Copyright and Credits
- Dedication
- www.PacktPub.com
- Contributors
- Preface
-
Working with JavaScript Development Tools
- Introduction
- Installing Visual Studio Code for development
- Extending Visual Studio Code
- Adding Fira Code font for better editing
- Adding npm for package management
- Doing version control with Git
- Formatting your source code with Prettier
- Documenting your code with JSDoc
- Adding code quality checks with ESLint
- Adding Flow for data types checks
- Using Modern JavaScript Features
-
Developing with Node
- Introduction
- Checking Node's setup
- Working with modules
- Using Flow with Node, directly
- Using Flow with Node through preprocessing
- Running your Node code with Nodemon
- Using promises instead of error first callbacks
- Working with streams to process requests
- Compressing files with streams
- Working with a database
- Executing external processes with exec()
- Using spawn() to run a command, and communicating with it
- Using fork() to run Node commands
-
Implementing RESTful Services with Node
- Introduction
- Developing a server with Express
- Adding middleware
- Getting request parameters
- Serving static files
- Adding routes
- Implementing secure connections
- Adding security safeguards with Helmet
- Implementing CORS
- Adding authentication with JWT
- Tying it all together – building a REST server
-
Testing and Debugging Your Server
- Introduction
- Adding logging with Winston
- Adding HTTP logging with Morgan
- Configuring your server for different environments
- Unit testing your code
- Measuring your test coverage
- Debugging your code
- Testing simple services from the command line
- Testing more complex sequences of calls with Postman
- Documenting and testing your REST API with Swagger
- Developing with React
-
Enhancing Your Application
- Introduction
- Adding SASS for separate styling
- Creating StyledComponents for inline styling
- Making your application responsive to screen sizes
- Making your application adaptive for enhanced usability
- Making a global application with internationalization and localization
- Setting up for accessibility (a11y)
- Expanding Your Application
- Debugging Your Application
- Testing Your Application
- Creating Mobile Apps with React Native
- Testing and Debugging Your Mobile App
- Creating a Desktop Application with Electron
- Other Books You May Enjoy
Product information
- Title: Modern JavaScript Web Development Cookbook
- Author(s):
- Release date: December 2018
- Publisher(s): Packt Publishing
- ISBN: 9781788992749
You might also like
book
Learning JavaScript Design Patterns
With Learning JavaScript Design Patterns, you’ll learn how to write beautiful, structured, and maintainable JavaScript by …
book
Hands-On JavaScript High Performance
An example-driven guide covering modern web app development techniques and emerging technologies such as WebAssembly, Service …
book
JavaScript Everywhere
JavaScript is the little scripting language that could. Once used chiefly to add interactivity to web …
book
Advanced JavaScript
Gain a deeper understanding of JavaScript and apply it to build small applications in backend, frontend, …