Systems | Development | Analytics | API | Testing

JavaScript

A Beginner's Guide To Test Automation With Javascript (Nightwatch.js). Part 1.

Welcome to the “A beginners guide to test automation with Javascript(Nightwatch.js)”! This is a three-part blog series to kick start writing web UI automation using Nightwatch.js. In the following parts you will learn: Sounds exciting? Let’s get started! Writing a script in JavaScript (JS) and Nightwatch.js, aka Nightwatch (NW), is simple once you get started and this guide will help anyone regardless of their skill level.

Server-side Rendering in JavaScript: A Modern Approach

Let’s talk about SPAs. It all starts from a blank page which is subsequently filled with HTML and JavaScript. If we take PHP pages as an example, they already come bundled with the server, which is an advantage in terms of performance, right? For situations like these, server-side rendering frameworks (such as Next.js) come to the rescue. They process the code on the server-side to pre-fill the HTML result page with something (if not the whole page) before it reaches the browser.

How to Use the Javascript Debugger

As developers, we’ve traditionally rooted out errors in our programs (we’ll call them bugs from now on if that’s ok) by using meaningful log statements. JavaScript has the famous console.log() method for that. But while log statements are good, they are less efficient than a tool that enables you to carry out step-by-step debugging. So in this article, we will learn how to use Google Chrome developer tools (also known as DevTools) to debug any JavaScript application effortlessly.

The Best Tools for Building Progressive Web Apps

The year 2015 was marked by a new paradigm shift in web development. Google introduced Progressive Web Applications and JavaScript libraries and frameworks, such as React.js, Angular.js or Vue.js, created new development methodologies. By 2020, the web environment is flooded with PWAs based on reactive programming and built with cutting-edge frameworks.

JavaScript Internals: Garbage Collection

Garbage collection (GC) is a very important process for all programming languages, whether it’s done manually (in low-level languages like C), or automatically. The curious thing is that most of us barely stop to think about how JavaScript — which is a programming language, and hence, needs to GC — does the trick. Like the majority of high-level languages, JavaScript allocates its objects and values to memory and releases them when they’re no longer needed. But, how?

Asynchronous Javascript: From Promises to Async/Await

Javascript is a funny language. It claims to be (and very much is) a single-threaded language (i.e., it executes statements in order, one at a time, one after another, in a synchronous fashion). Despite just having the one native thread to work with, it somehow allows you to write concurrent, asynchronous code that is non-blocking in nature.

Robust JavaScript Error Handling. Learn About JavaScript Errors

By combining custom errors, named functions and Bugfender, you can create a robust error-handling process that allows you to immediately identify the defects of your JavaScript apps. Unhandled JavaScript errors will stop the execution of your script, leaving the application in an undesired state – or, even worse, in an unknown state. So you need a robust error-handling process to avoid unknown errors in your apps. But, why are errors thrown anyway?

Angular: How to Use Virtual Scroll With a Flat Tree?

While developing Kraken’s frontend I quickly stumbled upon performance issues with Angular Material tree when too many nodes where opened. Kraken is an open source load testing IDE. As such, it displays a tree of directories and files used to script the load testing scenarios: You can have a look by creating a free account on the demo or check the source code of the UI on GitHub. It uses the latest version of Angular and components provided by Angular Material such as the tree.

How to Create a JavaScript Library. 7 Tips to Create a Library That Every Developer Loves Using

Have you ever found yourself copy-pasting the same bits of JavaScript code between different projects? Well, when this situation happens two or three times in a row, it’s usually a good indicator that you have a piece of code that is useful and reusable. So, if you are already reusing your code across several different projects, why not go the extra mile and convert it into a library that allows you to optimize this code-sharing?