Hello and welcome to ‘This Week in JavaScript’ — another curated collection of links relating to what’s new and exciting in the world of JavaScript. 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 finds …
Getting started
- An Introduction to Reasonably Pure Functional Programming - Learning the principles of functional programming is a great addition to your skill set and will help you write simpler programs with fewer bugs.
- Creating an Imgur App with NativeScript - In this tutorial you will create a mobile app for the image sharing service, Imgur, using NativeScript.
- How to Add/Remove CSS classes using JavaScript - This post will demonstrate two approaches for manipulating the classes of an HTML element. The first uses the plain javascript property classList and the second uses jQuery, a popular javascript library.
- What Can JavaScript Do? - In January David Small took the opportunity to walk the BrightGauge Growth Team through some basics of what JavaScript can accomplish in the browser.
Learning more
- ES2016: Should the Future of JavaScript Be Developer-Driven? - What we’re asking today is whether it is a good thing for the community to be driving the direction of the language like this, or whether it’s “kinda whack” that the spec was changed because of a library conflict. Two of the Sitepoint authors (Moritz and Tim) take opposing viewpoints on this issue.
- Sending Emails with the Gmail JavaScript API - Jamie Shields shows how you can end up with a customizable app which can display recent messages, allow the composition of new messages and allow you to reply to specific messages.
- How to Remove JavaScript console.log - Pros&Cons - Piotr Stapp gives us his thoughts on this.
- Effective programming - Wake up! we don’t have those resources constraints any more, we can do better!
Libraries
- Ajax/jQuery.getJSON Simple Example - n this article we’ll investigate the importance of JSON and why we should use it in our applications. We’ll see that jQuery has got us covered with a very nice convenience function.
- Generating PDFs from Web Pages on the Fly with jsPDF - The purpose of this article is not to simply explain how a PDF can be created, but also to focus on the circumstances where a PDF file can solve a problem, and how a simple tool like jsPDF can help with this.
- Bricks.js - A blazing fast masonry layout generator for fixed width elements
- Grapesjs - A next generation tool for building templates without coding.
ES6
- Let It Be - How to declare JavaScript variables - ES2015 added a variety of riches to JavaScript. Among them are two new ways to declare variables, let and const. These tools were introduced to address faults of var, provide us an opt-in path to new functionality, and bring richers semantics to JavaScript variable declarations. Let’s talk about const, let, and how we declare variables in JavaScript.
- Proposal Draft for .flatten and .flatMap - Array prototype may be getting .flatten and .flatMap methods may be coming to ECMAScript in a distant future. This article describes what the proposal holds in store.
- Babel-plugin-transform-es2015-modules-simple-commonjs - Limited transformer for ECMAScript 2015 modules (CommonJS).
- Create a Basic Loader with JavaScript Promises - This super simple loader allows for loading of image, CSS, and JavaScript files, using the Promise API, and fires a callback upon success or failure.
- ES6 Cheat Sheet - ECMAScript6 (Javascript 2015 specification) syntax and information.
Frameworks
- How to Consume Laravel API with AngularJS - In part 1, we built our server part. Now we can build our client. We are going to use AngularJS to make a Single Page Application.
- Watch: A Lesson on React Props, Defaults and Modules - React and ES6 seems to be on everyone’s mind lately. In this video Darin Haener wants to show you the ins and outs of React Props written with ES6.
- Mortar JS - A React-powered framework that provides building blocks to craft and customize powerful data management tools for the web.
- Babel, ES2015 and Webpack - A starter project and small example of how to write Components and Services in ES6.
- MERN.IO - The easiest way to build isomorphic JavaScript apps using React and Redux.
Everything Else
- Reflections on ESLint’s success - ESLint has gained traction and continues to gain in popularity. Nicholas C. Zakas looks back and trys to understand why.
- Making ES6 Available to all with ChakraCore – A Talk at JFokus2016 - Chris Heilmann of Microsoft tells the story of the language and the evolution of the engine and leaves you with a lot of tips and tricks how to benefit from the new language features in a simple way.
- Some reminders about using the reduce function - As written in documentation the reduce() method applies a function against an accumulator and each value of the array (from left-to-right) to reduce it to a single value.
- Introduction to Web MIDI - For those of us who have used the web since the 1990s, the phrase “Web MIDI” usually induces flashbacks to a time when websites automatically played a lo-fi bloopy version of The Final Countdown while you signed the webmaster’s guestbook. However, in 2016, Web MIDI—and specifically the Web MIDI API—has a lot more potential.
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 Chris of Arabia.