DEV Community

Oxford Harrison
Oxford Harrison

Posted on • Updated on

Rethinking the Modern Web

Frontend has an engineering problem!

It is one field that has forged about the most enviable tooling ecosystem by roughly every measure - from growth rate to technical wizardry - and along with that an incredible amount of thought leadership on its every move,

and yet at its bottom line:

  • the average website performance is only regressing with us!
  • the average developer productivity is only grinding to a halt!

So it turns out, all of that "vibrant ecosystem" isn't really translating to more "accessible", "functional" apps on the user front, and neither to more "speed" and "productivity" on the developer front!

The closer you get to Frontend's bottlenecks and to how much of that is tooling-induced the more you are wondering if we just have created more problems with our tools than we've solved!

Table of Contents

The Counterintuitive Equations!

Consider how self-defeating it gets...

...on the user front

Given real world network and device-capability factors, performance starts with shipping less bytes, especially when it coms to JavaScript - your most expensive asset. (Truth is, all of the extra things like instant navigations and transitions that will delight your users need your app to first be accessible!)

Unfortunately, SPA frameworks, who have this as their primary call, have their engineering model going the opposite way: towards more JavaScript! These may follow different programming paradigms... but all have got the same JavaScript bottom-line!

  • [HTML, CSS, JS] > Build_Step > [JS, JS, JS] e.g. Svelte, Vue
  • [JS, JS, JS] > Build_Step > [JS, JS, JS] e.g. React

Your final bundle here is the sum of your framework bundle, plus your essential JS, plus the induced (usually larger) JS from page structure, content, and styling - the obvious math to Frontend's terrifying payloads!

With your application's entire weight now culminating in JavaScript... and its non-JS aspects - page structure, content, and styling - now being accounted for in JS, you're now wrongly set up for the real world! It soon becomes clear how much of a knife edge you're on as your application becomes a real thing and starts to regress with every weight gained!

Not surprising... the idea of a "highly-optimized", "accessible", "functional" application quickly falls apart!

Reporting on this in the 2017 Real-world Web Performance Budgets (here), Alex Russell relates:

"I've seen teams that have just finished re-building on a modern tech stack cringe for an hour as we walk them through the experience of using their 'better', 'faster' experiences under real-world conditions."

Tim Kadlec also notes from field experience:

"What is clear: right now, if you’re using a framework to build your site, you’re making a trade-off in terms of initial performance—even in the best of scenarios. [...] If you are going to use one of these frameworks, then you have to take extra steps to make sure you don’t negatively impact performance in the meantime."

It is often excluded in the conversation, but many are winding up with more tooling-induced performance problems than they ever would otherwise! How entirely counterproductive!

...on the developer front

Performance is all about being able to tame complexity with the least amount of overhead. This calls for the abstractions/tools for managing complexity to hold to "a 'first do no harm' principle... make sure you are at least no less productive with overhead than you were without it." (Swyx)

Question is: are we really improving at managing complexity? Not when it feels like we're drowning in more complexity than ever, with an entire curriculum of deep programming concepts taking the place of what used to be the "HTML" kind of problems, and along with that a doze of compilers - that themselves have to cater to a number of new paradigms, magic syntaxes and dialects!

We must now rigor through the surprisingly high amount of code-level complexity, and pay the price of a compile-step (with Webpack and babel (or similar beast) and a barrage of configurations, plugins and extensions) to have a working web page! But that's not all, we must also bend along with mind-bending runtime behaviours (of hooks and friends), and debug through difficult-to-grok transforms of our code!

At this point... you're now entirely cracking a different grade of nut! Everything easy is hard again1!

Jelan shares her frustration:

"I'm getting more and more frustrated with all the added layers of complexity needed to work with most common frontend frameworks. I’ve hit a point where it just doesn’t seem like the end justifies the means in the vast majority of cases anymore."

And Chris Coyer puts a fitting analogy to that:

"Ironically, while heaps of tooling add complexity, the reason they are used is for battling complexity. Sometimes it feels like releasing cougars into the forest to handle your snake problem. Now you have a cougar problem."

