Select Page

Author: admin

Scaling CSS: Two Sides of a Spectrum

The subject of scaling CSS came up a lot in a recent ShopTalk Show with Ben Frain. Ben has put a lot of thought into the subject, even writing a complete book on it, Enduring CSS, which is centered around a whole ECSS methodology. He talked about how there are essentially two solutions for styling at scale: Total isolation Total abstraction Total isolation is some version of writing styles scoped to some boundary that you’ve set up (like a component) in which those styles don’t leak in or out. Total abstraction is some version of writing styles that are global, yet so generic and re-usable, that they have no unintended side effects. Total isolation might come from in a .vue file, CSS modules in which CSS class selectors and HTML class attributes are dynamically generated gibberish, or a CSS-in-JS project, like glamerous. Even strictly-followed naming conventions like BEM can be a form of total isolation. Total abstraction might come from a project, like Tachyons, that gives you a fixed set of class names to use for styling (Tailwind is like a configurable version of that), or a programmatic tool (like Atomizer) that turns specially named HTML class attributes into a stylesheet with exactly what it needs. It’s the middle ground that has problems. It’s using a naming methodology, but not holding strictly to it. It’s using some styles in...

Read More

Dramatically Speed Up Your React Front-End App Using Lazy Loading

A constant challenge faced by front-end developers is the performance of our applications. How can we deliver a robust and full-featured application to our users without forcing them to wait an eternity for the page to load? The techniques used to speed up a website are so numerous that it can often be confusing to decide where to focus our energy when optimising for performance and speed. Thankfully, the solution isn’t as complicated as it sometimes might seem. In this post, I’ll break down one of the most effective techniques used by large web apps to speed up their...

Read More

Design Better UX With Vue.js Transitions and Animations

Transitions and animations are an important design pattern whose aim is to improve the user experience (UX) by making the user interface (UI) more natural and intuitive.  Most people think that the purpose of transitions and animations is to engage the user’s attention, and this is true to some extent. In certain contexts, such as game websites, where attractiveness and entertainment take precedent, it is justified. However, in most websites, engagement should be the secondary role, while the main role of any transitions or animations should be for communication. And that will be the subject of this tutorial. We’ll...

Read More

Write to Files and Read Files With PHP

In this tutorial, you’ll learn several important functions in PHP which are sufficient for all your basic file reading and writing needs. You’ll learn how to read a file, write to a file, write to a text file, and check if a file exists. Luckily, PHP provides a lot of functions to read and write data to files. In this tutorial, I’ll show you the easiest ways to read data from a local or remote file and how to use flags to write to files exactly how we want. Checking if a File Exists Your very first step when trying...

Read More

Connect to an API With Retrofit, RxJava 2, and Kotlin

Today, it’s pretty common for mobile apps to exchange data with remote servers, using web Application Programming Interfaces (APIs). Whether it’s checking for new emails using the Gmail API, searching for events in the local area with the Ticketmaster API, or leveraging the user’s Spotify history to recommend new music, APIs (usually REST APIs) provide access to a wealth of information that you can use in your app. Communicating with remote servers has become such an important part of modern mobile development that there are countless libraries dedicated to helping you make network calls, but Retrofit is one of the most widely...

Read More
000webhost logo