Monday, August 6, 2018

Web Design Weekly #329

Headlines

The Cost Of JavaScript In 2018

Addy Osmani covers some strategies you can use to deliver JavaScript efficiently while still giving users a valuable experience. (medium.com)

The Bullshit Web

A must read for anyone that builds for the web. (pxlnv.com)

Articles

How We Ditched Redux for MobX

A look into how the talented Skillshare team moved from Redux to MobX as their state manager. If you are battling with Redux this is a good read. (medium.com)

Stunning hover effects with CSS variables

With a sprinkling of JavaScript and a little CSS you can build some awesome hover effects. Tobias Reich explains. (blog.prototypr.io)

How to get better at writing CSS

Thomas Lombart passes on some knowledge on how to write maintainable CSS code and how to organise it. (freecodecamp.org)

Reflecting on Abstract’s First Year (goabstract.com)

Tools / Resources

Switching Code Editors

Chris Coyier shares a collection of thoughts around changing editors. (css-tricks.com)

Awesome Code Review

A curated list of tools, articles, books, and any other resource related to code reviews. (github.com)

React Sight

Visualize your React applications. (reactsight.com)

React Live

A production-focused playground for live editing React code. (react-live.kitten.sh)

Evergreen

A pragmatic UI kit for building evolving products on the web. (github.com)

StyleURL

An easy way for developers & designers to collaborate on CSS changes. (styleurl.app)

React + Stripe Ecommerce Store Template (github.com)

Screely – Generate Beautiful Mockups (screely.com)

Inspiration

Simplifying our build process (cushionapp.com)

Evolving the Firefox Brand(blog.mozilla.org)

Jobs

Front End Developer and Designer at Dropbox

We are seeking an entrepreneurially-minded individual, who can act as both a designer and a front end engineer for our family of internal data-driven sales and customer insights products. (dropbox.com)

Brand Designer at Auth0

As a brand designer, you will bring well-crafted narratives to life across several channels and touch-points: online or offline pieces, environmental and video. (auth0.com)

Need to find passionate developers or designers?Why not advertise in the next newsletter

Last but not least…

Refresh – A fresh approach to the web browser (refresh.study)

The post Web Design Weekly #329 appeared first on Web Design Weekly.


by Jake Bresnehan via Web Design Weekly

This Week in Social Media: Facebook's Updated Video Metrics, Vertical Videos on YouTube, Whatsapp's New Monetization Model and More

Several social media channels underwent some massive changes and developments this past week. The following list compiles all of them. Facebook updates video metricsFrom now onward, Facebook would be aligning its view patterns with video metrics. It will now be focusing on how many times a...

[ This is a content summary only. Visit our website https://ift.tt/1b4YgHQ for full links, other content, and more! ]

by Neha Zaidi via Digital Information World

Understanding module.exports and exports in Node.js

As developers, we often face situations where we need to use unfamiliar code. A question will arise during these moments. How much time should I invest in understanding the code that I'm about to use? A typical answer is learn enough to start coding; then explore that topic further when time permits. Well, the time has come to gain a better understanding of module.exports and exports in Node.js. Here's what I have learned.

Note: this post covers using modules in Node. If you want to learn how you can use modules inside of the browser, read: Understanding JavaScript Modules: Bundling & Transpiling.

For a high-quality, in-depth introduction to Node.js, you can't go past Canadian full-stack developer Wes Bos. Try his course here, and use the code SITEPOINT to get 25% off and to help support SitePoint.

What is a Module

A module encapsulates related code into a single unit of code. When creating a module, this can be interpreted as moving all related functions into a file. Let's illustrate this point with an example involving an application built with Node.js. Imagine that we created a file called greetings.js and it contains the following two functions:

[js]
// greetings.js
sayHelloInEnglish = function() {
return "Hello";
};

sayHelloInSpanish = function() {
return "Hola";
};
[/js]

Exporting a Module

The utility of greetings.js increases when its encapsulated code can be utilized in other files. So let's refactor greetings.js to achieve this goal. To comprehend what is actually happening, we can follow a three-step process:

1) Imagine that this line of code exists as the first line of code in greetings.js:

[js]
// greetings.js
var exports = module.exports = {};
[/js]

2) Assign any expression in greetings.js that we want to become available in other files to the exports object:

[js]
// greetings.js
// var exports = module.exports = {};

exports.sayHelloInEnglish = function() {
return "HELLO";
};

exports.sayHelloInSpanish = function() {
return "Hola";
};
[/js]

In the code above, we could have replaced exports with module.exports and achieved the same result. If this seems confusing, remember that exports and module.exports reference the same object.

3) This is the current value of module.exports:

[js]
module.exports = {
sayHelloInEnglish: function() {
return "HELLO";
},

sayHelloInSpanish: function() {
return "Hola";
}
};
[/js]

The post Understanding module.exports and exports in Node.js appeared first on SitePoint.


by Cho S. Kim via SitePoint

How to Force Windows to Delete a File

Sometimes, for whatever reason, Windows will become convinced a given file is in use by a program and prevent it from being deleted, moved or renamed. This locking up of files is incredibly frustrating, especially when you know the file is not, in fact, being used. Here are two ways to get around that issue.

1. Force delete using Windows

First, open the command prompt. To do this, start by opening the Start menu (Windows key), typing run, and hitting Enter. In the dialogue that appears, type cmd and hit Enter again.

Run dialogue box

With the command prompt open, enter del /f filename, where filename is the name of the file or files (you can specify multiple files using commas) you want to delete. There are more details on advanced deletion methods here.

Note that to delete the file you'll need to either include the full path of the file where you replace filename, or navigate to the folder it is contained in using cd folderpath, and then run the del command. See the image below for an example of the latter method.

Using the command prompt

2. Use Unlocker

Unlocker is a free program that simplifies the deletion of locked files. It adds a context menu item to Windows Explorer, and can be activated by right-clicking. It also allows the user to rename or move a locked file.

There you have it, two simple methods for fixing a stubborn issue!

The post How to Force Windows to Delete a File appeared first on SitePoint.


by Adam Roberts via SitePoint

Simple Data Table with JavaScript

Lightweight and simple data table with no dependencies.

Features:

  • Display data (array with objects) in simple table
  • Lazy loading of data (you can load data whenever you can)
  • Support custom skins
  • Small size of package
  • No dependencies
  • Support custom events (update, add, remove)
  • Fluent API
  • Recognize data in input and change input type

The post Simple Data Table with JavaScript appeared first on Best jQuery.


by Admin via Best jQuery

Between.js : Lightweight JavaScript (ES6) Tweening library

Between.js is a lightweight JavaScript (ES6) tweening library.Make tweening usage convenient and powerful. There are certain things that we were following while developed this library, we wanted to make it:

  • Lightweight – The library is only 8.3 Kb
  • Performant – It uses optimization patterns to speed up & smooth animation.
  • Modern – The library is written in ES6

The post Between.js : Lightweight JavaScript (ES6) Tweening library appeared first on Best jQuery.


by Admin via Best jQuery

5 Easy Ways To Understand Your Audience (infographic)

To keep a business going or to start a new one from a scratch, you need an audience, a consumer market to appreciate your hard work vested towards that job. For a successful enterprise, you need a thorough understanding of your target population and how to use that knowledge towards the promotion...

[ This is a content summary only. Visit our website https://ift.tt/1b4YgHQ for full links, other content, and more! ]

by Mehwish Mehmood via Digital Information World