Look what was going to land you in the pit of success2 winding you up with more complexity than you had at first! (On the essential/accidental3 scale, that's you having your "accidental" (tooling-induced) complexity trump your "essential" (real problem-space) complexity!) And again, that's utterly counterproductive!


If there's anything that's obvious, it is the one thing that ruins the experience each time: that "JavaScript"; this time, not the "JS" in the conventional "HTML, CSS, JS" approach, but the "JS" in our new "all-JS" equations:

  • the "all-JS bottom-line" engineering model - which brings all of page structure, content, and styling to JS (Build_Step => [JS, JS, JS])!
  • the "all-JS front-line" engineering model - which defaults to JS for authoring page structure, content, and styling ([JS, JS, JS] => Build_Step)!

Looking Back: The Paradigm Shift!

Signaled by React's Rethinking Best Practices pitch back in March 2013, frontend's new era has for the most part sat on what seems to be a universal axiom: the traditional web is awful; abstract it! Everything "traditional" about the web application story - from authoring to runtime - has since been doomed for an abstraction or a re-engineering - with the conventional "HTML, CSS, JS" and the DOM being the first casualty of war, and JavaScript being the new default instinct!

Whole new ecosystems of breakaway technologies have spun, each staying at a false dichotomy with web fundamentals and staying defensive about that! Here's for an insight into the thought process...

from HTML to JavaScript:

from the web platform to abstractions:

...from HTML to JavaScript

A surprising exodus ensues!

"HTML has been the running punchline in the web development community lately. [...] We are in the midst of a very large problem in the web development field, where HTML is being left in the rearview mirror in place of JavaScript", writes Mark Steadman

React's infamous movement may have had an initial context of just JSX and, later, CSS-in-JS! But unfortunately, this has swept and overturned how a broader share of the frontend tooling space thinks! There's now multiple JS-first agendas everywhere you look - even on web platform proposal boards!

Consider as honorable mentions:

  • HTML Modules - a proposed "JS-first" import mechanism for "HTML".
  • CSS Modules - a "JS-first" import mechanism for "CSS".

Slowly, some of what belongs in the HTML problem space are now beginning to land as JavaScript feature proposals - sometimes downright namesquatting HTML!

But lest you asked how "HTML Modules" and friends don't solve a problem: maybe they do! But those would certainly not be the "HTML" kind of problems, but the "accidental limitation" type of problem in the JS-first world! Proposals like this are only symptomatic of having gone the "unconventional" way; you must endlessly build JS-first bridges, seek a JavaScript metaphor for every other HTML/CSS thing, and wish the rest of the web were colored yellow! (You can tell clearly how these aren't a feature, but a means to an end!) And notice how this comes even at the risk of tight-coupling a supposed general-purpose, DOM-agnostic programming language with the DOM! (See how HTML Modules in principle tortures the JavaScript language to produce DOM primitives!)

It has turned out to be not just more JavaScript being smuggled in through the back door, but also more HTML and CSS being thrown out the window! (Probably the greater harm!) Think the case regarding the removal - rather than improvement - of HTML Imports from the spec in favour of ES6 Modules - or possibly now the name-squatting HTML Modules above! It just happened that "the JS-centric zeitgeist won" this over - to put it in Brad Frost's words!

And is someone pointing to the removal of Scoped CSS in favour of Shadow DOM based CSS? We'll come to that!

JS-first has this way led to setting fire on many good thinking around HTML just to have them reborn in JavaScript! An irreversible, all-in proposition!

Needles to say is how therefore many highly-missing features in HTML aren't even in the radar on proposal boards! When you look around, really, how much "developer mind-share" does HTML have anymore to push those?

This has been so deep that if you dared to contend with the status quo and build a specialised career on real UI development skills that means less engineering, you'd find yourself in the marginalised half of the Great Divide and risk not having a career! (So then, many devs have had to acquiesce against their own will considering that there are bills to pay!)

...from the web platform to abstractions

Suddenly, the platform is abandoned!

Born out of contempt and mischaracterization of the web platform, the focus of modern abstractions has come to seem somewhat like re-engineering web languages, replicating platform features and APIs, and duplicating the browser's efforts! The whole idea of using the web platform has remained an unattractive option for breakaway technologies. To put it in Alex Russell's words, "The incentives of framework authors are not aligned with compatibility". I often see "web standards" being touted only where it makes a big news or where the performance gains are the incentive!

