Development / DevOps

Frontend Development Challenges for 2021

25 Jan 2021 3:15pm, by

In my 2021 web development predictions, I identified two key trends heading into this year: serverless expanding into a more full-featured platform (for example, stateful apps becoming a reality on serverless), and the continued growth of JavaScript (and especially React). Jamstack is another growth area, although that’s at a much earlier stage. To discuss these and other frontend trends, I spoke to David Cramer, co-founder and chief technology officer of  Sentry, which offers an application monitoring platform. You can hear the full discussion on The New Stack Makers podcast, but in this article I’ll review the main talking points.

I was keen to speak to Cramer after watching his keynote at a recent virtual event held by Sentry, called “The Future of Frontend.” He said during that presentation that “the application is the frontend” and that “the frontend is your business.” His implication was that in the digital era — and even more so in this current pandemic era — there’s a good chance that many people mostly interact with businesses via an app. Think about how you deal with your bank nowadays — if it doesn’t have a decent mobile app that loads quickly and has a good user interface, that’s probably grounds to move to another bank.

Subscribe: SoundCloud | Fireside.fm | Pocket Casts | Stitcher | Apple Podcasts | Overcast | Spotify | TuneIn

So if the frontend is such a key part of a business application nowadays, what needs to improve in how developers are building those frontends? According to Cramer, the amount of JavaScript an average web application has to load is a big issue.

“Everybody notices it, because it takes so long [to load]. And so I do think there’s something that has to change. I don’t know if it’s this year or next, where we kind of rethink some of these ideas of, like, should we actually be pushing all of this logic and this code into the client? Or going back to what the web actually is, and using servers and streaming that data to our customers?”

The complexity and bloat of JavaScript code also poses a problem for debugging. How does Cramer see this issue being addressed in 2021 and beyond?

“I think the challenge we have in JavaScript — it used to be, you’ve got a JavaScript application, it’s probably animations and some fancy loading stuff, and if there was an error, maybe it didn’t impact you. It wasn’t like the whole of your website. And that’s evolved. Now, the whole thing is JavaScript!”

So the problem is that JavaScript, which started out in the mid-1990s as small code inserts in an HTML page, is now a much bigger part of a web page or app. Sometimes it even drives the whole app. Cramer thinks the browser companies have to take responsibility and approach the problem almost from a web standards point of view.

“The browser vendors have to take responsibility for this — just like they have for ad blockers and all these other toolchains that have existed in there. If you want to support this kind of thing [advanced JavaScript] in the ecosystem, you need a platform that makes it easier to support. So my naive view of that would be: to make debugging and enriching and making these big complex applications possible, we need like a standard library in the browser. We need browser vendors to extract a lot of the stuff we’re doing — frankly, we all do the same things, it all looks the same, right? And just make that common stuff almost like web standards. But I don’t know if that’ll ever happen.”

Kubernetes “hasn’t actually simplified a lot of the problems we have as developers — the people writing the business logic.”

-David Cramer

Another interesting theory of Cramer’s is that the platform layer of software development — currently dominated by Kubernetes — will increasingly be outsourced to developer-focused platform companies like Vercel and Heroku. It turns out Cramer is not so much a fan of Kubernetes.

“I don’t think Kubernetes is the future. That might be controversial, but I think Kubernetes is another tool for infrastructure teams to manage configuration, at the end of the day. It hasn’t actually simplified a lot of the problems we have as developers — the people writing the business logic.”

This of course is where so-called “Platform as a Service” tools come in, like Heroku and Cloud Foundry. But Cramer thinks those kinds of tools, that take the infrastructure burden off developers, are still “very, very early.” So in 2021, we’ll probably see a further shift towards PaaS and newer workflow-oriented platforms like Vercel.

I noted in my 2021 predictions post that there are a plethora of services for static hosting now: Amazon Web Services‘ Amplify, Azure Static Web Apps, Netlify, Vercel, Firebase and Cloudflare Pages. This trend is playing out in Jamstack too. But why is static hosting so popular currently?

“If you go back to that JavaScript developer — if all I know how to do is write JavaScript or simple web pages, I can host a static website and it’s fast. If all of a sudden I have to build a Node.js application or a Python application, and I had to figure out how to optimize that, [then] that’s a whole new set of technologies and learnings for me. [Developers] want what’s easy and accessible to them. And CDNs [Content Delivery Networks] […] have been this kind of duct tape solution to a lot of really complex problems — whether it’s caching or distribution or something like that. They’ve always been there.”

So static files, which is what CDNs commonly deliver, have become popular because they help take the burden off developers by offering what Cramer calls a “duct tape” solution. But it isn’t an ideal solution, especially when so much JavaScript has to be served up.

“Yeah, the JavaScript loads fast,” said Cramer, “but it still has to do all this logic and runtime and execution. And bandwidth is still a problem, right?”

Perhaps in 2021 we’ll begin to see frontend-focused companies like Sentry and Vercel tackle the problems of infrastructure complexity and bloated JavaScript. For more details, check out my podcast with David Cramer.

A newsletter digest of the week’s most important stories & analyses.