JSK Weekly - January 10, 2018

If you are tech-savvy you must have heard about the new security issues Meltdown and Spectre. You can read more on how this may affect us, JavaScript developers, in the articles "What Spectre and Meltdown Mean For WebKit" by Filip Pizlo and "Will Spectre & Meltdown Break JavaScript?" by Ezequiel Bruni.

Brandon Morelli wrote a great article about "JavaScript Arrays — Finding The Minimum, Maximum, Sum, & Average Values" so you might want to check it out.

If you are interested to learn more about TypeScript, make sure to read Todd Motto's "Introduction to TypeScript".

All React fans will be thrilled with James Sinclair's article "React, Redux and JavaScript Application Architecture". Don't miss out the opportunity to improve your knowledge with this one.

Finally, we are welcoming one new Vue.js based framework to JavaScript frameworks family. Nuxt.js, Vue.js Meta Framework, version 1.0 is released!


General

What Spectre and Meltdown Mean For WebKit

Security researchers have recently uncovered security issues known as Meltdown and Spectre. These issues apply to all modern processors and allow attackers to gain read access to parts of memory that were meant to be secret. To initiate a Spectre- or Meltdown-based attack, the attacker must be able to run code on the victim's processor.

Authored by: WebKit

Will Spectre & Meltdown Break JavaScript?

Spectre. Meltdown. They sound like action movie names, and one of them, well... is exactly that. Well the reality of the situation is that they're almost as bad as many Bond villain plots. These two names represent three (yeah, three) vulnerabilities in pretty much every processor currently on the market.

Authored by: Developer Drive

Taming huge collections of DOM nodes

In an almost biblical revelation, we've learned that DOM manipulation is slow... ten years ago. It may look like things are so much better today, and they certainly are in the common cases.

Authored by: codeburst.io

How to Build a Memory Matching Game in JavaScript

I recently built a matching game as one of my FEND (Front-end NanoDegree) projects, and in this post, I will be documenting the process. I guess this can be a simple tutorial for people learning javascript and want to build a real project.

Authored by: Sandra Israel

Why Mutation Can Be Scary

by Published in Zell Liew Code , JavaScript To mutate means to change in form or nature. Something that's mutable can be changed, while something that's immutable cannot be changed. To understand mutation, think of the X-Men. In X-Men, people can suddenly gain powers. The problem is, you don't know when these powers will emerge.

Authored by: A List Apart

Little ToDo: JavaScript Components Without Frameworks

Do you just need a couple of small components and don't want the overhead of a framework? Do you want a foundation for building your own framework?

Authored by: Simon Blackwell


JavaScript

JavaScript Arrays - Finding The Minimum, Maximum, Sum, & Average Values

Plug and play options for working with Arrays of Numbers

Authored by: Brandon Morelli

Six Tiny But Awesome ES7 + ES8 Features

Development of new features for the core JavaScript language has really improved over the last five years, thanks in part to JavaScript frameworks pushing the limits and proving how important given functionality can be.

Authored by: David Walsh

Date and Time in JavaScript

Programmers usually don't understand the complexity of dates and time until they have to dip their toes in this world. In this article we'll talk about dates in JavaScript and some of these issues that people face while using date and time in JavaScript and in general while programming.

Authored by: Ayush Gupta

Strings and Template Literals in ES6

It is time to have a look at string manipulation and template literals. There has been a shift in the trends of web development in the last ten years that moves the responsibility of rendering from the server side to the client side.

Authored by: Zsolt Nagy

Deep dive into JavaScript Hoisting

Hoisting is a JavaScript's default behavior to move variables and function declarations to the top of the scope. The scope may vary based on where it's declared. It may be page level, function level or block level. Only declarations are hoisted, not initializations.

Authored by: Thamizhchelvan


TypeScript

Introduction to TypeScript

Since its inception, JavaScript has experience monumental growth.

Authored by: Todd Motto

TypeScript: Precise domain modeling with discriminated unions

In this post, we're going to look into an interesting feature of the TypeScript language. It's called discriminated unions and is also known as algebraic data types.

Authored by: Milosz Piechocki


Angular.js

Wildcard Routes (**) Can Be Scoped To Route Sub-Trees In Angular 5.1.3

In the Angular router, you can use the wildcard path - ** - as a catch-all route to render things like a "Not Found" view or to redirect the user back to the root of the application.

Authored by: Ben Nadel

How to handle folder uploads in an Angular app