Looking back at how React and its ecosystem has stayed detached over the years, Mikeal Rogers relates:

"I remember when React was launched, the whole thing was about DOM diffing. The value of it is this virtual DOM thing. Then we made the DOM fast, and who gives a shit now. But we’re still using React because of – I don’t know. [...] And then now we have Web Components and they can’t adopt it, because they’re on their own pattern, so we can’t take this feature upgrade from the platform. [And] I think there's a ton of other examples of this where the platform starts to catch up, and then the frameworks can’t." - JS Party – Episode #89 | Changelog

We just seem to be disposed to trading the "norm" and yet searching for the "kind" in the abstract world!

And what has been a particularly sad implication of the framework-first culture? The more we've invested in breakaway technologies and side ecosystems, the less we've learned about our real problem space and all the opportunities to actually move the web forward! It turns out, HTML and its ecosystem remains undertooled to date, whereas the framework web continues to flourish! You're now almost guaranteed to get stranded as being in a desert land building anything in vanilla HTML and the DOM:

"It’s really depressing that most useful tools these day are made for React projects and/or require React knowledge to set up and use. This locks out many of us who are not using React for everything & who still prefer the vanilla route for their projects." - Sara Soueidan

You just realise how much everyone seems to have disconnected from the real "problem-space" type of problems and gotten buried in "abstract" problems, leaving us with framework-specific solutions to very common problems!

It turns out, undertooling remains a real deterrent for everyone who has craved the simplicity of the vanilla web. (And this should also be one valid challenge to the challenge thrown here by Remy Sharp when he asked: what's stopping you from using exactly [that] method today?)


With so much having gone wrong in the tooling space, what follows is only expected: a community at large suffering a terrible blind spot for web fundamentals! Ground truths are now debated everywhere, "best practices" are literally going numb (hi Pete), and standards are increasingly losing their place among developers! (Consider a survey: What do you know about Web Standards?.)

Go see a typical framework-speaking dev - even in their seniors of roles; go check the typical learning path of the coming generation; and go see what the modern Frontend job descriptions on job boards are saying! Surprisingly, the modern developer career is now little about web technologies themselves and all "about [the] intricacies of the most popular frameworks", to put it in Frédéric Bonnet's words! See that?

There's a destructive information gap and a culture erosion4 now also overtaking us!

Suffice to say, the past decade has been a life of alienation from conventional wisdom, almost entirely spent trading HTML - and burning our ships on the go - in an irreversible bet on JavaScript; turning our backs and throwing dirt on the web platform to bank futures on abstractions! Yet, only a few are really talking about the almost irreversible proposition of this decade-long shift...

"In elevating frontend to the land of Serious Code we have not just made things incredibly over-engineered but we have also set fire to all the ladders that we used to get up here in the first place." - Laura Buns


Towards a Faster Web: A New Quest!

As the ills of the Framework era become more and more palpable, the bells and whistles of the decade are losing their charms on people! Folks are now coming around on our lived reality, and many are actively going back on their life's bets in search of sanity, at the risk of bringing people with torches and pitchforks to their door!

But what about the philosophy at the tooling layer: is it now time for a rethink? It depends on how much of a rethink you are asking of!

On the one hand, folks have been hard at work with identifying and addressing inherent overheads in the current system. (But of course, not with a view to rethinking the overall JS-first philosophy!)

For example, realising that the idea of shipping applications as just JavaScript wasn't working anything good on the user front, React and friends have since slid back to the idea of being able to send HTML over the network. This has called for major architectural rework (think React 18's Streaming SSR architecture); this being in addition to the existing idea of static site generation with build tools like Gatsby. Server-Side Rendering (SSR) and Static Site Generation (SSG) have been such a feat for the status quo!

So, right now, HTML and progressive enhancement have again become an attractive option to what has been the "all-JS or nothing" camp. (In fact, Remix has this as a new bragging right! In its own words: who knew?) Put together, all of the new takes here just represent a new game plan: a long walk back to the basics; a bit of a compromise on its initial takes, but a bit of some greater good: towards a faster, functional Frontend!

