Book Image

Modern JavaScript Web Development Cookbook

By : Federico Kereki
Book Image

Modern JavaScript Web Development Cookbook

By: Federico Kereki

Overview of this book

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.
Table of Contents (15 chapters)

Testing and debugging your app

Now, we get to a common requirement: testing and debugging your app. The first thing I'll have to tell you is that there's no news in regards to testing! All the techniques we saw for testing browser and Node code still apply, since your Electron app is essentially just a browser app (albeit possibly with some extra functions) that you'll mock in the same way you did earlier, so there's nothing new to be learned here.

However, with regard to debugging, there will be some new requirements, since your code is not running in a browser. In a similar way as with React Native, we'll have to use some tools in order to be able to look into our code as it runs. Let's see, in this recipe, how to go about all of this.

How to do it....