Ben Jacobson 0 Comments At Lucidpress, we recently decided to revamp our image manager experience by creating a completely new image manager written in Angular 2 and Typescript. One of the key new features we wanted to add was bulk image upload, which is the ability to upload a folder with all of its contents while maintaining the original folder structure.

Authored by: Lucidchart

Display a Table using Components with Angular 4

The app will use two components to display a table: Table Component Table Row Component For simplicity, these components will live in the main app module. We'll assume that we're receiving data from a service that we implemented previously (in this example called Adventure Time Service).

Authored by: codeburst.io


React.js

React, Redux and JavaScript Architecture

Whether you use them or not, React and Redux are important. They have changed the way we think about structuring front-end web applications. They can be very powerful. But they are not magic. JavaScript code does not automatically become better just because it uses React.

Authored by: James Sinclair

React Redux Tutorial for Beginners: learning Redux in 2018

When I first started learning Redux I wish I could find the simplest tutorial ever. Despite the great resources out there I couldn't wrap my head around some of the Redux concepts. I knew what's the state. But actions, action creators, and reducers? Theywere obscure for me.

Authored by: Valentino Gagliardi

Reduce Your Boilerplate Code for Redux Container using React HOC

How can we make this code better? Easy, just create a HOC that will receive the child component, mapStateToProps , and Action Creators.

Authored by: codeburst.io

How Redux would run a donut shop

If you're new to the React ecosystem and state management, Redux can be tough to wrap your head around initially - 'reducers', 'actions', 'dispatch', etc etc. Redux helps provide a more consistent and predictable state management in JavaScript applications.

Authored by: codeburst.io

How to Build an E-commerce Search UI with React and Elasticsearch

We will build an e-commerce book search UI using React and Elasticsearch  - in less than 60 minutes! Building a search UI requires two key components: A powerful search backend - Elasticsearch here fits the bill, being the #1 search engine. A well designed UI - React is a great choice for undertaking this endeavor in.

Authored by: Siddharth Kothari

React Redux Tutorial for Beginners: learning Redux in 2018

When I first started learning Redux I wish I could find the simplest tutorial ever. Despite the great resources out there I couldn't wrap my head around some of the Redux concepts. I knew what's the state. But actions, action creators, and reducers? They were obscure for me.

Authored by: Codementor


Aurelia.js

Aurelia 2018 Roadmap

2017 was a great year for Aurelia but 2018 is shaping up to be even better!

Authored by: Rob Eisenberg


Vue.js

Getting Your Head Around Vue.js Scoped Slots

Scoped slots are a useful feature of Vue that can make components more versatile and reusable. The only problem is they're hard to understand! In this article, I'll go through a step-by-step example so you can see how useful scoped slots are.

Authored by: Anthony Gore

Testing Vue CLI reload

Testing dev server hot reload using Cypress. Recently I came across vue-cli server reload test. The test uses Puppeteer to verify that vue-cli scaffolds a project correctly, that dev server is serving a Vue app, and that changing the app's source file reloads the page, and it shows updated text.

Authored by: Gleb Bahmutov

Managing User Permissions in a VueJS App

In authenticated frontend apps, we often want to change what's visible to the user depending on their assigned role. For example, a guest user might be able to see a post, but only a registered user or an admin sees a button to edit that post.

Authored by: Anthony Gore

Low Verbosity i18n with Custom Vue Directives

If your codebase is anything like the ones I've known, it has plenty of code like this template. For anyone who aims to write DRY code, or simply dislikes mixed syntaxes, this probably doesn't give you a warm fuzzy feeling. When researching available tools we, at Teamwork.com, decided to use i18next.

Authored by: codeburst.io

Vuex getters are great, but don't overuse them

As it states in the Bunny Theory of Code, the code tends to multiply in a quick way. And even with such great tools as Vue and Vuex it’s easy to make a mistake that might grow later all over the project.

Authored by: codeburst.io

Accessing Heroku Config Variables in your Vue Webpack App

For your Vue app to be able to access this config variables on Heroku, the webpack build process needs to be moved to heroku.

Authored by: Nosakhare Obaseki


Node.js

A Practical GraphQL Getting Started Guide with Node.js

Most of us may be very familiar with creating REST APIs. GraphQL is a query language, created by Facebook with the purpose of building client applications based on intuitive and flexible syntax, for describing their data requirements and interactions. GraphQL was designed to solve one of the biggest drawbacks of REST-like APIs.