On the other hand, a new wave of innovation is taking center stage with a more ambitious take than the ongoing long, painful walk back to the basics: this time, the idea of an outright HTML-first, "progressive enhancement" architecture from start! (SitePen Engineering gives the perfect Intro to HTML-first Frontend Frameworks featuring Qwik, Marko, Astro, 11ty, Fresh, and Enhance; and this is absolutely worth your time!)

I find this especially interesting because, finally, everyone can see that the idea of a faster web didn't have to be the hard, compute-intensive, and yet elusive thing we've had for years! It is now clearer than ever how much of an absolute illusion we've been on... in staying fixated to JS and yet subscribed to HTML, albeit cleverly! You'd also realise: HTML over the network didn't have to be any "modern" wisdom or such a big deal of an innovation, or any feat! Not when this is something the web has had from genesis! (Streaming SSR from day 1 of PHP, anyone?)

Sad that we seem to only live after the fact when it comes to tooling, but thanks to the new wave of frameworks for shedding the light that openly challenges the status quo! Finally, we've come to a point that we can be hopeful about: the prospect of having "accessible", "functional" applications at half the price! (Hopefully related is how we've now for the first time - since the JS-making epoch - recorded a less steep increase in the amount of JavaScript shipped to users!)


So are we good now? Well, not just yet!

Not when it seems that we've come only halfway with the idea: sending pages as HTML but authoring them as JS; addressing the tradeoff problem and its overheads on the user front but leaving it unchanged on the developer front! Clear yet? Much of the "HTML" in our new HTML-first equations is still the tooling-yielded HTML, not the hand-authored HTML; same as before where HTML is treated as a compile target, an implementation detail... something you'd abstract to have a good DX! "Tooling" still remains Frontend's primary means to its "HTML" end!

This sheer idea of getting "HTML" behind a compile wall in favor of an abstraction is also where it begins to tell that we might yet be suffering the decade-long blindspot for the platform in a new way - embracing HTML for just the performance incentives and not for the whole idea of using the platform! Let's just throw it out there: Frontend still isn't aligned with using the platform to give legacy tooling their well-earned rest and take a correction back to simplicity!

Chad Fowler notes how deep-seated this is:

"The older I get, the more I realize the biggest problem to solve in tech is to get people to stop making things harder than they have to be."

So, how about just taking the plunge... and embracing the whole web platform thing? Now, we would not only be unlocking performance on both the user front and the developer front, we would be doing more: unleashing the web's full potential! (And what could be a more ambitious goal?)

Actually, this is why we're here! Can we skip to the good parts?


Introducing: Web-Native Development!

Take this as not the name of a new framework or some anti-framework movement, but as a playbook to unleashing the web's full potential.

Web-native development5 is an approach to web development that sees the web platform as an enabler in the whole application story, and in fact, a fundamental key to succeeding at each phase of that story - from authoring to runtime! This comes as a hard reset to the decade-long cultural shift and its pessimistic take on the web platform!

This is really about embracing and leveraging native web technologies, APIs, languages and conventions, etc, and minimizing tooling! For a fact, there comes a time in life when this is all you really want... get things done with less of the drama! "I've been in enough teams in my 20 years of programming to value this part almost more than anything else", writes Andrea Giammarchi!

