DevTalk
April 18, 2022
9
min read

Web Development Best Practices: What The Data Tells us

Benedikt Bischof

Welcome to the new issue of the WeAreDevelopers Live Talk series. This article recaps an interesting talk by Laurie Voss who gave advice about the best practices in web development. 

What you will learn:

  • What’s the current state of web development - “knowing where you stand can help you make better technical decisions.”
  • The most popular choices are not always the best ones

About the speaker:

Laurie Voss has been a web developer for more than 25 years now and still wants to further explore this sub field. After co-founding npm and awe.sm he is currently working at Netlify as data evangelist.Recently he spoke at the JavaScript Congress of WeAreDevelopers.

Over the course of two years he did surveys and got over 10 000 responses (3000+ in 2020 and 7500+ in 2021). These consisted of three main parts:

  1. Who are we? (demographics)
  2. What are we doing? (app types, device targets, dev priorities, audience sizes)
  3. How are we doing it? (design tools, CMS choices, editors, programming languages, web frameworks)

Demographics

Laurie started the surveys by asking the participants about their job description. 82% declared themselves engineers. Of those 45% develop front end and only 5% backend, whereas 32% identify as full-stack developers.

When asked about their working experience, half stated they had five years or more and the other half had five years or less. An interesting detail regarding this topic maybe that 16% of all the developers are still students.

Concerning geographical diversity, we are looking at big changes. While 85% of all survey participants with 15 years or more experience are located in the EU or NA, only 52% of those with less than one year are located in these parts of the world. This suggests that the developers of the future are more evenly distributed over the world, which is a positive trend as Laurie states.

We also saw a huge shift to remote work. 31% kept their workplace and went fully remote (even after the pandemic). 14% adapted to a hybrid model of working and also 9% took a job that previously wasn’t an option because it was not remote.

This shift grows even more when the survey only considers developers with more than two years of working experience. 40% of those went full remote and Laurie thinks that even more will follow the next few years.

When split by job description, DevOps was most likely to go remote, with 50% of them doing so. These are followed by back end (45%) and front end (43%). Laurie sees a correlation between these numbers and how many meetings one has during their working week. The fewer you have the more likely you are going to go full remote.

All this demographic data should help the listener/reader to see who these surveys are all about.

What are we doing

First Laurie investigates the purpose of the sites developers are working on today.
First of all: Indie isn’t dead. In fact, it’s the biggest group with 37% of developers working on personal blogs or portfolios. B2B and e-commerce follow closely with 35% respectively 34%. Lead capture/landing pages come in fourth at 29%.

When asked which app types the developers sometimes or frequently work on, single page sites led with 88%, followed by mostly static with 86%, fully dynamic with 85%, and fully static with 82% of the participants.
Laurie thinks this is interesting because evidently there is as much time spent creating fully static sites as single-page apps. This will become important when talking about the huge boom in static site generators in the framework section of this article.

Then the topic switches to the most interesting target devices. After learning that 88% of US consumers' internet time is spent on smartphones, one could assume mobile is the most important platform.
But Laurie's survey says otherwise: the majority develop for desktop browsers, with 98% saying it is somewhat or very important for them. Mobile follows closely with 95%. But the difference is ultimately bigger than it sounds because 84% see desktop as very important and only 71% give mobile the preference. Also, less than half (41%) say tablets are very important for them.

Laurie means that these numbers sound accurate to him and add up to his experience.
So should we pay more attention to mobile development? Or pay less attention to people who say “mobile first”? How would you (as a web developer) answer this question for yourself?

What are your priorities when developing for the web? The number one answer is performance, so it’s higher ranked than uptime which is interesting according to Laurie. This means we want our websites as fast as possible and it’s OK if they are down sometimes, as long as that makes them fast. Security and compliance only come in third and fifth place, so it’s OK to leak data as long as the app is fast and is up and it’s OK to violate privacy laws when the site is fast and up and doesn’t leak data.

Laurie questions if these are the correct priorities but they are obviously the accurate ones and match his experience with the web. Moving fast and breaking things is apparently the industry standard.

How are we doing it

There are three parameters in this section to display the data gatherers by the survey. Awareness (how many people know it), usage (how many actually use it), and satisfaction (how happy they are with using it). As the surveys were taken in different years (2020 and 2021) Laurie is able to also display a temporal change.
One repeating pattern is the more a technology gains in users the more it usually loses in satisfaction. Laurie’s theory about this phenomenon is that the early adopters are often very enthusiastic regarding new technologies and have perfect use cases for them.

The first technological choice regards the first step of the developing process which is obviously design. While absolutely everyone has heard about Adobe XD, only 36% actually use it and its satisfaction rate is only medium. Figma blows everything else out of the water with a usage of 62% and a satisfaction score of 8.8 (nearly every other choice is below 1.0). 

