Category: classes

Best Practices for Using Modern JavaScript Syntax

Modern JavaScript is evolving quickly to meet the changing needs of new frameworks and environments. Understanding how to take advantage of those changes can save you time, improve your skill set, and mark the difference between good code and great code. Knowing what modern JavaScript is trying to do can help you decid...

Angular 2 Components and Providers: Classes, Factories & Values

In a previous article, we looked at how to get data into and out of components using the @Input and @Output annotations. In this article, we’ll look at another fundamental aspect of Angular 2 components — their ability to use “providers.” You may have seen “providers” in a list of properties you can use to ...

Random Interesting Facts on HTML/SVG usage

Last time, we saw how the average web page looks like using data from about 8 million websites. That’s a lot of data, and we’ve been continuing to sift through it. We’re back again this time to showcase some random and hopefully interesting facts on markup usage. Hiding DOM elements There are various...

(To use or not-to-use) Classes

Love me some blog debates! Papa Bear, Mama Bear, Baby Bear. Direct Link to Article — Permalink (To use or not-to-use) Classes is a post from CSS-Tricks ...

Templates are easy to change. Content usually isn’t.

There are two kinds of HTML: HTML that makes up templates HTML that is content I feel like some discussions about HTML are clouded by not making this distinction. For example, I like Harry Roberts approach to classes on header elements. Harry was talking about “apps”, so perhaps it was implied, but let&#...

Object-oriented JavaScript: A Deep Dive into ES6 Classes

Often we need to represent an idea or concept in our programs — maybe a car engine, a computer file, a router, or a temperature reading. Representing these concepts directly in code comes in two parts: data to represent the state, and functions to represent the behavior. ES6 classes give us a convenient syntax for de...