As the platform and its technologies and languages advance, we often can find multiple opportunities "to shed a lot of this tooling" and defer to native approaches. (JS Party - Episode #89 | Changelog) Good to know is that tools are only as good as being solutions to unsolved problems, not solved problems! Anything in exception soon begins to change the narrative to something counterproductive! Thus, for all we've bet on custom tooling, we must now beat that Sunk Cost fallacy6 to explore what's natively available!

At the end of the day, web-native development gets you banking more on the web platform and less on abstractions! You're now on the winning side - rather than on the contending side - of the web's "moving" story! You're now winning as the platform unfolds!

George Katsanos explains how this allows us take back more brain cycles to finally go make something:

"It should be obvious to all of us that if we would focus all our efforts in the Platform and stop reinventing the wheel [...] we would have a lot more free time to focus on the real reason we are in this job which is to deliver fast, stable, secure, user-friendly interfaces."

So, where's a good place to get well-rounded with the web platform? Chrome's web.dev developer centre is a treasure trove of resources on key web design and development subjects, maintained by the Chrome team and other industry experts! (Here's the learning centre.) And for when you need to take the web platform by its individual technologies, here is MDN! (And here's the learning centre.) For showcases, here is one: Using the platform - a delightful piece of a story on going buildless with ES6 modules and going framework-free with Web components, written by Elise Hein!

Up next is: how far does this go in real life? Build a twitter clone with zero tooling? Uhh, that has never been the idea, and we may never get there! The web platform is anything but a framework of its own! At some point, we are going to have to need higher-level abstractions over native lower-level features! Where there seems to be a bit of a bad news is that the current state of HTML and the DOM makes that happen sooner; it isn't long into the journey before gaps and dips in the platform gets you into forced labour! But we can easily turn this around by investing along two lines:

  1. Low-level tooling: platform-focused initiative to standardise and factor into the platform common web development architectures and paradigms. (We're overdue for native-level reactivity and a more empowering component model - just to mention a few!)

  2. Higher-level tooling: community-focused initiative to extend the platform's low-level capabilities with "web-native" libraries and frameworks. (We need a new wave of modest abstractions that draw on the web platform and let us do the same!)

This is where I put my money where my mouth is! I'd like to take you on a few ideas I've been working on along these lines!

Open to some tooling ideas?

Explore with Me...

Our journey spans a series of posts! We begin with the underlying equations and move on to a showcase of the proposals and polyfils, the userland libraries and framework!

For the curious, here's a sneak peak into this project on github.


Notes

  • No frameworks were harmed in the creation of this article.

Acknowledgements

  • Special thanks to Alex Russell for the time spent reviewing this article!

References


  1. Borrowing Frank Chimero's title: Everything Easy is Hard Again 

  2. Defining The Pit of Success 

  3. See Fred Brooks: No Silver Bullet (PDF) 

  4. See Cultural Erosion 

  5. "Web-native" is a recurring theme across multiple initiatives and paradigms: 

    Some related tags:

  6. See Sunk Cost Fallacy 

Latest comments (51)

Collapse
 
yw662 profile image
yw662

Besides the react lock in, we have npm and webpack (or bundler) lock in as well. It doesn't have to be npm or webpack, it doesn't have to be node, but we have to pick a compiler/bundler we like in the end because those libraries are designed to be used like that. This is worse than the react lock in.

Collapse
 
yw662 profile image
yw662 • Edited

I don't think it is a real issue to have a "web app" to support "platforms without javascript support". If it is an informative page, yes it is better if it can work without javascript, it is great if it provides a human readable result for curl. But if it is an app, curl is not your target platform.
So "build everything to js" is not really that bad if you are working on apps, like games, online tools or the comment box for dev.to, instead of pages, like wikipedia or dev.to (except comment box).
And, custom elements, as one of the native web thing, needs js.

As a react hater, the biggest issue I found with being native is type checks, analysis and verification. Native web APIs have a dynamic and permissive nature, eg. a random generated piece of text has a good chance to be a valid html document, you just need a <!DOCTYPE>. They have to because they are supposed to be compatible. But it is really hard to tell whether you are doing things right because it will never fail until it has to.

Collapse
 
m18ab profile image
Spenser McLaughlin

As a new developer in the field, the most confusing aspect about all of these platforms is the tradeoff between features and performance. You’d think that heavy frameworks like React would be able to deliver far more features and functionality than a web component architecture, but that isn't the case.
To me, these approaches are already far more approachable than React and Angular. Having a pre-existing knowledge of Java and Python, the proprietary syntax of React and Angular was far more confusing than web components. The big issue is that the other two have much more support, so providing exposure and resources for web components and VanillaJS is key.
On my first stab at web development, web components weren’t immediately easiest to work with, as they required a little more setup than Vue or Angular. In those frameworks, I could just copy and paste my CSS and HTML into a boilerplate and have it work with almost no hitches. However, after this initial step, building on my code and using JS in these frameworks was considerably more difficult than it was in the web component structure, where it was ported over much more easily.
Nonetheless, when I was actually tooling the JS together, nothing clicked immediately. What was especially confusing at first was the inability to style certain parts of my card, which I later learned was due to it being inaccessible within the ShadowRoot. This caused me to struggle with connecting buttons (not part of my card) to the actual style changes I wanted to appear in my card.
However, what helped me get through my issues was finding similar issues on Stack Overflow (such as this one and this one).

Collapse
 
fruntend profile image
fruntend

Сongratulations 🥳! Your article hit the top posts for the week - dev.to/fruntend/top-10-posts-for-f...
Keep it up 👍

Collapse
 
oxharris profile image
Oxford Harrison

Many thanks here.

Collapse
 
bretbernhoft profile image
Bret Bernhoft

This is one of the more interesting posts I've read on this platform. Thank you for getting back to the basics with your ideas.

Collapse
 
sentadoensilla profile image
sentadoensilla

Versioning -> use -> deprecated, all in the same year. Why become javascript as annoying as java and insane as android. Why????????
Please stop to annoying javascript. Versioning and deprecating in same year is insane for developer they became person with framework addiction

Collapse
 
yw662 profile image
yw662 • Edited

The only "real versioning" they have ever done to js is "use strict". It is really only two versions in js: the old one and the strict one. Nothing is ever deprecated in js.

Collapse
 
efpage profile image
Eckehard

Is this really true for Javascript?

There certainly is some progress in JS over the years, and not all browsers are in line with the newest ECMA-version. But there are valuable tools like Can I Use... to find a common sense.

Nobody stops you from using older versions of Javascript, and if you go with a version, that is about 3-4 years old, you will probably get no compatibility issues.

Collapse
 
rytis profile image
Rytis

What a great article! So many references, I will have to spend a full working day reading them all!

I'm very glad that you've mentioned Hype Driven Development, because that has been my exact experience with frontend development. There was a time when I've learned React, and I've actually really liked it. I've even built a couple of sites with it. Then they've decided that classes are now considered old and discouraged, it's all about functional components. After a year I needed to revisit React for a project that I had, and to my utter shock I've realized, that I no longer know React – it's a totally different library now. I kinda gave up on frontend after that.

It started out as a great idea and a great solution, but it has morphed into something really horrible. You don't need to look too far – Facebook's performance is atrocious, and so is the performance of any slightly bigger website written with React.

Another thing that terrifies me is the emergence of JS in the backend world. I can imagine a bunch of suits in a meeting room: "You know all these frontend devs that we have? Let's make them also do backend. They don't have to learn anything new, because they can use the same language for that". And then you get billing modules written in a language that only uses double precision floats for the numbers.

Collapse
 
dastasoft profile image
dastasoft

Thanks for sharing this article, I would like to point out also some points that I have found in different places that I think plays an important role in this situation:

  • Many companies tend to think frontend = easy stuff and backend = very complex, sensitive and difficult so, for frontend the choice in most cases is to dedicate their staff with less experience and less resources, while in backend there is a constant talk about architecture, best practices, how to improve security, etc. So my point here is, we have to admit that frontend now, in some cases, has a lot of logic and cannot be approached like 15 years ago.

  • One size for all, as engineers I think one of the most important things we should do is to use the right tools to achieve the best solutions and nowadays I think it's easier than ever to get caught in the FOMO/hype train and end up making simple websites that don't even require JS at all with high bundles.

In a way this is normal, or at least expected, as our industry continues to gain traction and tools become better abstractions it is entirely to be expected that we will see more products with less overall quality or deep understanding of the whys.

Collapse
 
oxharris profile image
Oxford Harrison

Very well put. Those two points stand out. And these things don't easily correct themselves. It's sad.

Collapse
 
jankapunkt profile image
Jan Küster • Edited

From what I have learned the last years I came to the following rules (top-to-bottom) I try to follow, where possible:

  • if there is no use-case for it from a user perspective, cut it
  • if you can define it using plain html, use plain html
  • if you can style / animate it using css, use css
  • if you can model it using JSON files, use JSON files
  • if you can process it using vanilla JS + web standards, use them

Someone might wonder, why I added the first line, which is not related to html, css, js etc. but I honestly believe, that all this framework mania is also a result of the scope-creepiness of developers, managers, ceos etc.

The less features a web-app requires (the name app already implies a lot!) the less there is real need for big, complex frameworks, bundling, transpiling etc.

I broke that down for my personal website and came the result that I will do it by hand with html, css and super minimal vanilla js. Took me roughly one day to complete it, including 100% lighthouse score.

I would even advocate for simple use-case websites, that there is no need for a database! Unless your total amount of files goes into the hundrets or above you may be totally well using JSON files.

The argument that it may have to scale is to me again a scope-creep argument, leading to premature optimization for scale and - again - bloated code with lots of unused code shipped to clients.

Collapse
 
oxharris profile image
Oxford Harrison

I found that the older you get, the more you come to these principles. You begin to see the "more" in "less".

Collapse
 
leob profile image
leob • Edited

Yeah with stuff like Astro and Remix the trend is clear - back to "shipping" more HTML, less JS ... progressive enhancement. In a way we've come full circle - but with tons of complexity (and overhead?) added :)

Honestly you can't blame the "abstract the web" folks, because the web as a platform was just not cutting it - not as an application development platform, that is - it was underpowered.

But look at how much the "native" web standards have grown and evolved, and how browsers have become more capable - the 'native' web now is becoming a credible app development platform.

(case in point: native browser support for ES6, so that we can - at some point - finally get rid of Webpack/Babel and the need to eternally "build and bundle")

Now the only ;) remaining problems are:

  • native web is becoming better ... really good even ... but still not quite there?
  • frameworks frameworks frameworks, too many options ... framework fatigue
  • builders, bundlers, tools, more tools ... tooling fatigue
  • native web APIs are huge (just look at CSS), does it still all fit in my head? :-D

Seems simplicity won't ever come back, but well, probably ChatGPT or its successors might be writing much of our code in the future anyway :-D

Collapse
 
oxharris profile image
Oxford Harrison

I agree with you. To be fair "abstract the web" was good thinking at the time; the web was indeed TOO underpowered! But what went wrong? Staying fixated to a mission whose premise has changed! It's a depressing insight when you realize how much of today's innovation is still living in the past, solving for "already solved problems".

And simplicity is sooner than you think. Trust this woke generation and its new quest!

(No, we aren't asking for too much; just let's collapse the current heaps and crates of legacy tooling, and we'll be fine.)

Collapse
 
leob profile image
leob • Edited

Nice one:

when you realize how much of today's innovation is still living in the past, solving for "already solved problems"

But CAN we already, realistically, build any kind of complex/sophisticated web app WITHOUT any sort of add-on tooling or framework?

Thread Thread
 
oxharris profile image
Oxford Harrison • Edited

Spoiler: No!

how far does this go in real life? Build a twitter clone with zero tooling? Uhh, that has never been the idea, and we may never get there! The web platform is anything but a framework of its own! At some point, we are going to have to need higher-level abstractions over native lower-level features! Where there seems to be a bit of a bad news is that the current state of HTML and the DOM makes that happen sooner; it isn't long into the journey before gaps and dips in the platform gets you into forced labour! But we can easily turn this around...

And let's stress again that we are here because we chose to move forward with the framework web and not the platform.

Thread Thread
 
leob profile image
leob • Edited

The fact that a whole bunch of browser vendors need to all faithfully implement these complex standards is one key reason why "web the platform" has advanced at a snail's pace (but it's picking up speed now) ... let's be honest, for a long time (the longest time) the web as an app development platform has been severely underpowered, JS frameworks were realistically the only way to do anything sophisticated with it.

(remember the "browser wars" of the 90s with Microsoft at its center, and actively and deliberately trying tp sabotage the standards with its own proprietary nastiness - the multiple "modes" of IE, ugh, shudder)

But aren't web components the way forward then? And what about web assembly?

Collapse
 
christoslitras profile image
Christos Litras

Whenever I read such articles, I'm thinking that people tend to easily forget why libraries like React/Vue/Svelte exist in the first place. People seem to be forgetting, or maybe lucky enough to never came across some jQuery spaghetti nightmare apps or the PHP/ASP templating and concatenating of the past.

And what is proposed, vanilla JS, really? Start and use getElementById or querySelector and then write a bunch of lines just to make a single variables' value to be reactive and apply that to the DOM using native Proxies, well thanks but no thanks for me.

Don't reinvent the wheel just because the technology stack seems hard to you.
We can write simple web apps using vanilla JS with HTML/CSS but for complex application, the way is by using a mature and reliable library/framework rather than creating a custom framework/library that does things I want "the native way".

Collapse
 
nielsabildgaard profile image
Niels Abildgaard

The standards are moving really fast these days, and a lot is changing---and has changed since the launch of youmightnotneedjquery.com/ :-)

