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 - [Quick tip: How to sort an array of objects in JavaScript](https://www.sitepoint.com/sort-an-array-of-objects-in-javascript/) - The temptation might be to reach for a JavaScript library. Before you do however, remember that you can do some pretty neat sorting with the native Array.sort function. - [What tutorials don’t tell you: how to approach projects](https://www.sitepoint.com/how-to-approach-javascript-projects-what-the-tutorials-dont-tell-you/) - Approaching a project isn’t as neat as the tutorials make it seem. Rather than belting out lines of perfect code, projects are done in small pieces with plenty of trial and error and a healthy dose of searching through reference materials. - [Functional JavaScript for lazy developers (like me)](https://www.sitepoint.com/functional-javascript-for-lazy-developers-like-me/) - One of the core concepts that has driven my quest for knowledge about programming techniques has always been my own laziness. I started to look for ways to make coding easier and more fun. And that search led me directly to functional programming.
Learning More
- Always up-to-date guide for modern JavaScript development - This is a living document which will be updated regularly, as the JavaScript landscape changes (as it does, all the time).
- Reduce the complexity of your JavaScript code with normalizer functions - A normalizer is a function which takes a value and ensures it’s of a certain type. But if the value already is of the right type, it returns it untouched.
- Introduction into Elm part 1: Getting started for the absolute beginner - The fundamental principle of writing Elm code is to separate effects from computation, and to use different techniques for each.
- Get functional in frontend development - Functional programming is getting more and more popular in front-end development. But what is it, actually?
- Higher order functions - A higher order function is a function that takes a function as an argument, or returns a function. These are in contrast to first order functions, which don’t take a function as an argument or return a function as output.
- Reduce - A utility commonly used in functional programming that lets you iterate over a list. Frequently it’s the most elegant way to do any non-trivial processing on a collection of items.
- Ultimate guide to REST API design - Article is designed to help you either start with a good footing from scratch or to refactor your existing API into something far more manageable.
- When your code has to work: complying with legal mandates - Douglas Crockford famously declared browsers to be “the most hostile software engineering environment imaginable,” and that wasn’t hyperbole.
- Electron CrashReporter — stay up to date if your app f****d up! - It’s not okay to trust in your strength and the robustness of your app for 100% without expecting that some bugs may happen. Don’t be that naive. Use proper mechanisms to measure what’s going on.
Libraries
- strclass - A tiny library to apply CSS classes as strings from objects.
- Hyperapp - 1kb JavaScript library for building functional frontend applications with Elm-like state management and a virtual DOM engine.
- deep-autofill - Google Chrome Extension to auto fill form input elements using faker.js, making life easier for developers.
Node
- Caporal: A full-featured framework for building command line applications (cli) with node.js - A full-featured framework for building command line applications (cli) with node.js, including help generation, colored output, verbosity control, custom logger, coercion and casting, typos suggestions, and auto-complete for bash/zsh/fish.
- Extensible Effects in Node.js - A huge theme of my programming practice so far has been understanding how to represent effects like database calls and network requests in a way that is still testable. Once I started learning Haskell, reading papers and watching talks I discovered that all of these things have a formal representation.
- Show uncaught errors friendly in Node.js - Searches Google to and shows the solution to uncaught errors.
React/Redux
- A simple starter/learner kit for Redux+React - This repo can be used both as a starter kit for developing Redux+React apps as well as a helpful guide to those wishing to see some simple code in action.
- React to everything - A project that aims to share as much code possible between Android, iOS, Web and Desktop, but tries to look and act like a first class citizen.
- The benefits of creating controlled components in React - Suppose a component has an input field with a value depending on the state of the component. The default value of the component is placed in its state.
- Reusing layouts in React Router 4 - In the latest version of React Router it is very easy to render a default set of components (such as header and footer) on every route, as well as creating child layouts for specific use cases.
- React quickly: How to work with forms in React - how to capture text input and input via other form elements like input, textarea, and option. Working with them is paramount to web development because they allow our applications to receive data (e.g. text) and actions (e.g. clicks) from users.
- How to scale a Redux application with Redux-action-recompose - This article will introduce redux-action-recompose and explain how it will help you to scale your application by assisting you to reuse common action-creators and reducers.
- Redux-queue: Gain control of the order of execution of your Redux actions - Higher order reducer so you don’t have to worry about order of arrival of the results of your actions.
Angular
- From transclusion in Angular 1.x to content projection in Angular 2 - When you create more advanced components, the simple input and output mechanisms may not suffice. That’s where “transclusion”, now also known as content projection, comes into play.
- Component property binding with @Input() in Angular 2 - Data enters a component via an input, and leaves the component through an output. This is a small but powerful conceptual change to Angular 1.x’s two-way data-binding in which changes automatically propagate to all listeners for that particular binding.
- 3 Things you didn’t know about AsyncPipe in Angular - Angular’s AsyncPipe can be used from within templates so that we don’t have to deal with unwrapping data from Observables or Promises imperatively. Turns out the AsyncPipe is full of little wonders that may not be obvious at first sight.
- ng-vcl a very fleible, extensible and already quite complete Angular 2 and up component Library - A comprehensive library of components for Angular 2 with VCL based styling.
- Use social media sharing prompts in a NativeScript Angular application - Social media can be huge towards building your brand and promoting your mobile application. It can also make a difference in the user experience of your application. Allowing users to share text and media on their own social media profiles could be huge, no matter how you look at it.
- A step-by-step guide for building master-detail user interfaces with Angular - Master-detail interfaces work best when you have a large list of some type of data, and the individual items in the list have details associated with them — details that the user needs to view or modify.
Testing
- Testing JavaScript with Jasmine - JavaScript testing with Jasmine presents an efficient and convenient way to cover your code with test early in development, allowing to greatly improve it in most cases.
- TDD the RITE way - When you dig into TDD you’re going to find a bunch of options for test frameworks. Let me save you some time: Which one you pick matters less than how simple your test suite is.
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.