A great deal of the questions was about content management systems or CMS for short. The reason developers spend so much time on CMS is the answer to a different question: “what third-party APIs do you use to build your website?”.
CMS was almost the most popular choice (53%) and as there are so many different options when it comes to these, Laurie splits it up into different groups.

The first was called “traditional CMS” and unsurprisingly the most popular one here was WordPress with 39% usage, followed by Drupal with 13% but both have quite low satisfaction scores. Users of Forestry and Ghost are a lot happier with them.
The next group is a newer one called “headless CMS”. These don’t try to provide any design input and rather allow the developer to supply and edit content and provide an API to incorporate it into a site with a self-made design.

WordPress has an API too and it’s quite popular in the headless configuration, although the leader in this category is Contentful with users twice as happy.
The last group deals with so-called “design-led CMS”. These make the visuals of the content a priority as they provide sophisticated visual editors, often with template libraries to get started.

Surprisingly to Laurie the leader here is WIX, although the developers are not really happy with it. Webflow on the other hand is also quite popular and has happy users.

Putting all of this together you get a broader picture of the topic. WordPress is strongest by usage and Sanity is strongest by satisfaction. Contentful is the most popular one that also has happy users.

The next set of data deals with programming languages. Laurie isn’t going to recommend a specific one, because everyone's taste in them is strong and different. 

JavaScript is nearly universal with a user base of 96%. A little surprise is the second most used with 67%: SQL. TypeScript is also strong with 60% and then comes Shell(Bash) with 52%.

Laurie wants to take a closer look at TypeScript as it claims to be only JavaScript, but the users don’t seem to think so. They don’t identify themselves as JavaScript developers, they do so as TypeScript developers. This becomes clearer with a more specific question: “What is your primary programming language?”

JavaScript still wins with 55% but in second place follows TypeScript with 15%. That suggests 15% of web developers think of the latter one as their primary language over the other.

When looking at the annual change something unusual stands out: TypeScript is gaining share but at the same time, the happiness of the users is rising. The other circumstance that stands out is that JavaScript is losing share and satisfaction at the same time. So, what is going on there?

Laurie states that there is a larger problem with JavaScript as it gets overextended. When someone wants to write a web application in 2021, he or she is forced to use it or TypeScript. That’s not good, because people who just don’t like these have to use it even if they hate it.

Developers who aren’t happy with the language they are working with won’t be able to write it well - as a conclusion to that, Laurie suggests that we must free the web and therefore these people from JavaScript.

One possible route for doing so would be WebAssembly or WASM. It provides a mechanism for any programming language to be compiled down to a simple form that can be executed at near-native speed.

At the time of writing (February 2022) WASM is still in development and has some technical limitations that affect both functionality and performance, but Laurie says it is getting very close to being ready.

The next section deals with web frameworks. Before they came around every company had their own web application that all did roughly the same, but they did it slightly differently. So, when you hired somebody to work on your project it would take them weeks or even months to learn your special architecture.

Then Ruby on Rails came along. It wasn’t the very first framework, but it was the first to hit mass adoption and changed the game. New employees could start immediately working because if they were familiar with the used framework, they already knew how your app worked.

This leads to the conclusion that the advantage of frameworks isn’t really that they solve technical problems but rather human ones. Having people know how your application works is a massive benefit and save a lot of time. 

Today there are three main types of frameworks: Component libraries, kitchen sink frameworks, and static site generators (SSGs).

Component libraries try to do the very basics and expect you to build the rest or use another framework on top of that. The biggest one in this group is React (67% usage), followed by Vue and Svelte.

Static site generators (or SSGs for short) produce flat HTML to be delivered to the user with little or no JavaScript at all on the client-side. The advantage of these frameworks is that they save you a lot of work on the server-side. Currently, Gatsby is the biggest one by far.

“Kitchen sink” frameworks are the biggest group. As the name suggests they try to include everything. Nearly half of the frameworks Laurie looked at fall into this category. The leading ones are Next.js (closely tied to the React framework), Nuxt.js (Vue), and SvelteKit (Svelte).

Other frameworks Laurie has tracked are for example Express and jQuery. While they have both a big user base, only Express is also liked by developers.

Final conclusions after so much data:

Demographics:

-      Increasing geographical diversity

-      Remote work is here to stay

What we build:

-      B2B and B2C are equally big

-      We aren’t mobile first (Should we?)

-      Totally static and totally dynamic sites are equally common

-      Developers don’t care to much about security and privacy

How we build:

-      WASM is going to be a big thing soon

-      React is becoming bedrock to the web

-      Next.js is a clear front-runner in kitchen sink frameworks

Thank you for reading this article. If you are interested in listening to Laurie Voss himself you can do so by following this link: Free Developer Talks & Coding Tutorials | WeAreDevelopers

Web Development Best Practices: What The Data Tells us

April 18, 2022
9
min read

Subscribe to DevDigest

Get a weekly, curated and easy to digest email with everything that matters in the developer world.

Learn more

From developers. For developers.