There are also a lot of much smaller ways to get started with building slightly dynamic websites - you may not need a full frontend framework. See e.g. dev.to/bindthis/avoid-server-side-...

There are still lots of good reasons for frontend frameworks to exist---but there are also lots of cases that do not need them (and where leaning into what the web already does well would result in a better solution), where they are still used, to the detriment of user experience.

It's... nuanced, basically :-)

Collapse
 
fa7ad profile image
Fahad Hossain • Edited

It's... nuanced, basically :-)

Basically everything is nuanced xD

There are also a lot of much smaller ways to get started with building slightly dynamic websites - you may not need a full frontend framework. See e.g. dev.to/bindthis/avoid-server-side-...

This is purely anecdotal,
I was once a junior dev that thought "this application is small enough, maybe I can get away with a much smaller framework." and for a while I did get away with it. Until product decisions made it nearly impossible to work with the small framework; worse still, no one else on the team knew the tiny framework. So, in the end we had to give up and rewrite the application in a scary big framework because in the end the little bump in size was nothing compared to the unmaintainable mess that would have resulted in continuing to use an obscure tiny framework that might be abandoned in 3 months.
If you're thinking, "hey how about relying purely on platform code and no framework".
This can go one of two ways and imo both are terrible,

  1. You write spaghetti code because native platform offers very little in the way of code re-usability etc.
  2. You bring in some additional tooling, come up with some patterns and re-usable chunks of code.... congrats you just made your own special framework; bonus, there's little to no documentation for it. Good luck explaining it to a guy who has never worked in your org/team xD
