I can only think that modern front end development has failed
twitter.com
twitter.com
Such sites should be using minimal or no JS. These aren't meant to be pretty interactive sites, they need to be solid bulletproof sites so people can get critical services. And I haven't even mentioned how SPA sites often lack any accessibility features (which is so much easier to implement if sticking to standard HTML+CSS and no/minimal JS).
They think that server side is slower because you have to send down more data, or you have to wait for the server to generate HTML.
Quite the contrary, it's slower to send down 1 MB or 10 MB of JavaScript to render a page, than to simply send down a 100 KB HTML page. Even if you need some JS also, browsers know how to render concurrently with downloads, as long as you provide enough HTML.
Rendering HTML on a server side Intel/AMD/whatever CPU is way faster than rendering it on a mobile device (and probably more efficient too).
Even if it weren't faster and more efficient, it would save battery power on the client.
And there is a ton of latency on the client side these days, ignoring network issues. There are ways of using the DOM that are expensive, and a lot of apps and frameworks seem to tickle those pathological cases. These 20-year-old browser codebases don't seem to be great workloads for even modern Android or iPhone devices.
---
edit: To be fair, I think what's driving this is that many sites have mobile apps and web apps now, and mobile apps are prioritized because they have more permissions on the device. (This is obvious when you look at what happened to Reddit, etc.)
It's indeed a more consistent architecture to do state management all on the client. Doing a mix of state on the server and state on the client is a recipe for confusion -- now you have to synchronize it.
Still there are plenty of apps that are website-only, like the government sites people are talking about. Those people appear to be copying the slow architecture of the dual mobile+web clients and getting a result that's worse.
Either the existence of the mobile app, or the drive to get people to install it, ruined the website. It's slower and has poorer usability than 5 years ago, and also 15 years ago.
Twitter is another company that existed before the App Store and the SPA trend. I noticed they recently turned off the ability to see the 280 chars you care about without having JavaScript on :-(
It's trivial to have a no-JS fallback, and they had it, but turned it off.
I'm more of the classic take that the "problem" is performance has continued to grow meaning we get more stuff made faster but the tradeoff is it runs at the same speed. Client side or server side there is no reason the app needs 10 MB of JS logic to do its job it just made it quicker and easier to deploy to have it use 10 MB of JS logic. For some things like required government services this is a real problem but for most things this is just reality - how fast a piece of software is isn't the only benchmark software is made against, often not even in the top 3 things it's checked against.
——
A simple checklist to provide superior front end applications:
* Don’t use this. You (general hypothetical you) probably don’t realize how easily you can live without it only because you have never tried. Doing so will dramatically shrink and untangle your spaghetti code.
* Don’t use addEventListener for assigning events. That method was added around the time of ES5 to minimize disruption so that marketers could add a bunch of advertising, spyware, and metric nonsense everywhere more easily without asking permission from developers. That method complicated code management, is potentially point of memory leaks, and performs more slowly.
* Don’t use querySelectors. They are a crutch popularized by the sizzle utility of jQuery. These are super epic slow and limit the creative expression of your developers because there is so much they can’t do compared to other means of accessing the DOM.
I now add ESLint rules to my code to automate enforcement of that tiny checklist.
> Quite the contrary, it's slower to send down 1 MB or 10 MB of JavaScript to render a page, than to simply send down a 100 KB HTML page. Even if you need some JS also, browsers know how to render concurrently with downloads, as long as you provide enough HTML.
The argument I remember from years ago used "slower" as a bad simplification. What it actually meant was, doing the rendering server-side wasted CPU the server could be using to respond to another request. Instead, just send the data and distribute some of this processing to all your users by way of client-side rendering.
Also, back then bundling was a lot rarer than it is now, so the large libraries that made of most of those 10 MB javascript files would be separate files the browser can keep cached.
sometimes it can be done right.
And it uses a framework :-)
Eg. It says ‘what is your date of birth?’ And then on the next page it says. ‘You are X years old. Is that correct?’
At the end, just before submission it showed the completed sections, and you could look at each section to see a tidy summary of the answers provided. Except for the section 1, where doing that jumped to the last of the section's questions instead.
I wanted to see one of the answers I had given in the section 1 to check before committing, and due to the missing summary page, tried stepping backwards and forwards through each question. All were shown, except the question I wanted to check (and had answered) was skipped.
Inspired to try things, I added a non-existent person to the household, then removed the non-existent person.
After that, when I stepped through all questions in section 1 it included the question and answer I'd been looking for, allowing me to confirm it was correct before submission.
I work on one such project and it absolutely drives me nuts -- it's a rails app, but the customer front-end (which is literally just a form to fill out) is a React SPA. There is nothing there that couldn't be done with Turbolinks and some light JS for validations/popups.
And the tech doesn't really matter. I hate React with a passion, because Angular is so much more sane - in my experience. But it's fine. It's mature, it can be made to perform completely well.
The tech doesn't really matter. The people doesn't matter either. Even the costs doesn't matter as much as people think. What matters is political will, procurement culture, so systems and structures. This will influence (and bring) all the others in line.
First of all, for all the broken websites there are also a lot of websites that are not broken at all. It's also very easy to make a broken website using a completely server-side rendered website, and that actually happens often enough.
Second, SPA's decouple frontend and backend in a very strict way, which can bring enormous organizational benefits. Time-to-market is greatly improved, etc.
This whole "frontend vs backend" dialogue is basically white noise that completely misses the point. Use SPA or not, whatever, in the end it's just a tool to get the job done. Both are prone to errors when handled improperly.
A website that got it completely right is the Dutch corona dashboard called "Coronadashboard" created by the Dutch government: https://coronadashboard.rijksoverheid.nl. It's blazingly fast, extremely well-designed, looks great and the code is of exceptional quality. Also it's open-source, have a look at the code: https://github.com/minvws/nl-covid19-data-dashboard/.
The dashboard is completely written in Javascript. I truly believe a website with of such high quality would not be possible without frameworks such as React or Next.js (or whatever other framework and their respective tooling has to offer).
Closing note: let's try learn more from the websites that got it right than the ones that have failed. It's so easy to be critical, it's much harder to give some praise.
Not sure what everyone else here is using but you're right, at least for me the website is running buttery smooth in both Firefox and Chrome and the code is of exceptional quality.
> I truly believe a website with of such high quality would not be possible without frameworks such as React or Next.js (or whatever other framework and their respective tooling has to offer).
I agree. I wrote my first lines of HTML & CSS almost 20 years ago and back then JavaScript dev was nightmare. People wouldn't even have been able to create an interactive website like the Coronadashboard. (Of course we're not talking about static websites here – these were already relatively easy back then.) Nowadays, JavaScript dev admittedly still is a nightmare but there are at least tools like TypeScript, Angular, React and so on that make things a bit less painful and allow experienced web developers to create exceptional frontends. I'm putting "experienced" here because the frameworks still come with some pitfalls and bad practices are still very common. (I can't believe how many tutorials about using forms with React still recommend updating the state and re-rendering the entire form upon every.single.keystroke.)
Can you please clarify this?
If you are referring to a web app time to market I mostly see otherwise.
Here is an example: create a form to edit user settings. In Rails/Django it is pretty simple straightforward. But if you go React then you have an API and a component in React and have to think about routes and security of API and validations on both FE and BE.
There are advantages for SPA probably but time to market is not one of them in this case.
If you are referring to creating a mobile app and a webapp then maybe React with React Native is indeed faster. With this I agree. But I personally prefer to wait for Hotwire to launch their mobile framework and use that.
I've experienced and have witnessed quite the opposite with SPAs
On a separate note, I think the dashboard is alright but I wouldn't call it excellent. It's a bit slow and some things, for example mousing over the map, are glitchy.
There will be some tweaks and changes to the API to support the UI, but it's rarely drastic, and it ensures that every single capability we build out can be exercised by some other kind of program somewhere.
If you're building components of a larger system (which we do), SPAs and web components atop back-end APIs make sense. If you're building a one-off fill-out form kind of application... No those don't make sense. You don't even need JavaScript for those, if you degrade into just HTML + CSS for users that have shut off JS.
I was surprised recently as I had to fill in a massive form based site for UK NHS mental health survey stuff. The site appeared as a flat background old style early 2000’s sort of thing with bits of comic sans in it. I nearly died when I first saw it expecting a shit show.
But it turned out to be responsive and fast. It worked perfectly from end to end and had little to no JavaScript. It was by far the best thing I’ve used for years. There were over 100 page transitions in total. It wasn’t an SPA but a classic web site with little or no intelligence. Seemed to be backed by python.
I want this back.
That's surprising - even external stuff usually has to follow the NHS's design system.
Right. It probably IS an old site and they've had years to iron-out bugs.
At the same time the real question is why lots of governments wouldn't need to reinvent everything. That is maybe the original sin.
I'm not sure if the problems have been fixed, but they were both recognized and a process was put in place to address them after the healthcare.gov debacle.
Unfortunately the incentives are backwards. Typically governments have to choose the lowest bid. Those private companies you mentioned can make more complex tradeoffs.
Sometimes, of course (cough Florida unemployment and covid tracking sites), failure in performance is by design.
Government services were slow and unreliable before computers. The problems aren’t technological.
When I click on a link, or click to submit something, and I realize that it's NOT an SPA, my immediate thought is "this is going to be a nightmare."
When I click a button, and it has to make a request to load the next set of html, fully replace the page contents, and probably submitted a post request that will have issues restoring the state of my form if I go back, etc, I feel like I'm on a DMV site from the 90s. Navigating something that is meant to operate as a cohesive application by instead using a series of markup displays is only ever going to be hacky at best. I love using SPAs, because they're actually applications, rather than snapshotted frames of an application running on a remote server.
One of my duties is performance improvement, so I’m very familiar with problematic architectures. You can have an instantly loading informational SPA... I tend to use Gatsby for that. For more interactive sites, I prefer vanilla React with lightweight libs, code splitting and sensible caching rules.
I do agree that poor design, reluctance to refactor and lib/tracking heavy apps are very problematic. Isn’t that something that’s always been a problem in Webdev?
It's much better than people make it out to be.
I don't understand this.
Frontend dev is about writing a portable software to run on as many runtimes as there are users. There is literally nothing to prevent any frontend software, good or bad, to "scale", because scaling in terms of users is nonsical for frontend dev (unless you consider browser compatibility as scaling, to which statement I'm orthogonal).
Note: meanwhile, back end dev is about writing a program that accepts as many users as possible, which make front and back nicely yin-yang together. But maybe I'm overstating things here :shrug:
https://infrequently.org/2021/03/the-performance-inequality-...
More context in older post:
https://infrequently.org/2017/10/can-you-afford-it-real-worl...
> Partner meetings are illuminating. We get a strong sense for how bad site performance is going to be based on the percentage of engineering leads, PMs, and decision makers carrying high-end phones which they primarily use in urban areas.
And yes, that makes a difference, you can deliver more features, faster, more reliably.
But, if those sites just bog down and take double-digit seconds to load, even when properly deployed on scaleable delivery architectures, with fiber-optic speeds, and CAD/gamer-level power machines, they are junk.
And I increasingly see exactly this junk been over the last few years. Even (and often especially) the major sites are worse than ever. For example, on the above setup, I've reverted Gmail to the HTML-only version to get some semblance of performance.
Sure, some of this could be related to Firefox' developments to isolate tabs and not reuse code across local containers and sessions, but expecting to get away with shipping steaming piles of cruft because you expect most of it will be pre-cached is no excuse.
Your site might have the look and features of a Ferrari, but if it has the weight of a loaded dump truck, it will still suck. If you are not testing and requiring good performance on a rural DSL line and mid-level laptop (or similar example of constrained performance), you are doing it wrong.
> Debugging modern front-end code is a breeze
Is still hit or miss every once and while depending on the use case. For example debugging service workers is still a bit of a nightmare. And I've also had some issues debugging a chrome extension written with Vue CLI + the browser extension plugin.
First, you are basically breaking the concept of the web, a collection of documents, not a collection of code that must be executed to get a document. That has many bad effects.
Browsing is slower, you have to download the code of the whole application and wait for it to execute other API calls to the server before the page is usable. That can take a couple of seconds, or even more on slower connections. With the old pages rendered server side not only you didn't have this effect, but also the browser could start to render the page even it was not fully received (since HTML can be parsed streamed). Not everyone has a fast connection available at all time, and it's frustrating when you have only a 2G network available and you cannot do basically anything on the modern internet.
It's less secure, since you are forcing the user to execute some code on its machine just to look at an article in a blog. And JavaScript engines in browsers are one of the most common source of exploits, given their complexity. Also JavaScript can access information that can fingerprint your browser to track you, without particular permissions. Ideally in a sane world most of the websites don't require JavaScript, and the browser would show you a popup to allow the website to execute code (just like they as you access to the camera).
It breaks any other tools that are not a browser. In the old days you could download with wget entire sites on your hard driver to consult them offline, with "modern" SPA is impossible. Of course that implies that it breaks things like the Wayback machine and thus history is not preserved. And serach engines penalizes sites that are not a clean static HTML.
It's also less accessible, since most SPA don't respect the semantic of HTML, everything is a div in a div in a div. And of course you still need a browser, while with HTML documents you could process them with any software (why a blind person need to render the page in a browser? While a screen reader could have simply parsed the HTML of the page without rendering it on screen...). It breaks navigation in browser, the back button no longer works as you expect, reloading a page could have strange effects, and so on. I can't reliably look at the address bar to know the page I'm in.
Finally it's less robust. SPA are a single point of failure. If anything goes wrong the whole site stops working. While a bug on a page on a classical server side rendered website breaks only that particular page. Also error handling is not present on most SPA, for example what happens if an HTTP request fails? Who knows. Look at submitting a form, most of the time there is no feedback. On a classical server side rendered application if I submit a form I either get a response from the server, or the browser informs me that request had failed and I can submit the form again.
Is actually one of the symptoms of the issue at large I think.
I understand some sites depend on more complex APIs and such - certainly fbook uses the complex stuff that these frameworks do..
However many people are using wordpress and similar tools simply to have a basic static few bits of info from a few pages display decently on various devices. I too am guilty of such a thing on more than one occasion.
For these cases I am moving towards converting the designs to static html and using a php based script from coffeecup to handle the contact form part that in the past I've lazily just added a two click plugin from wordpress to handle.
I feel that the CSS standards group really dropped the ball with not having better responsive menus 'built in' as a part of the problem that can be solved in the future. Now that grids are built in - the menus that bootstrap does auto-magically for most devices is the missing piece that keeps many sites from being just html/css.
I'd love to go back to netobjects fusion for design, but it has not kept up with the responsive needs of the web. I tried coffeecups site designer in beta and it wasn't for me. I've built dozens of sites using notepad++ and occasionally load up sublimetext for find/replace - but still feel that more visual / wysiwyg type stuff is greatly desired by much of the world.
Wordpress is going more in that design direction as the gutenburg blocks start to work with full site design and not just page content. And I still keep meaning to take the time to try out pinegrow site builder - as that might be the replacement for netobjects that I've longed for.
But it's not just me - there are plenty of people who could / would make a site and find things too complex today - about 7 years ago I found someone in the top 3 search results for a home service - and inquired about their designer / seo .. The guy who was there doing the work told me he made the page in microsoft publisher.
While I'm not advocating for the bloat that Msoft's frontpage pushed into the world, and I know the time of clearpixel alignment is a distant memory, even though we have an infinite amount of tools - it still seems the front end world is more complex than it needs to be.
It is better in some ways and worse in others. I hope CSS gets better menu options so there can be less pieces needed for a decent puzzle. I like non-js sites just fine, and building with less tools is okay too.
I think people are forgetting how bad it used to be. Loads of jquery spaghetti code everywhere rerendering the page 1000 times with a nested for loop.
Also, web applications have became so much more complex than they were (but still work!). Things like Figma would be unthinkable even a few years ago. And - even though it's running in a browser Figma feels far more responsive than Illustrator or Fireworks (RIP), plus it has a load of collaboration tools which these desktop apps don't have.
I think this is the important thing here. Everything feels less stable, and more prone to breaking, on the modern web. You write some simple HTML, style it with CSS, and write vanilla JS for the parts that need it, and everything feels solid. You start a new project with a framework, and it seems like there is this whole area of your project that is essentially a black box, ready to break (or misbehave) any time.
Any framework you're not familiar with will feel like this. This isn't something unique to frontend frameworks.
Regardless without a framework it ends up with you reinventing core framework features anyway. Yes, a framework driven app is more complex if the page/app is extremely simple. But if it is of any complexity a framework driven app is going to be far easier to maintain and reason about in 99% of situations.
Bootstrap + jQuery on the front end, Flask or similar with CherryPy on the backend. SQLite or Postgres if you need it. That will handle 99.9% of websites, it will be cheap and easy to develop and host, and deliver a great experience to the end user.
Now 1 component will be: server side html, client side html, css and js.
A good analogy I think is any person using MS publisher to create a book layout. Sure it can be done quickly because the software does the thinking; but should it? Good books have skilled typographers designing the proportions of the pages relative to text block, the fonts, et cetera. The end result is a book that one scarcely notices but feels very pleasant to hold and experience.
We need websites that are subservient to their content; sites we scarcely notice but thoroughly enjoy.
EDIT: one last point: I think part of the problem is also that browsers have an identity issue. E.G. they started as a static publishing platform, but now they are a full blown operating system with web assembly etc. As we know, anything that does too many things is inherently complex, and hence “bloated.”
You can make a SPA that's a joy to use and loads and runs extremely fast. Hardware has never been faster; browsers and application frameworks have never been as good as this (I'm talking about the web stack). It's really nothing to do with the tools or technologies that marketing insists it needs mixpanel, GTM, optimizely, hotjar, FB pixel, smooch, and god knows whatever else in order to do its job effectively.
But then, with Angular/React/etc, you now not only have 1 project on your hands but 2 different projects that must be compatible: the backend and the frontend. These 2 different projects ought to be in 2 different languages, unless you are developing backend in JS too - maybe there's even an ORM that can generate migrations these days for NodeJS ! But that wasn't the case last time I checked, also loosing the ability to have server side rendering without the additional effort of deploying a rendering server with all that comes with it.
People ditched jQuery saying that vanilla JS was just fine, but it turned out not to be quite the case so there are still releases of jQuery, and at the same time NodeJS was released and npm and then Angular/React/etc which in my opinion created with two goals in mind 0. having OO components for GUI dev and 1. offer IoC to overcome the difficulty of dealing with custom component lifecycle like in jQuery which leaves you to monitor the DOM and instantiate / destroy each plugin by yourself. Idk if there are other reasons, but it seems to me that apart from that, that DHTML is still pretty much the same: you're adding some logic to change tags and attributes, anyway.
Today we have a chance to break these silos again with the Web Components and ESM browser feature and W3C standard because it does solves elegantly the problems that React/etc seemed to be designed for and do no impose a frontend framework, you can just load the script in your page and start using <custom-tag your-option=...>... The browser will manage the Component lifecycle efficiently, and devs can use it in their templates without having to load a framework so everybody wins.
This is also a chance to simplify our code, levitate by throwing away dependencies. Of course if you want to do full client side navigation with an API backend you still can, but you can make generic components that you will also be able to reuse in other projects that do not use a particular framework. You need no tool to make a web component, this is an example of a jquery plugin that was ported to a web component which has no dependency, with browser tests in Python: https://yourlabs.io/oss/autocomplete-light/-/blob/master/aut...
Webpack does a lot, still slow for development be we're seeing the light with Snowpack and esbuild, allowing to have webpack in production only (ie. to generate a bundle in Dockerfile) and benefit from actually instant reload thanks to ESM.
So if you go for web components and snowpack, you get an extremely lightweight toolkit which I love that will work for every page that's not an overly complicated web app. But then I thought I actually don't have so much frontend code, it would be nice to have it along with the backend code, so we went for a python->js transpiler to develop web components in pure python which also replace templates, it was surprisingly fast to implement: https://yourlabs.io/oss/ryzom#javascript
Is this improving the situation or not depends on your POV, heck I'd understand if you even hold it against me, but the frontend development tooling is still evolving for sure, and I can see how the browsers are doing efforts (except Safari) to simplify DHTML development, because:
“There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies and the other way is to make it so complicated that there are no obvious deficiencies.” – C.A.R. Hoare, The 1980 ACM Turing Award Lecture
This setup is described in more detail in single-spa's documentation.
Are they? I'm skeptical we can know that for any given website; specifically, accessibility is a huge pain point for so many sites, and it would seem difficult to know how many people are turned away from a site because it isn't set up to serve them.
What we have today are the same problems with a new wrapper, created by a not dissimilar group of people from the past.
Well, if the top 100 tracks from, say, 1961 to 2021 progressively get less musically diverse, with simpler chords, less harmonies, less timbral variety, lesser melodies, more repeatition, less dynamics, less genre variety, more infantile lyrics (something that has been studied and measured several time, e.g: ), etc, then it's not some "survival bias".
https://www.researchgate.net/publication/346997561_Why_are_s...
https://newatlas.com/pop-music-trends/23535/
https://www.nature.com/articles/srep00521
https://www.res.org.uk/resources-page/economics-of-music-cha...
And indeed everybody agrees that JavaScript itself is now better as it is the modern web APIs. If the rest is so controversial there must be a reason.
HTML has been the wrong place to make creating UIs (as opposed to marked up text) for such a long time. Things are getting better from multiple angles, but it's still very uneven.
in music’s case, one of the replies to this comment describes decline in musical complexity/sophistication, which i’d personally attribute to democratization of the tools (which are also much more powerful, allowing kids w computers to do what took whole teams and studios full of equipment before).
so i think only seeing high quality UIs in the wild is more of a mixed bag than is intuitive to us — a world absent of shitty soundcloud rap is a world with worse music tooling.
But I’m curious, what are the examples of great websites “back in the day” that have stood the test of time and would be considered good web development today?
Not "just" survival bias.
I think it's quite reasonable to take a position that there was more innovation and creativity in pop music in 1950-2000.
As the genre has matured, popular/commercially successful music has depended more and more on fewer and fewer producers.
Indeed, there are fewer commercially successful artists: the US Billboard Hot 100 Top 20 this week contains 3 tracks by Justin Bieber, 2 by the Weeknd, and 2 by Drake. That would have been unheard of.
My big problem with web application (in a true application sense - not things that are just hypertext and shouldn't be applications at all!) development is that the DOM+CSS model is not made for rich UI experiences. Basic paradigms from desktop applications like spreadsheet cell selection, draggable cards (think Vizio/UML), modals, and MDI / multi-document interfaces are non-standard and brutally challenging to construct in a reasonable way using the DOM.
What I'd invent would pretty much be Silverlight without the Microsoft, honestly - a typed UI framework built on a widget and widget-binding model which would allow a smooth mixture between OS-level widgets (and the accessibility affordances they provide) and hand-controlled rendering/drawing, with a stripped-down runtime enabling resource constrained clients to execute client-side code which would hide / paper over the resource constrained backend connection.
Anyway, I also think this is orthogonal to the argument in this thread, because I think that most of the conversation and the sentiment of the original tweet is to call out applications that SHOULD be hypertext, not applications. For applications that need to be applications, I think things have gotten better, not worse, although they're still pretty bad.
This is pretty much objective truth in my mind. I might agree with people who hate the web if I always had to browse with ads enabled.
[0] https://android.stackexchange.com/questions/226580/how-is-ve...
I'll add a huge culprit to the list: Medium. They have their own "clever" code to progressively load images and I find it absurdly frustrating (because in most scenarios, the images just don't ever load), so I end up with lots of design articles with blurry blobs of color instead of images.
There are so many ways to natively progressively load images that I'm not sure why they've chosen the most user-hostile one. You see blurry blobs of color in no particular order, no indication of which ones are loading, no way to force a particular image, etc. I find myself frustrated often and I end up abandoning most of the stories (or avoiding Medium altogether).
A coworker and myself had the worst internet speeds in the company, but he recently got FTTH.
I went to replicate a bug, by clicking on a button quickly and excessively, and was able to add 5 duplicate entries into the DB.
The frontend dev could not replicate it until I suggested using the Chrome dev tools to simulate a slower connection.
I have Frontier DSL.
We implemented disable-on-submit after that, and the inconsistencies went away. Other people would click again when the response didn't come fast enough, but that was rare to lead to corruption. Probably when their connection was lagging, they would click multiple times in frustration. But that one guy provoked enough destruction to make us notice and fix it for everybody!
I certainly felt the pain of a slow connection too and felt frustrated at how badly this affected the experience on so many sites.
Here’s an idea: web developers should test their sites on the slowest connection speed still commonly available (ie 3G) and make sure the experience is still acceptable. I know that webpagetest [1] allows you to do this and the results are illuminating.
https://engineering.fb.com/2015/10/27/networking-traffic/bui...
With all the images, videos on social media etc. it seems rather small in terms of bandwidth.
As for why front end development may be a bit of a mess here? Well, it's really a problem that doesn't have just one cause.
On the one hand, business pressures likely have a huge impact here. Companies love analytics, tracking, ads, etc, all of which contribute greatly to the issue of slow loading, broken sites. If you include everything and the kitchen sink, then things will clash or time out or break.
There's also an issue with businesses focusing on speed and working getting done quickly rather than well. If you're given unrealistic deadlines, and the feature set is changed midway through development because some manager/sales team thought of a shiny new idea that needs implementing... well it seems like optimisation, usability, etc often end up on the cutting room floor.
And yes there's a bit of envy from developers towards Facebook/Google/Apple/whatever there too, and a need to 'test out the shiny new toys' so they can potentially get hired there in future. I suspect CV padding is definitely why SPAs are way more common than they used to be, and why simple static or server rendered sites seem nearly nonexistent now.
I am not an expert abdominal surgeon. If we are in Antarctica and your appendix becomes inflamed, I will try to save you by cutting it out. But you will probably die.
I am not an expert front-end developer. I make sites for myself, for others, and have even been paid for it a few times. But I know I am basically an amateur. However, my sites are far, far better than almost all sites in the wild, created by teams of full-time, professional front-end developers. They work identically in all browsers, are fast, easy to navigate, and people say they look good. They validate, too, except for a few nonstandard htmx attributes.
There is something very strange in the WWW, when a self-taught amateur like me can make a site that is better than the New York Times’.
Making a site to share info and have fun is easy. Nearly anyone can do it. Making a site to actively exploit people in the most intense way possible while still being legal(ish) takes highly-trained experts.
If every department proves its worth by claiming space on the front page, customer experience will be the last concern. That's before someone notices how giving content away is not a monetization strategy. Then add the siren song of 'only one more script' for marketing data,even if nobody has a clue about what to do with that data.
there is definitely an explosion of tooling, frameworks, etc, but past some obvious things, IMHO most websites are crippled by business people (that will likely not be using the website) make all sorts of technical decisions what must go in and how it’s supposed to work (ads and tracking crap is one of the things that jumps up).
Here you go. You make sites for yourself. My own stuff is fucking fast as well.
It gets slow when you have to ward of a thousand idiotic requests and implement maybe 10 of those to shut people up.
While in my own world I’d leave it as it is.
Shitty product is primarily the result of shitty culture. It’s just that FE is visible and atrocious DB calls are not.
Quality you get from strangers correlates with how easily the average customer can judge the work (food is easy to judge). Sometimes things are important enough to be regulated (healthcare) otherwise most markets are for lemons.
Would love to see something that does everything the NYTimes does that is clearly and obviously "better."
Modern FE is a discipline every bit as complex as anything that we face in the backend. It requires that we actually apply an architecture. Design our code so that we can respond to changes in our business requirements etc. Serious engineering rigor in other words. Hell I could make the argument that in some ways backend dev is much more straightforward.
I think it’s fair to say that we often put too much business logic into the front end. Fat clients are not something I agree with. But to say things used to be better is just flat out incorrect.
As a back-end dev, this reminds me of the time I used our own product and saw a read-only field on the UI. It was some interesting bit of data that only existed in the database (we didn’t expose it in the API) and I brought it up how cool it was that we were doing that now. The front end dev said, “oh, it’s not from the database, we make several API calls to get the bits we need and then calculate it the same way we do on the backend”
I facepalmed. Like, just ask to expose that data, it’s a single line of code! Instead we made 7 API calls... :sigh:
Everything is slow, laggy, loads ridiculous amounts of stuff (I live in a country where traffic is very expensive at the moment, so this becomes more noticeable). Things are also flaky and need reloading whenever they get into broken states. The only way I use the web now is with uMatrix blocking everything, and then whitelisting stuff that pages want to run piecemeal. It's still terrible.
The larger a company is, the less usable its web stuff is also. Google Chat for example is unusable in very active rooms.
I hope that frameworks like Hotwire make server-side rendering "cool" again and that we can get out of this tar pit.
It may be a bad example, but it the latest I’ve attempted to use. It took me maybe an hour to get an Angular project started. It somehow managed to install 1000+ dependecies (a few of which seems deprecated) and I have no idea what I’m suppose to do next.
You get the feeling that frontend development is a stack of tools three levels deep and you’re not expected to understand how or why. It feels unstable. At this point I just avoid anything that requires npm.
That being said, I do see very nice project built using these tools.
<DropDown>
And or
<EnhancedDropdown disableEnhance={isEnhanced}>
And or
<MultiSelectWithAutocompleteAndSearchBar onlySingleSelectionAllowed={true}>.
Then you can compose all of those together into:
<ThisComponentMakesSenseToOnlyMeDropDown show={isDropdown && !Carousel && showCarousel} totallyDifferentData={totallyDifferentData} enhanceWith={<EnhancedDropdown>} replaceWith={<CarouselWithNoDropDown> >
^ That’s where all the complexity is coming from. I will not even attempt to demonstrate my point by adding context and global stores into this.
Small bit of bitterness:
Then you make a nice little storybook component, and a jest snapshot to show that this is a nice ‘testable’ component, you know, like really dot your I’s and cross your T’s.
Back to my point:
This is powerful in the purest sense, as it’s super flexible, but also powerful in a way that can create insane amounts of complexity with different mindsets contributing. Not everyone sees a regular <DropDown>, some see all kinds of things.
I think a lot of the fragility (perhaps the better word is instability) comes from this power (chaotic, out of control power). I hope web components at the very least creates a standard list of UI components (the browser doesn’t even have a default modal yet, still rolling with alert(), and if you leave it to the wider community to make it, we will end up with <AbstractModal>).
That the developer experience also doesn't work is just an effect of the real-world, where people will end up using stuff outside of the small designated bucket of things that somebody attempts to keep compatible with each other.
At the back of my mind is the feeling that somehow I'm doing it all wrong, and it should use a proper JS frontend framework like React or Vue that communicates with the backend with a proper REST API or better yet, GraphQL. I realize it's probably not the kind of project I should use to show off on my resume and that many will just consider it old school. At the same time though it does feel that maybe the industry took a wrong turn when it went all-in on SPAs.
I'm partial to good ol' fashion SSR sites these days, as I do most of my casual couch browsing on an old chromebook running Ubuntu. The number of heavy-weight SPAs that I just can't run on the hardware anymore seemingly climbs by the day. :(
The server can just do the first step and things like Hotwire can add the dynamic bits you need - all overhead and extra processing is now gone.
I can list a lot of websites that don't render client-side that are fast, but very few that do which are.
In a quarter century, we’ve participated in reshaping how billions of people spend their free time and get their work done, seen the rise of social giants, endured the creation of millions of mediocre small business sites, learned to build apps, and taught millions to code in the process.
Now, some of our current development paradigms are either underdeveloped or outright broken. News websites are a cultural disaster. Web app development changes weekly.
This is the natural result of many people trying many things. But the web mostly works most of the time. Eventually we will have fully baked standards with supervisory committees and enforcement and professional certifications and insurance and all the other trappings of a fully grown industry. But right now we get to enjoy the growth of one of the most exciting industries in history, despite it’s problems.
Front end development isn’t broken, it’s teething.
There were some revolutions, like responsive design, but all the rest feels very shallow compared to the bad UX experienced in so many applications and websites.
The one quality that truly differentiates the new web from the old web is the Cambrian explosion of ad tech, but this isn't a "front-end" problem, it's a cultural problem rooted in the shifting expectation that everything on the web should be monetized. There isn't really a solution to this, ads are the opposite side of the coin for people producing goods and services that are ostensibly providing value to the economy in the abstract sense... this is the web we all wanted.
Even on my new M1 MacBook Air it takes 2/3 seconds for every page to load.
But but but! Skeuomorphism is slow! We need fast sites. We need accessibility! We need to improve our performance!
Now look. The web is both ugly AND slow.
The big question is why? To me, it’s all about commoditization and making money.
Why spend money on expensive artists, designers and engineers to make sites look good If we can band together (big tech) and make flat design the norm? Everyone will forget that the web didn’t used to suck as bad. Instead, we’ll absolutely decimate performance with loads and loads of ads and nonsense JavaScript. We’ll hire product managers to track every single interaction imaginable so user’s experience sucks and we can invade their privacy!
Basically big tech ruined the web. They ruined design and everyone pretends like this never happened.
However I think the global move away from desktop computing to phones, ipads and cheap chromebooks are the real fun killer for great art and design.
I used to love making sites pixel perfect at 1024 - and today if we spend a lot of time making fancy desgins - most people will never see it, since they are checking it out via phone surfing.
This is what I point to for people inquiring about design today - basically it's up to the client to provide the design - what pictures and text do you want to put on the small screen? that's your design.
Even if you put a note on the small screen telling people to visit our Hd/Desktop version for more cool effects they would enjoy - many (most?) people don't even have a way to access a large screen for computing.
Maybe there will be a shift with people casting to TVs and 'smart tvs' browsing better and turn the tide - then we'll need some kind of 'report back framework' to tell us people can see and navigate via the larger view - then we could try to remake flash coolness via html video for the big screen - but then we wouldn't know how close they are to the TV - so how large would navi buttons and pop up text need to be.. meh - back to basic plain stuff.
Personally I think we need better zoom-in controls for browsers that people can easily use and understand - this could give us more flexibility as designers, like the hamburger menu - if you can expect people to know how to use it - not holding my breath though.
Something feels wrong. The median should be able to inherit the benefits of technology produced at the high end without such inheriting massive costs.
All of this is part of the pervasive problem that your post is slightly tainted by (my attitudes are tainted by it as well), which is a general disrespect for frontend. No matter, the truth of these attitudes will show up in all of our products. It’s always obvious to me which teams take frontend seriously and which don’t (the quality is always literally visible).
I agree you can tell the difference, though I would place blame for those situations more on an organization than the developers who get shifted toward that work out of their specialization. It could be some dubious values, but it also could be project budgets.
The other day, I placed an online order for curbside pickup (with a national brick-and-mortar chain). When the time came, I drove up to their curb. But I couldn't access their "I'm at the curb, bring out my stuff" page. It just kept loading and loading. I had to go into the store to get my order.
When I got back to my PC, I discovered a massive webpack bundle on that page, along with an absurd level of tracking software. The page had transferred 50MB before I could even use it.
They knew their curbside page would be used exclusively by people on their phones, in their cars. They knew some of those people would pull up to stores with poor cell reception. That page should've been as light as possible. The page was ultimately just a simple form, so it should've been possible.
Reddit is slow now because they made what should just be static HTML that is updated occasionally into a web app for whatever reason.
React is much better than any alternative. I tried using native js but you really need all of the things react brings. Now you could go back to server-side, but it isn’t suitable for web applications. There are just too many interactive elements that don’t work with a HTML push to client and reload on every change approach. Server side plus client side is a lot more work and hard to maintain.
Still, I really hate front end development.
I now work pretty much exclusively on backend systems and I’ve never felt better.
> I look at the web today. Not as a programmer, but as a user of broken sites that are unable to obey the most basic rules of navigation and usability, terribly slow despite the hardware progresses. And I can only think that modern frontend development has failed.
Though it's probably not exactly a failure if usability, accessibility, and/or speed are not primary objectives for most, and discussing just that once again probably won't be very useful for fixing it.
Setting up a frontend web app with React (or Angular) is insanely hard to self teach and I would consider myself very good at self learning. Its hard to workout how to integrate React with Bootstrap and you often start to get problems you are not even sure how to fix. When you look at tutorials online, they all have slightly different tech stacks which complicates this further. Second to this working out how and where you get your graphics from is impossible for me.
Frontend blows my mind! (And this comes from a guy who has done +1000 leetcode problems for fun)
Also, in this thread people say this or that is bad without specifying examples of websites and a problem which could be fixed. Is anyone able to name 2 to 3 concrete websites and examples from which others can look at and learn what is wrong?
Every react/angular tutorial throws a bunch of high concepts at me, and then a list of commands that will do some magic for me. I am unable to use this info to start my own web project and translate whatever is in my mind to the screen. Everything I have been able to do, has been by modifying existing examples/projects.
Like you, I consider myself to be a good self-learner. I was able to go through a couple of rust tutorials, and with generous consulting of the manual, I am able to write simple rust programs, and figure out how to do what I have in mind.
But I'll also say that the web as an app platform was fundamentally broken from the very start, and this is because it was built on a fundamentally bad programming model. *Why is it* that everyone feels the need to use use virtual-DOM frameworks and CSS preprocessors for all the apps they design? Why is it that whenever I build an app for the web, NPM needs to download and compile around 10,000 modules (no exaggeration) in order to build the app?
JavaScript was originally going to be a Lisp-like language, but OOP was in fashion at the time and so it was made to be more like Java. Had it been a Lisp from the start, at least CSS preprocessors would never have become a thing because with Lisp you have macros. I am not saying the web needs to be based on Lisp, although it would definitely help if things started moving toward web assembly so people can start using better programming languages and frameworks than just the ones that compile to JavaScript to program front-end apps.
1. works visually at all screen widths and resolutions
2. returned from a server with zero knowledge of said screen widths and resolutions
3. without shipping redundant assets
4. responds immediately to user input
5. but all visual updates go through this slow and crappy DOM API
6. oh, and it's all single-threaded
7. and there's no standard library for stuff like virtualized lists, modals, etc. so have fun picking your own and shipping it down
8. and your options for navigation are either losing all local state at each navigation, or writing a SPA that some neckbeards on HN hate for esoteric purity reasons
And yeah, I understand that proposing solutions won't fix your state's DMV site from sucking, but it's at least constructive. It at least makes it feel like you're trying to help instead of keyboard criticizing. Even better, build products with these solutions! Plenty of users would love fast, efficient sites. I know I love it when Hacker News opens instantaneously.
The modern web is a stack of abstractions that separates the code in what the site is written in from the underlying machine that renders it. This stack of abstractions makes it many orders of magnitude slower than it theoretically could be to render, but makes it many orders of magnitude easier to program. In other words, this seems like the age old debate of "interpreted vs. compiled" [0].
While the front end ecosystem is sprawling and modern web pages are slow and clunky, the barrier to entry, for most people, is at an all time low. It's easier now to create a web page that works consistently for the vast majority web browsers with minimum effort. The render speed and accessibility might suffer, but this is always the price of abstraction.
Jonathan Blow has a talk specifically lamenting this point [0].
[0] http://blog.gmarceau.qc.ca/2009/05/speed-size-and-dependabil...
[1] https://www.youtube.com/watch?v=oJ4GcZs7y6g https://www.youtube.com/watch?v=FvBySbGueww https://www.youtube.com/watch?v=URSOH4F3vbU https://www.youtube.com/watch?v=MlIZ2Q3Rvc8 https://www.youtube.com/watch?v=jpk9Q5gCyIY https://www.youtube.com/watch?v=xK6YZ3NFjuE
First with PHP (Wordpress, Laravel, Yii), then with Ruby (Rails, Sinatra), now with Javascript (Gulp, Gatsby, Next, React, Lodash, Immer, Typescript). I also do / did static sites with Jekyll, or my own framework.
Among all Javascript is far the worst experience. In all areas like the language, the types, the state, the hooks, blogging engine, toolbelt, hosting, packaging, publishing, documenting, the community.
The situation is so bad that I quit. It eats my nerves. Instead of creating I'm patching and fixing bugs all day.
That's why the web is what is it today. It's Javascript driven, and Javascript is totally flawed.
Sidenote: I also think there might be too many websites in general. I always kind of think between Wikipedia and archive.org and other information Freedom projects that's all we need. Maybe a little IRC as a treat :)
In a followup tweet[1] and in this thread, antirez says that we haven't improved interaction in 20 years.
Let's consider gmail, which is close enough to 20 years old. But at the time, it was an example of a very rare and complex app build on top of ajax. I don't personally quite remember this, but it apparently didn't have rich text editing for a year after it was released.
Ask yourself: how long would a competent front-end developer need to make a decent 2004 gmail clone using modern front-end tools?
The ideal would be to build more lightweight websites, but exploit modern tools where they pay for themselves. While we're at it, we can write fast software without premature optimization.
[1] (https://twitter.com/antirez/status/1378274076859502593)
[2] https://en.wikipedia.org/wiki/Gmail_interface#cite_ref-RichT...
I don't know how it went so wrong. Original Gmail was a revelation. Today it's sludge.
And then there are user interfaces where the developers actually tried to make a difference but stopped somewhere in the middle, like with current Firefox versions. Don't get me wrong, I think the UI customization feature is fantastic and I love that it now supports a large zoom indicator/control in addition to larger address bars and tabs - as the first line of support for my relatives I appreciate that this is now more visible. But then there's that tiny download button/indicator which, for less tech-savvy people, is often simply invisible. As much as I dislike the huge bar at the bottom that was introduced with Chrome, I have to admit it is better out of the box than a tiny blue arrow that desperately tries to be more visible than all kinds of website animations and ads.
IMO we would need 2 split the document part from the application part. Have a set of elements and a document format just for blogs and news websites , and more complex components and APIs for application websites. Then you could have a browser that would be more simple that will be enough to browse blogs,forums and news sites and a more complex browser for SPA applications.
We have more information and services available than ever before. And it's never been cheaper or easier to start something new.
I don't know what "basic rules of navigation and usability" the author is referring to, but I virtually never come across a site that can't be navigated or isn't usable. And all software gets "slower" as hardware grows faster [1], it's not anything specific to the web.
The web is amazing, nothing has failed, sheesh. Yes there's always going to be room for improvements both in speed and usability -- developers are human, nothing will ever be perfect -- but the idea that the most popular digital interface technology of all time has "failed" is ludicrous.
Quoting a statement doesn't make it good. It's bad.
Maybe todays, heated disucions will be setted for good? Or something new, better will be invented?
So instead the awesome front end dev has switched from making something like Slack or VS Code work great in Chrome to building it in something like Electron for native experiences.
The difference now is that there is less good practice. But look at gov.uk and you see the difference between good web design that doesn’t need to be an app or have carousels.
Web development now has the Sharepoint problem: it can do everything given enough effort. It’s not about what is possible but it’s about what you want from it.
Before it was flash intro movies now it’s a shop front with modals and carousels.
- react programmers who solve every "problem" by pulling in yet another 3rd party dependency
- understanding react vs react with hooks + to redux (or not) + saga? thunks? etc etc...
- webpack
And that's not really about web. It's about software in general. Discord launches in 8 seconds. Ventrillo launches in 1 second. But people will use Discord, because 8 seconds is not that bad and then features matter.
And that's not really about modern software, as old software was slow as well. Also it was very buggy. Windows 98 used to BSOD here and there, so you had a routine to press "Save" button every few minutes and keep few copies just in case. Emacs was expanded to "Eight Megabytes And Constantly Swapping".
There's some old software which survived till today and it's now wicked fast, because it was made for old hardware. But people still prefer to move on to new software, because of features or just shiny new design.
Also: it's considerably faster and cheaper to build a fast webpage than to build a slow webpage. I'm quite sure the "new Reddit" was a lot more expensive to build than the "old Reddit".
Personally I will navigate away from the new site and only use the old domain.
On a new an powerful computer most of the web is dog slow. There is no reason most websites should take more than 1/10th of a second from click to fully rendered. Anything past that is simply wasting my time.
Also, the UX was implicated as the cause of a suicide, so that is not good.
20 years ago I had an iPAQ, which is basically a handheld Windows machine. Today I have an Android. 20 years ago, the iPAQ had 32 megabytes of storage. My Android, if it only has 32 gigabytes, is used up in a month by just a couple of apps.
I could do the same things 20 years ago with my iPAQ that I do with my Android today. Yet today it requires 1,000 times more storage space and 100 times more processing power.
The only development which I can see saving us from this mess is Stimulus/Hotwire from the Rails team and implemented in other frameworks such as Djano, Laravel and Phoenix.
Sometime after that (after clumsy false starts), what used to be advertising people took over the nature of the Web.
HCI and human factors engineering (i.e., technology in service of the user's goals) was largely forgotten, and UX (i.e., technology in service of the developer) was born.
Be skeptical of most UX you've seen, since much of what we're now taught, much of what tools/platforms are available, much of what the jobs are... are now generations away from the needs of users. If you want to genuinely serve the needs of users, question everything, including all the implicit and explicit conventions of your field.
Product concept and design are in some ways harder than they used to be, since, e.g., users' conceptual models, fashion, and available platforms/technologies have been shaped by a pervasively user-hostile and manipulative environment. But, as designers, you still have a lot of leeway to operate creatively within that. Question everything.
I can think of very few areas in software development where there is this much innovation & diversity in frameworks & approaches to building something. Maybe our approach to usability has failed with all our "necessary" popups & cookie dialogues - there I agree. But to say "front end development" has failed simply because its evolved is a bit myopic IMO.
I think web devs have no real incentive to improve their front end since search engines don't stimulate and reward them to do so.
Ranking algorithms are blackbox but you can notice that popularity is more important than quality of content so eventually web gets bloated and you end up in information overload.
I challenge you to be the change you want to see: 1) build something better 2) get wide adoption of it.
This idea that modern front-end has failed is not some absolute statement that means that all that came before was a success. In fact, it's a statement that with all our modern technology and idea's, we're still in a situation where we haven't improved on front-end tooling and development.
Also, just because front-end has exploded and created a huge amount of jobs, doesn't mean we're doing it right or well. There is just as much evidence to suggest that we need so many front-end developers because our current tooling and methods have made front-end development a massive job requiring many people.
Shared frameworks and libraries do help significantly with this but the fact that they still undergo substantial churn tells me they haven't completely solved the problems they address. When's the last time you needed to drop down into Assembly to fix your JavaScript? Probably never—you can operate at that higher level, which lowers barriers to entry and increases productivity for developers. (Put your hand down, you wonderful machine code hobbyist, you.) In contrast, we still "drop down" from web app components into JS/HTML/CSS all the time.
No separation of concerns, no layers, or if there's layers there's controller code in view layer or view code in controller layer.
etc.
Both statements are moronic. Taking advantage of modern design philosophy, modern CDNs, modern framework - all of that takes time, attention and MONEY. If you don't put in the investment in all of these, the fact that you have access to "modern frontend development" is meaningless. It's like asking why is not everyone in the world driving Teslas.
Modern CSS is extremely powerful and you can get good looking websites with just handwritten CSS. If you change your site once a week instead of uaing a CMS maybe consider using a static site generator like Lektor (fast, no need to worry about people hacking your wordpress instances).
If you really need server side code/interaction reduce dependecies and still let HTML do the heavy lifting.
I did some experiments with WASM and Rust and it is really neat, but IMO it doesn't beat the simplicity of a basic HTML page yet.
The whole web was based on the premise server (media provider) and client (media consumer) could be created by different parties and should therefore assume nothing and rely on protocols - that’s not what happens today since with JavaScript the same party effectively “takes over control” of the user agent.
My radical opinion is that open protocol based web was killed the moment JavaScript adoption became standard, the same way an open web wouldn’t be possible with Macromedia Flash becoming a standard.
How can anyone use 200 popular websites and see shit instead of being astounded by how awesome it all is?
I look at the same thing and see unbelievably powerful web applications, the web browser as the most sophisticated fabulous software ever built (alongside Linux), a constant drive amongst front end developers/libraries/tools for new and better ways of doing things.
And I see so many websites that it’s impossible to make sweeping generalizations about front end development.
The world contains certain people who want to see the bad... this is what’s happening here.
... And even though some idiot-proof frameworks exist, they still require somebody to put enough effort in to discover and use them.
I mean, we can apply the same criticism to the giant pile of crapware in the mobile stores. Some software is good, some ain't.
We would have closed up shop a long time ago if we hadn't discovered Blazor and all of the productivity gains that go along with it.
The competing priorities of anything are hard to balance. Try building a physical store sometime. Even a simple garage sale. Layout for navigation and perusal is not a trivial problem. Especially if you don't have the space to make comfort a priority.
To that end, how much is actually broken, versus you notice the maintenance costs? Ever looked at public restrooms? Are they broken, it just under funded?
But the app that I work on in my day job (that I don't personally use) could not possibly be built without a framework.
td;dr: a lot of things don't need a framework, but they are still very necessary in many cases. Likely not ones that regular consumers are exposed to though.
Tooling is not the problem, the problem is you and your selfish subconscious urge to create more complexity to create more work and more income for yourself.
On the other hand, for a junior dev trying to break into the workplace, selecting the correct technology could be considered an important investment of their time, and ultimately their livelihood.
An organisational way of thinking is to figure out whose blame it is and charge them with fixing it.
Me, I don’t give a crap who’s to blame. Just fix it.
Stop collectively waiting for someone to do something about it and just do something about it.
Fix your own code. Make your own code better. Be an example to the world.
The equivalent in Javascript is an order of magnitude worse in those regards. It's ridden with compatibility problems, everywhere.
Just as architecture has failed. Just look at those buildings!
Art has failed! What happened?! Where are the Michelangelos? The Leonardos? The Picassos?
There are many more people writing code now. History will only remember the greats, and forget the rest.
There were always websites that loaded poorly. Even "back then". And there were good ones too. Same as today.
1) We've gone from function to content mostly.
'Apps' used to mostly deal with files, like Word, otherwise, hey were standalone. Now we deal with an incredibly variety of content.
2) We've traded consistency and reliability for speed to market, and rapid evolution.
App releases were once a year, web releases can be daily.
In other words 'the web' is not 'about apps', it's about something slightly different.
It's not going to fix the web or replace it in a lot of cases, but it's nice to have an alternative for some things.
TypeScript and modern frameworks with contemporary understanding of app design kills nearly every historical pain point of web development, but many are stuck writing jQuery and using WordPress.
I used to do some HTML and CSS 25 years ago and it was a nightmare to make it look like I wanted.
Today I use Vue+Quasar and everything just works.
Fundamentally it comes down to the same thing: use appropriate tech. Use it because you should and not because you can. Don't build a SPA if you can do it in a simpler way with plain HTML and CSS. Don't build an app if you need a website. Don't bother with some enormous backend horror if your site is never going to need to scale to that size.
It was the same way back with Flash, dhtml, html5, early JavaScript, CSS, Dreamweaver, whatever - if you need something, use it, if you don't, don't.
Like they always do at first in important things.
And it’s not even developers who failed, but users and managers who just don’t care enough.
Anyways, ViteJs and Tailwind jit recently are making development fun again. Too bad TypeScript still ruins the party.
For a lot of it, yes, it is a giant mess.
I'll posit the reason modern front-ends are a giant mess has to do with the fact that everyone tries to hack, slash, and transform the document model into an application model. This means they don't want to reload the page, and they then have the burden of manipulating the DOM in a very crude way.
This creates a predictable empire building game of building a framework to make it easier, and every framework succeed to a certain degree. Now, they succeed in a number of great ways, but then they run in the abstraction leakage which causes them to bend in strange ways. For many applications, that's fine, but as the number of applications grow this creates problems for the common case. So, quality gets harder to achieve.
Now, the philosophy that I believe is that we just don't think simple enough. Most people don't think deeply about this stuff (and good thing because we would never get anywhere without people running forward making messes), so what do we do?
Well, I think the real answer may not be to fix front-end development. Instead, I'm coming to the conclusion that we should fix back-end development. Instead of using the tried and true work-horse of request response (i.e. HTTP), we need streams (i.e. WebSocket). Streams let you pair-bond state, and this is exceptionally important.
Ignore the complications of WebSocket for a moment (I don't deny there are problems, but they are solvable; just no good common solution yet).
What a stream lets you do is pair-bond/entangle objects, and this lets you simplify the development model to a great degree such that the front-end object is a proxy to the back-end model. This entanglement then forces you to contend with two things: (1) how do I change the object, (2) how to respond to object changes.
Once you address those two concerns, you can build applications fairly easily. Using this framework, we can then see work towards understanding why modern web development is so painful.
Since objects don't tell you how they change, you have to reconcile that change. This is why things like react have a shadow-dom, but you still have to read state from server then shred it into components for that to work. It's easy to miss an important data point since there is no direct entanglement. Ultimately, you have to take an entire object and then mangle it into a form that is pretty to the user without disruption because the DOM has hidden state (i.e. scroll bars or text selection). Classic web avoids so many problems because that disruption is built in.
Since failures of the request will happen, you further have to deal with partial failures of state changes which is why you generally need a thing like Redux to be an immutable state container so you can rollback state changes. OR, you need GraphQL such that the client only deals with atomic failures. However, most people fuck up GraphQL, so you have to have both GraphQL and Redux.
Things like svelte are better because it uses language techniques to help you shred your data into DOM, but it still suffers.
My claim is that you can simplify front-end development BUT you must also simplify the back-end, and I'm doing this over at http://www.adama-lang.org/ where I'm solving the problem for board games. I claim that board games are a limit point of technical complexity for transactional interactions between people, and partial failures are catastrophic for the experience.
The way that I'm building a game right now is that I have a client which I can connect a giant JavaScript object to the server. There is no proxy, just an object. The server will then get an update, then update the object and tell you about it via a change callback. These change callbacks allow you to synchronize the DOM to the object without an intermediary. The DOM callbacks can safely read the object.
This lets me use vanillaJS without fear.
When some DOM callback wishes to change the object, then all it does is send a message via the stream to the back-end which will (1) authenticate it, (2) validate the change, (3) incorporate the change, and (4) spit out a data change. Much like a database, the UI is a tailer of the log.
The JavaScript library I have is in its infancy since I'm balancing my time between the language, the devkit, the client library, the distributed system design, the game tools, the canvas renderer, and ultimately the first game to launch.... And I'm only working on this 2 hours every evening until I retire, so... it's going to take time.
Back in the late 90's and early 00's, most websites were largely "brochure" websites. Companies were getting online because they heard about this whole internet thing and they knew they just needed to "get on the internet". You largely saw companies uploading whatever brochure they had basically into a digital one online. Those websites were insanely straightforward. Render a page, static content, the end. Maybe it's a little more dynamic than that, perhaps you're running a basic LAMP stack listing, say, real estate. Query the database, render the page, we're done here. Very little interactivity.
Those websites still exist, but they're likely not the ones we're complaining about. Site's like boeing.com are those traditional brochure sites which deliver very little interactivity. Relatively quick and nimble, the hero image is larger than all the JS they load (and, honestly, they could probably remove most of their JS now - they're using jQuery, modernizer, underscore, stickyMenu, require.js and a bunch of probably unnecessary jquery plugins we can eschew today, but we're here to complain about today, not praise it amirite?).
What we're actually complaining about are usually the interactive sites. Your Twitters, Facebooks, even sites like Reddit that dynamically load content as you scroll, click posts and download more content, comment - all manner of interactivity. Typescript? React? Functional components? Hooks now? Learn Redux? Unlearn Redux? CSS flexbox? CSS grids? My website now has a build process? I used to just edit the PHP file and upload it via FTP. What the hell?
These are not simple "brochure" websites, so yeah, they're more complex. They're applications. And being that they're applications, we shouldn't be comparing them to brochure websites, since they're delivering a completely different experience and have a completely different goal. We should be comparing them to desktop applications and the desktop application development environment, and therefore, comparing their stacks against the likes of C# and WPF, Swift and Cocoa, C++ and Qt or C and GTK.
And compared to those tools, how does the modern web development tool chain stand up? I have no idea, I don't write desktop applications! But what I do know is companies like Slack and Discord have elected to use electron rather than create their products in whatever desktop application framework. VS Code is electron-based and being a Microsoft product they had all the reason in the world not to do that - and it's dominating it is space today. Offerings like Figma, which by all rights one would imagine should have been desktop software elected to be an online tool and has completely shut out the competition.
So if you're going to complain about online applications, don't compare it against an old programming paradigm that would never apply to these products. Compare them against the modern desktop application development experience and let's start the conversation there.
I think the broken stuff the tweet refers to is all the online publishers with floating video ads, 50 tracking scripts, bloated pages, zero accessibility, etc on a page for a 500 word article
But I think that the intent and purpose in design matters. And awwwward website's purpose is pretty vacuous. The websites there are ad brochures. A single short sentence in huge font above the fold, a compelling image - the purpose there is to grab attention, while offering little information. Compare it with densely packed, more honest and less thirsty websites of the 90s and you'll see why a lot of people are nostalgic.
Browsers are so hugely (over-)capable nowadays that anything that comes even close to "push[ing] the limits of the browser" has to be at least as huge and complex as, say, MS Excel.
99.9... Well, "five nines" ring a bell? -- percent of web sites are light-years from needing anything like that. Sounds like complexity for complexity's sake. Web wankery.
Well, one can just as well say "in-memory stores have failed" based on some impossible to meet criteria of their own device...
- 2010: dude look this new thing "angularjs" a model/controller(vue?)/STAR*, the $scope dude it's crazy, something dynamically changes in the $scope and HOPP it appears instantly in the page :D
Few years fast-forward, have a watcher in a model that changes something in another model, unpredictable changes down/up, random mutations...duhh da heck?? We were good sending HTML from the server missing those days...
- 2014: dude look this new thing, it is called "React" and you know what?, forget about the state up/down, down/up and allover the place, the state is ONE DIRECTION with React, and it is backed by Facebook bro.
-(me) Oh yeah? Ok what about the 3 years I spent battling with AngularJS?
- Don't bother bro Google is dropping active development and maintenance of AngularJS, it is either you switch or use their beta Angular 2.
-(me) No, thanks I'll go for React.
- Dudeeee look it is Redux, you dispatch an action, and it takes care of updating the state, and you know what, you can combine it with Redux-thunk to avoid race conditions.
-(me) Wait wuuuut? Race conditions in the front? Feels like it is becoming a game engine bro da heeeeck...
- Brooowww, look dat new baby, VueJs :D
-(me) wait wuuuut? Don't tell me Facebook is letting down active development of React.
- No bro it's just another cool front lib it is really dope, and it's only the V(vue) part of the front taking care of reactively updating the DOM.
-(me) ok but what's new?
- Now you can have a DSL addition in HTML cool stuff like 'v-for' to dynamically hide/show a DOM element without writing any code.
-(me) wait, wuuuuut, this reminds me of something I've seen before, the ng-if AngularJS is coming back with another name? I'm loosing my mind broooo.
- Dudee look its Gatsbyjs, generates a cool static site, but you have to write React and graphql for it
-(me) ok.
- Dudeeeee look svelte is killing them all.
-(me) ok.
- Dudeeeee this one is an absolute killer, nextjs everything is server side rendered, you write your React component you describe the data and the server takes care of building the static html and send it to the client.
-(me) wuuuut? But that's what we were doing back in 2009?
- 2019 duuuuudeeeeee ...
-(me) STFU I quit.
(and since then, I'm happy cloud solution architect)
- reimplement browser features and do a bad job of it
- are unnecessarily slow
- try to stop being slow by breaking even more stuff
Some examples I’ve come across within the last week:
- Twitter pages randomly failing to load until the next hard refresh, probably because of service workers somehow (which are unnecessary for user experience improvement since HTTP cache exists and I don’t have notifications enabled)
- Twitter’s offscreen tweets not being searchable with browser find because they were optimized out of existence – and I want to do this in the first place because it decided to refresh itself while I was in the middle of reading
- YouTube application state getting out of sync with browser history that it overrides when I navigate Back too fast for it – the URL stops matching what’s playing and the navigation doesn’t take place
- GitHub’s reimplementation of browser navigation reimplementing a loading indicator but not the stop button (I think I’ve also gotten it out of sync before)
- Form state not being restorable across history navigation because the fields didn’t exist when the page loaded
- Reddit’s redesign is so unusably sluggish that I don’t stay on it long enough to run into any other problems
I agree with everything you said, but allow me to reiterate this point. Reddit's redesign is the most hostile thing I've ever seen. It explicitly blocks me from reading the discussion. What's the point, then? It's absolutely unusable. If they ever remove old.reddit.com, I'm not following a Reddit link ever again.
I didn't even realize they're reimplementing browser features and that's a really cool observation.
I think it's paramount to understand that this is not a list of bugs to fix, it's a list to convince us that we should consider Server Side Rendering more often and avoid client side navigation, history API with all its possible race conditions...
I personally love all the Dutch public websites, they have great UI/UX and are fast. For example: https://coronadashboard.government.nl/landelijk/vaccinaties
You get what you optimize for. User experience is not being optimized for. The ability to prey on users via ads, dark patterns, info harvesting, tracking and even malware is. This in turn happened because people discovered that, mostly, there are only two ways to make significant money online: 1. Be the first to deliver a revolutionary service everyone loves in just the right form for it to catch on. 2. Gather a bunch of users via some shiny object and then exploit the hell out of them.
For obvious reasons, #2 caught on, dominated the web, and will continue to do so until various regulations slow it down.
Frankly front end web development is a huge mess if you look at it from an unbiased perspective. HTML wasn’t designed for multimedia, JavaScript was designed in a week. Now the entire modern industry of web development are a series of endless hacks built on top of the old framework. React, typescript, css are all skin grafts on top of technology that was designed for something else. Of course the end result is going to be inefficient. The entire web is new tech patching up old tech. It’s like the 737 max, all of modern web development is an MCAS on top of html. It’s not even a single thing. It’s like hundreds and hundreds of MCAS’s with some MCAS’s built to patch up other MCAS’s.
The fix of course is to start from scratch. Given all of our knowledge of Modern web GUIs design a singular native api that can achieve what we need with significantly less complexity and better performance.
Of course some front end engineer with 10 years of experience isn’t going to openly embrace a new api that is not only better but can possibly mastered in a month by any average dev. If you’re primarily a front end developer I have to say that I cannot trust your opinion. I do not believe any person has the impartialness to deride the very thing that defines their career and expertise. Literally front end developers are just experts at navigating a universe of patches and hacks and no such dev wants to admit it.
I’m interested in peoples opinions though, it’s just in a thread like this it’s impossible to get an unbiased opinion.
1. it is standard to send json from server to client, a format that takes up more space on the wire, and takes more cpu power to serialize and deserialize than various binary options, all because nobody can be bothered to build tooling around debugging a binary format on the wire and a serialization library that is efficient into the browser
2. We require two separate text markup languages to define a ui (html and css) rather than compiling that down to an efficient binary format
3. We rely on a dynamic language built in 9 days to write client side code, rather than a byte code that any language could target and choose to be dynamic or not as the domain demands (wasm may one day finally change this)
Then rather than a trend of fixing these problems, we instead let these problems spread, as electron brought the html+css+javascript model to desktop apps, nodejs brought javascript to the server so you could use one language for your web app, and on and on.
There is hope though, wasm at the forefront. Today only non garbage collected languages are viable for wasm without adding the overhead of downloading a large runtime, but that is an engineering problem that could be solved.
There are so many trivial inefficiencies that can be trimmed away. But perhaps the biggest obstacle to a nice web experience is intentionally user hostile design. The modal popups, the cookie warnings. These waste more time than parsing and fat downloads for most of us. I'm not sure how to solve that problem. People give you blank stares when you complain about it.
I don't like Figma very much, but I think that's because I prefer typing code into text files. So, probably not for reasons pertinent to this discussions. Anyway, I'm interested in why you would consider it good.
That said, Figma sort of exists in an “app-like” vertical when it comes to web frontends. The other big vertical, and the one probably being alluded to in this tweet, is “magazine-like”. Those frontends have a much different goal, one that prioritizes responsive design, accessibility, progressive enhancement, and so forth. NY Times has been among the best in that vertical for a long time.
Life is too short for shitty slow, bloated websites and buggy apps. Just dont use this trash, if the devs aren't going to up their game and prioritize user experience over profits then fuck them.
The only way web developers are going to improve is if they start losing users and money. Until then they'll keep crapping out garbage.
If you didn’t get some dope developers then they will just half ass dump all of the stuff needed onto the page (which is why most of the the web sucks).
What’s worse is that these sites sit under a publishing/media business, so they aren’t tech companies (the devs are second class citizens).
Everyday I run into at least one site where they couldn’t figure out a sticky header, or a decent ‘accept-cookies’ box (where it takes up half the screen, and when you hit X (if you find it), it stutters away, as if css transitions is a mind blowing concept).
Then after that, the page janks down as a whole ad gets rendered. Zero effort is being put in at some of these places. I would consider lazy loading content in the visible viewport the moon for these sites.
This is a necessary discussion because the web is becoming a tech slum with these poorly designed websites. To bring it back to the larger web development (both app and website), it can be difficult to suggest to a team a very simple question - ‘Do you not see that the end result looks and feels like shit?’. It’s too abrasive, but all of us need to start asking these basic question for quality’s sake.