Authored by: Scotch Development

Beautiful Node: Building an API endpoint with Express, Mongoose, Validation and Promises

To be honest, when a new JavaScript language feature lands in Node.js, I am always convinced that I don't need this and and won't use it for the time being.

Authored by: Daniel Khan

What I learned from reading random-number-in-range

I was working on a project and needed to get a random number from a given range. Like a normal programmer, I went straight to StackOverflow in search of a code snippet. The top answer from this link would have done the job. Instead, I searched for an npm package to do the same thing.

Authored by: codeburst.io

Node.js Postmortem Debugging for Fun and Production

Written by Colin Ihrig and edited by Wendell Adriel Tools like the V8 Inspector are fantastic for debugging during development, or when known steps exist for reproducing a bug. Unfortunately, production environments don't lend themselves as well to analysis using these tools.

Authored by: Colin Ihrig

Building Your First Node App Using Docker

Written by Karl Hughes and edited by Carmen Bourlon Since its first release in 2013, Docker has quickly become one of the hottest topics in software development, and has been adopted by both large and small companies across the world.

Authored by: Colin Ihrig

Send And Manage DigiByte DGB Coins With Node.js

I've been spending a lot of time researching and watching the blockchain market because it is a very interesting subject matter. Not too long ago I had written an article titled, Create a Cross-Platform Desktop Ripple XRP Wallet with Vue.js and Electron, which focused on the Ripple, the banking network and cryptocurrency.

Authored by: Nic Raboy


Libraries and Tools

Nuxt.js 1.0 is out 🎉

It has been a long run, with a lot of commits, issues, contributors & fun! See 1.0.0 Release Note on GitHub. Nuxt.js is a framework on top of Vue.js, vue-router, vuex and vue-meta. You can create a (static generated or universal or single page) web app quickly with the same setup and no build config to write.

Authored by: Nuxt.js

Babel Polyfills

Babel Polyfills - DiscoverSDK Blog

Authored by: DiscoverSDK

Open Source -Learn JavaScript Objects with Object Explorer

Trending open source this week — Object Explorer by Sarah Drasner

Authored by: Brandon Morelli

Gulp vs Grunt vs Webpack. Tools and Task Runners, Which Technology is Better?

Programming has never been an easy task for anyone. That is why, task runners are usually used. But which to choose and why?

Authored by: Artjoker

A 5 minute intro to Workbox 3.0

Workbox is a collection of JavaScript libraries that help you with service worker related functionalities when you're building Progressive Web Apps.

Authored by: Jad Joubran

The Best JavaScript Frameworks You're Not Using

Currently there are three front end JavaScript frameworks that dominate the field - React, Vue and Angular. The vast majority of blog posts, tutorials and conference talks are about these three frameworks. This article, however, focuses on three lesser-known, but excellent alternatives.

Authored by: JavaScript Report


Other

Create a Piano App with JavaScript

My goal is to make a workable piano. Once I've made the piano, I want to be able to build a database of playable songs, to be able to play along to. Nothing fancy, like rock band, but just a simple...

Authored by: Ethan Jarrell

Reuse code with domain-specific steps in collection pipelines

So far, we've only looked into how to add new functions to collection pipelines. In this post, we'll look into why such extensions might be necessary. We've used a rather simple head function as an example, which raises the obvious question: What if a library provides all the fundamental steps?

Authored by: advancedweb.hu

Quick functional refactoring

I was writing a small program to drive Cypress test runner via its module api to run the same spec file against multiple apps. There is a list of application names and we go through each app one by on

Authored by: Gleb Bahmutov

Add comments to your GatsbyJS blog within two minutes

Static sites are great! They are easy to publish and maintain. You can scale a static website easily for millions of users. And hosting usually is quite cheap. Another advantage is the convenience of local development and the possibility to preview any change before publishing.

Authored by: Alex Rudenko

Dev.Opera - What's new in Chromium 63 and Opera 50

New JavaScript module import syntax allows developers to dynamically load code into modules and scripts at runtime. This makes it possible to load parts of an application lazily, which can be used to improve application start-up time or to avoid loading seldom used parts until they are actually needed.

Authored by: Opera Dev Relations

How I created a SaaS product

This post shares the journey of how I dealt with my own itch to improve testing workflows. It discusses what problems I faced during works and how I tried to get solutions to them. I started trying existing 3rd-party solutions. then built an open source solution to better fit my own needs.

Authored by: katat





0 comments