Collapse
 
jonrandy profile image
Jon Randy 🎖️ • Edited

Did you read all of the proposals in GitHub? It sounds like you may not have, or possibly didn't understand what is being proposed?

There are some really good ideas in there.

Collapse
 
drewknab profile image
Drew Knab

We've been rethinking the modern web every three years since XHTML 1.0 was a hot new spec.

Collapse
 
csaltos profile image
Carlos Saltos

I'm so glad we are using Elm in my company ... nowadays the best trade off between traditional and modern with a unified platform

Collapse
 
dbroadhurst profile image
David Broadhurst

The day a developer started their web development career they signed up for abstraction. The DOM abstracts the GPU, JavaScript abstracts the CPU and memory. All things considered frameworks are the last 1/100th abstraction layer.

Although the developer stack has increased in complexity using this stack has become trivial. Using something like NestJS It's easy to create a project that has all modern development features and with little effort and deploy to the cloud.

Typescript has pretty much replaced Javascript for good reason, it's a great abstraction that comes with extra complexity but increases developer productivity and reduces runtime errors.

As always selecting the right tool for the job is critical. Building a low complexity website requires different tooling and skills than making a highly interactive web app. I think there's still a few more abstraction layers to come such as AI code generation and Low / No Code tools that will push even more abstraction and widen the debate.

Collapse
 
insidewhy profile image
insidewhy

I think react is responsible for a lot of this (I'd say angular also if it was still popular).

Everyone loves it, but it really isn't very good. You constantly have to worry about implementation details of react itself to write even a basic component.

Everybody got on a really lousy bandwagon. Then if you want to make money as a front end engineer you're forced to learn it because it's where 90% of the money is.

I'm not against abstractions when they give you more than they take away, I'm not against frameworks, I'm just confounded that the very worst frameworks are the more popular ones.