devz-docz

Aggregation of onboarding and general devz standards that I have gatherd over my career.

View on GitHub

Standard Devz Processes / Web Development / Front End Guide

Overview

These are recommendations for front end development at I.

Contents

What is front end development

In order to make informed decisions around what kind of tools, libraries, and frameworks to use for your web application, it helps to have a strong understanding of what “front end” means in the context of web development. The front end part of an application stack refers to the client-side code that is downloaded from a web server, and executed in the browser on an end user’s device. It includes, but is not limited to, the HTML and CSS that renders the user interface.

It is also important to keep in mind, especially as the ecosystem of front end development continues to expand, that the compiled code that will be executed natively by the browser is ultimately HTML, CSS, and JavaScript. While it is certainly possible to build a dynamic web app using just these languages, it is all run in a single environment, uncompartamentalized, making it easy to introduce bugs and unintended side effects. Therefore, many of the tools I see in modern front end development are actually used in order to improve the developer experience, and in turn the users, by enforcing consistent patterns, reducing the potentiality for bugs, and automating tasks that assist in performance optimization.

What is a SPA (single page application)

TK

What is server-side rendering (SSR)

TK

What is a PWA (progressive web app)

TK

Frameworks

I typically choose React as my front end framework of choice.

Languages

I are cautiously optimistic about recommending TypeScript after using it on multiple projects. I have compiled some TypeScript Resources.

Testing

Test Runners and Libraries (for React)

Writing Tests

Browser Testing

Browser Extensions

The following extensions can be installed to assist with debugging React and Redux applications:

Code Style and Formatting

I generally adhere to the Airbnb JavaScript Style Guide, unless they conflict with project specific Prettier or lint rules.

Auto-formatting

Linting

Selecting a release of Node.js

When starting a new project, you will want to select an Active LTS release of Node.js and make plans to move to the next LTS release after it becomes active and before the selected release goes out of maintenance. You could choose a “current” release but there is a good chance that the libraries you want to use have not been tested until it becomes active. Odd-numbered releases are short-lived, so only choose one intentionally. (For instance, if some library you want to use doesn’t work in an LTS release.) Please refer to this release schedule to make your selection.

Once you have done this, you may want to enforce it by configuring the engines your projects package.json. For instance, if you have selected 12.x, you might want to add this section:

# package.json
"engines": {
  "node": "^12"
}

You might want to create team recommendations for how your team manages their local version of node.js. For instance, you could recommend they use nodenv or nvm and provide configuration to keep it on the release path you want.

CSS

Follow the BEM (Block, Element, Modifier) methodology. Also helpful to follow is the U.S. Web Design System.

Additional Resources

Libraries I Like

Learning

Various resources on React, Redux, etc, for a variety of learning styles.