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 …
Learning More
- How it feels to learn JavaScript in 2016 - An opinion piece that shouldn’t be taken too seriously. No JavaScript frameworks were created during the writing of this article.
- Everything is fine with JavaScript - A response to the above “How it feels” opinion piece. I think it’s a decent time to review some principles.
- Front-end is :rock on: and JavaScript is - Modern front-end is under critique. But we seem to forget what we get in return. We — the working citizens of the web, web designers, ex-Wordpress developers and code fiddlers, are about to rule the digital world.
- Create a documentation blog for your JavaScript projects, using Markdown and prismjs.com with restdb.io - In this blog post we describe how we set up a restdb.io database to power a simple blog site using just a tiny amount of code.
- Saved from Callback Hell - A dive into what sound programming using SOLID principles has to offer with callbacks.
- Code smells survey - A quick survey on JavaScript code smells
- Write Code in a Way Comfortable to You - We can make use of JavaScript Object-Oriented Programming patterns without classes. It happens that JavaScript Objects implement state/properties and behavior/methods, so We don’t generally need classes at all.
- Understanding "This" in JavaScript - The this keyword’s value has nothing to do with the function itself, how the function is called determines this’s value.
- Minify a single page web app. Super easy and very good results - Minify HTML, Javascript and CSS withoud headache.
Libraries
- Prottle - Promise.all() throttle
- Awaiterfall - async await simple waterfall
- simplify-string - Create a human readable or SEO url tag from string.
ES6 and beyond
- How to avoid infinite nesting callbacks in JavaScript - There are two good ways to flatten nested callbacks. They both have to do with waiting for a Promise to resolve a value.
- Trailing comma in ECMAScript 2017 function parameter list - Object and array literals allow us to leave a comma dangling off the final item since the third version of ECMAScript.
- Fetch – Modern Async Server Calls - XMLHttpRequest (XHR) is the definition of an old, confusing, complex tool. Fetch API is the simpler replacement.
React
- Angular 2 has been released! Does this threaten React? - Will Angular 2 be as popular as its first version? Should React be afraid of losing the position of market lead?
- Module bundling with Webpack - In the wake of React—Facebook’s UI library—came Webpack, a simple but awesome module bundler. Module bundlers are just what they are called, they bundle up JavaScript modules into one file.
- Creating universal Windows apps with React Native - A walk through the process of setting up a Universal Windows project for React Native, importing core Windows-specific modules to your JavaScript components, and running the app with Visual Studio.
- Electrode: An universal react/node app platform by WalmartLabs - Electrode focuses on performance, component reusability, and simple deployment to multiple cloud providers—so you can focus on what makes your app unique.
- Rubix - A Rubik’s Cube with Redux
Angular
- Angular Router: understanding redirects - Using redirects we can transform the URL before the router creates a router state out of it. This is useful for normalizing URLs and large scale refactorings.
- The ultimate Redux typed store implementation for Angular 2 - Get the best of all worlds: Redux simple data flow, Typed store models, Intellisense and re-factoring assistance for all your data structure.
- Using Angular CLI to create Angular 2 applications in Docker - A quick demo of how you can try out the Angular CLI (github) project without having to install all the tools on your local machine.
- Angular 2 vs React: The Ultimate Dance Off - Lately, I’ve been exploring Angular 2 in-depth. Here’s how it compares to React in my opinion.
Cool Stuff
- XKCD: Coffee
- LPT: If you HATE slideshows in webarticles, you can use deslide.clusterfake.net to turn the slideshows into an one page list with everything.
- Zoomable tree of all life on Earth - An interactive zoomable map of “the evolutionary relationships between the species on our planet”
Testing
- What is property based testing (and how to do it in JavaScript)? - Property based testing can help you test the untestable. And while at it, you can even use them to test your other functions with automatically generated data.
- How to Test React Components Using Jest - How we can use Jest first on plain JavaScript functions, and a look at some of the features it provides out of the box specifically aimed at making testing React apps easier.
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.