Hello and welcome to This Week in JavaScript, our lovingly curated collection of links relating to what’s new and exciting in the world of JS. The complete list is tagged jsweekly. (Don’t forget to check out our weekly .NET and front end roundups too!)
And now for this week’s JavaScript finds …
Getting Started
- TOP 20 JavaScript books - TOP 20 community’s favourite books.
- Wrangling arrays like a boss, with Array#reduce - Hopefully towards the end of this story, some of you’ll appreciate the elegance of Array#reduce, and how you could use it to write efficient code when working with arrays in JavaScript.
- The Habits of Effective JavaScript Developers - I’ve been grappling with the question of what separates excellent JavaScript developers from the mediocre for ones for quite some time. Today I would like to share another piece the puzzle.
Learning More
- Roadmap to becoming a web developer in 2017 - A set of charts demonstrating the paths that you can take and the technologies that you would want to adopt in order to become a frontend, backend or a devops.
- Top 5 jQuery UI Alternatives - While jQuery UI works great and is a good go-to option, there are other frameworks out there that boast amazing, high-quality controls. In this article I will analyze a few of these to see how they stack up.
- Safely Accessing Deeply Nested Values In JavaScript - Examples of the many different ways to safely access deeply nested values in JavaScript.
- Time Complexity/Big O Notation: Scaling Algorithms Instead of Applications - Knowing and understanding Big O notation can guide the way we as developers think about and shape our applications.
- Functors & Categories (Composing Software) - A functor is something that can be mapped over. In other words, it’s a container which has an interface which can be used to apply a function to the values inside it.
- setImmediate() vs process.nextTick() vs setTimeout(fn, 0) - A majority of the articles out there in the internet about setImmediate() or process.nextTick() was containing insufficient or misleading information. Hence I decided to come up with this article.
- Exercise: text as Unicode clock faces - We explore how arbitrary ASCII text can be encoded as Unicode clock faces.
- 3 Array Hacks that you can do with ECMAScript 6 - Arrays are everywhere in JavaScript and with the new spread operators introduced in ECMAScript 6, you can do awesome things with them. In this post I will show you 3 useful tricks you can use.
- Communicating Sequential Processes: an alternative to async generators - Communicating Sequential Processes (CSP) and how they can be used as an alternative to async generators. In the process, we will also take a look at the ECMAScript proposal that async generators are a part of asynchronous iteration.
Libraries
- limited-permutations - Helps you to generate a limited permutation.
- Baresoil - Baresoil aims to do as much as possible for you in order to streamline the process of building, running, and scaling a webapp or backend.
- Elemental.js - A function library for JavaScript that enhances the existing way of doing things and fills in what I consider to be some obvious ‘blanks’ in the specification.
- objecthistory - Enhance an object with undo, redo & change history.
- An Update on ES6 Modules in Node.js - How things are progressing on the various differences that exist between Node.js CommonJS modules and the new ES6 Module system.
- The Evolution of JavaScript Modularity - As a result of communication with members of TC39 and others, we will look at the following approaches/formats: Namespace, Module, Detached Dependency Definitions, Sandbox, Dependency Injection, CommonJS, AMD, UMD, Labeled Modules, YModules, ES2015 Modules.
- Observables are Coming to ECMAScript! - Observable would be a new built-in that can be used to handle event streams. The Observable constructor takes a callback which defines an event stream.
Frameworks
- Crafty Beyond the Basics: Collisions - Learn about detecting and debugging collisions in detail.
- Crafty Beyond the Basics: Sprites - You will learn how to load sprite sheets to use different images in your game. After that, you will learn how to animate different characters using sprite animation.
- Webpack Tutorial: Understanding @ngtools/webpack - Sometimes you need more control and fine tuning, and sometimes you just need an alternative. In this blog I go through how to use ngtools/webpack, as well as describing the benefits in generally of using Webpack & AOT.
- Introducing Quokka.js - The Live Scratchpad for JavaScript (free developer tool) - Sometimes you keep forgetting how a certain library function works, so just want to call it and inspect the output. Sometimes you want a playground to experiment with a new language feature or framework, to learn it or to teach it to others.
- Writing a JavaScript Framework with NX: Client-Side Routing - How client-side routing in JavaScript differs from server-side routing and why should it be treated differently.
- Introduction to Polymer - The Polymer project focus is in Progressive Web Apps and the maximum focus it’s in User Experience. The Polymer proposal it uses less Javascript and more the platform itself. The work is in HTTP 2, Service workers, mainly focusing in Offline First, also using others features of service workers.
React
- Composing React Components With Ramda - Using higher-order functions instead of higher-order components.
- An extremely fast React-like JavaScript library - An extremely fast React-like JavaScript library for building modern user interfaces.
- Reactive Programming Operators in RxJava 2 - How you can use RxJava’s operators to finally make concurrency on Android a pain-free experience. By the end of this article, you’ll know how to use RxJava operators to create additional threads, specify the work that should occur on these threads, and then post the results back to Android’s all-important main UI thread—all with just a few lines of code.
- Best JavaScript books in 2017 - There are way too many JavaScript books out, with more coming out every month. So what is the best JavaScript book for you? After going through a number of books through the years, these are the best JavaScript books for learning JavaScript.
- Watch files and react upon changes - Watch files and react upon changes.
- 10 React mini-patterns - Over the last few years, I’ve worked on a handful of decent-sized React projects, and many, many pint-sized ones. Throughout this magical journey, a number of patterns have come up that I find myself repeating again and again.
Angular
- From ng-switch to ngSwitch - When the value being evaluated changes, we are essentially switching what DOM element we want to make visible. In this guide we’ll be converting an Angular 1.x ng-switch directive into Angular 2’s ngSwitch directive.
- How To Develop An Interactive Command Line Application Using Node.js - If you are a front-end developer, then you must have heard of or worked on Gulp, Angular CLI, Cordova, Yeoman and others. Have you ever wondered how they work?
- Understanding Component Architecture: Refactoring an Angular App - We will look at how to break this single component into a structured tree of smaller components that are easier to understand, re-use and maintain.
- Planning An Angular Application - This whitepaper documents a high-level outline of things to consider when planning an Angular application, from tooling choices during development all the way through to deployment and performance strategies.
Vue
- Where did Vue.js come from? - Vue.js doesn’t truly offer anything that other frameworks don’t already have, but it does bring together features from other frameworks in a unique way that may be a better combination. Which of these features did Vue.js glean from other frameworks, and from which ones?
- Basic Server Side Rendering with Vue.js and Express - Unfortunately, it’s not the most obvious thing to set up, and the documentation for rendering Vue.js apps on the server is spread across several places. Hopefully this guide should help clear things up for you.
- Quick Introduction to VueJS - What makes VueJs special is the fact that was designed to be incrementally adoptable, the core is dedicated to the view layer only but you can combine it with other libraries in order to create great single pages apps.
Testing
- Improve your Javascript unit testing with Parameterized tests - Parameterized tests allow a developer to run the same test over and over again using different values. Mocha-param helps where existing testing frameworks do not support this out of the box.
- A tool to see the execution of plain and simple javascript code - A tool and a web site for javascript API authors that looks a bit like a video player but runs JavaScript. Use it to present your javascript code or to test your API or both.
- New JS test library - Sazerac helps you create simple, readable tests. It works with Jasmine, Jest, and Mocha.
- Top 5 Most Rated Node.js Frameworks for End-to-End Web Testing - We will discuss their main features and try to perform a couple of basic actions with each, which will allow us to understand what each framework is worth. I’ll describe what you need to do to write your first simple test.
- Useful Tip: Tapping for quick debugging - A really useful function for quick-debugging chains of function calls, anonymous functions and, actually, whatever you just want to print.
- Benchmarking your JavaScript code - I’ll show you a super easy way to benchmark your JavaScript code. I have some code which needs to match a string against a list of domain names. Of course, my first thought was to use a RegExp. It works. And then I thought lets iterate over the list, and use String.indexOf(). Which one is faster? Benchmark them!
For more links like this and to keep up-to-date with the latest goings on in JS land, you can follow SitePoint’s JavaScript channel on Twitter.
Please PM us if you have anything of interest for the next issue or if there is anything you would like to see featured. Paul and chrisofarabia.