Less JavaScript

Every front-end developer at Clearleft went to FFConf last Friday: me, Mark, Graham, Charlotte, and Danielle. We weren’t about to pass up the opportunity to attend a world-class dev conference right here in our home base of Brighton.

The day was unsurprisingly excellent. All the speakers brought their A-game on a wide range of topics. Of course JavaScript was covered, but there was also plenty of mindfood on CSS, accessibility, progressive enhancement, dev tools, creative coding, and even emoji.

Normally FFConf would be a good opportunity to catch up with some Pauls from the Google devrel team, but because of an unfortunate scheduling clash this year, all the Pauls were at Chrome Dev Summit 2016 on the other side of the Atlantic.

I’ve been catching up on the videos from the event. There’s plenty of tech-related stuff: dev tools, web components, and plenty of talk about progressive web apps. But there was also a very, very heavy focus on performance. I don’t just mean performance at the shallow scale of file size and optimisation, but a genuine questioning of the impact of our developer workflows and tools.

In his talk on service workers (what else?), Jake makes the point that not everything needs to be a single page app, echoing Ada’s talk at FFConf.

He makes the point that if you really want fast rendering, nothing on the client side quite beats a server render.

They’ve written a lot of JavaScript to make this quite slow.

Unfortunately, all too often, I hear people say that a progressive web app must be a single page app. And I am not so sure. You might not need a single page app. A single page app can end up being a lot of work and slower. There’s a lot of cargo-culting around single page apps.

Alex followed up his barnstorming talk from the Polymer Summit with some more uncomfortable truths about how mobile phones work.

Cell networks are basically kryptonite to the protocols and assumptions that the web was built on.

And JavaScript frameworks aren’t helping. Quite the opposite.

But make no mistake: if you’re using one of today’s more popular JavaScript frameworks in the most naive way, you are failing by default. There is no sugarcoating this.

Today’s frameworks are mostly a sign of ignorance, or privilege, or both. The good news is that we can fix the ignorance.

Have you published a response to this? :

Responses

Tom Tinkerson

yeah, like convenience foot is good for health b/c ppl can’t (afford to) cook ;-)

patrick h. lauke

there’s developers who should know better but instead follow fashion, and those who are not expert enough to even decide

patrick h. lauke

how do you evaluate something without knowing what it is you’re trying to evaluate? not possible for many non-experts…

patrick h. lauke

non-experts will often just look at “this is popular, used by these big companies/projects, so must be good”

2 Shares

# Shared by Gabor Lenard on Thursday, November 17th, 2016 at 3:38pm

# Shared by Sam Wainford on Thursday, November 17th, 2016 at 9:43pm

2 Likes

# Liked by Gabor Lenard on Thursday, November 17th, 2016 at 3:49pm

# Liked by tedepstein on Saturday, November 19th, 2016 at 1:45pm

Related posts

Progressive disclosure defaults

If you’re going to toggle the display of content with CSS, make sure the more complex selector does the hiding, not the showing.

Schooltijd

Going back to school in Amsterdam.

Switching costs

The enshittification of React …which was already pretty shitty for users.

Speedy tunes

Improving performance on The Session.

Multi-page web apps

A question via email…

Related links

PodRocket - A web development podcast from LogRocket: HTML web components with Chris Ferdinandi

I somehow missed this when it came out in January but Amber just pointed me to it—an interview with Chris about HTML web components, available for your huffduffing pleasure.

Tagged with

Churn

This is a good description of the appeal of HTML web components:

WC lifecycles are crazy simple: you register the component with customElements.define and it’s off to the races. Just write a class and the browser will take care of elements appearing and disappearing for you, regardless of whether they came from a full reload, a fetch request, or—god forbid—a document.write. The syntax looks great in markup, too: no more having to decorate with js-something classes or data attributes, you just wrap your shit in a custom element called something-controller and everyone can see what you’re up to. Since I’m firmly in camp “progressively enhance or go home” this fits me like a glove, and I also have great hopes for Web Components improving the poor state of pulling in epic dependencies like date pickers or text editors.

Tagged with

What Is A Single-page Application?: HeydonWorks

You can’t create a complex modern web application like Google Mail without JavaScript and a SPA architecture. Google Mail is a webmail client and webmail clients existed some time before JavaScript became the language it is today or frameworks like Angular JS or Angular BS existed. However, you cannot create a complex modern web application like Google Mail without JavaScript. Google Mail itself offers a basic HTML version that works perfectly well without JavaScript of any form—let alone a 300KB bundle. But, still, you cannot create a complex modern web application like Google Mail without JavaScript. Just keep saying that. Keep repeating that line in perpetuity. Keep adding more and more JavaScript and calling it good.

Tagged with

jgarber623/aria-collapsible: A dependency-free Web Component that generates progressively-enhanced collapsible regions using ARIA States and Properties.

This is a really lovely little HTML web component from Jason. It does just one thing—wires up a trigger button to toggle-able content, taking care of all the ARIA for you behind the scenes.

Tagged with

JavaScript Bloat in 2024 @ tonsky.me

This really is a disgusting exlusionary state of affairs.

I hate to be judgy, but I honestly wonder how the people behind some of these decisions can call themselves web developers.

Tagged with

Previously on this day

8 years ago I wrote Brighton device lab

You should come by the Clearleft office and test your website on many many devices.

17 years ago I wrote Spoken

I delivered my spiel on microformats.

19 years ago I wrote Client communication

There’s a great interview with John Allsopp over at the Web Standards Group. John is the author of one of my all-time favourite articles over at A List Apart: Dao of Web Design.

20 years ago I wrote Sprint CSS

I got a nice email today from a very talented web developer named France Rupert telling me about the newly redesigned Sprint PCS site.

21 years ago I wrote Bringing Entertainment Home

After a long week of staring at code, I finally had some time this weekend to sit back and enjoy my new computer.

22 years ago I wrote The ugly world of PCs

Jessica and I got plenty of exercise today. We walked to the far end of town to look at the wares at PCworld.