10 ms·
What upsets and concerns me the most is when I see poorly developed SPA on really important sites. For example, government service application websites. If re
by bit_logic 6y ago
What upsets and concerns me the most is when I see poorly developed SPA on really important sites. For example, government service application websites. If reddit or nytimes has a bloated, intermittently failing SPA site, that's an annoyance. When it's a form to apply for unemployment, ACA health care, DMV, or other critical services, it's a critical failure. Especially since these services are most often used by exactly the population most impacted by bloated SPA (they tend to have slow or unreliable internet and slow computers, maybe even a cheap android phone is all they have).
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).
- clairity 6y agowhat concerns me more than that is how government sites require google and the like (captcha and analytics at the very least), giving them opportunity to hoover up all of our sensitive data in one convenient place.
- lifeisstillgood 6y agoI am going to :+1: the UK census site - built on code developed by the gov.UK digital service, it has been apparently bulletproof at taking 20 million plus individual households through a moderately complex survey. sometimes it can be done right. And it uses a framework :-)
- devit 6y agoWhich framework?
- WickyNilliams 6y agoIf my memory serves me right, it's Python/Django. I contracted in that department a few years ago. Edit: Just remembered it's all open source too! Look here and search for repos beginning "eq-". Survey runner is the app I believe. When I was there the plan was to use that, though perhaps they eventually wrote a fresh app. Anyway the code should all be there https://github.com/ONSdigital?q=Eq&type=&language=&sort= https://github.com/ONSdigital?q=Eq&type=&language=&sort=
- uncledave 6y agoThat was notably one of the best web experiences I’ve used recently. Gov.uk is exceptionally good.
- wilsonfiifi 6y agoWagtail
- armonraphiel 6y agohttps://docs.publishing.service.gov.uk/ https://docs.publishing.service.gov.uk/ Looks like the core site is Rails but it seems they use a bit of everything. Preact, Go, Node, etc
- jonplackett 6y agoYeah I was pretty impressed with it too. One thing I liked, it does lots of error checking along the way to pick up accidental screw ups. 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?’
- jlokier 6y agoNot quite bulletproof. I found a couple of bugs while using it. 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.
- toomuchtodo 6y agoConsider filing a bug report: https://census.gov.uk/en/web-form/ https://census.gov.uk/en/web-form/
- jlokier 6y agoThanks. I already did so via the feedback form at the end.
- JNRowe 6y agoYeah, I was impressed enough to fill out the feedback form at the end. It is probably the first time I've used a feedback form for compliments in my life.
- hlandau 6y agoIndeed - I used this site the other day. My reaction at the time was "This is the nicest web application I've used in decades." Web design that good is so rare now, it really stands out.
- danjac 6y agogov.uk is such a glaring exception to government sites around the world I can only imagine there was some massive screw up where the developers were allowed to go off and build a fast, accessible and responsive site on their own without the requisite ten layers of committees, meetings and expensive external consultants. I hope there is a government inquiry to ensure this doesn't happen again and that taxpayers money is properly squandered on massive IT failures as per standard practice.
- docmars 6y agoThis gave me a good laugh, thanks for that ;)
- uncledave 6y agoYes definitely. 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.
- seandoe 6y ago> early 2000’s sort of thing Right. It probably IS an old site and they've had years to iron-out bugs.
- uncledave 6y agoNope. I spoke to the woman who issued us with an account and they just had it built for them.
- joelellis 6y ago> The site appeared as a flat background old style early 2000’s sort of thing with bits of comic sans in it. That's surprising - even external stuff usually has to follow the NHS's design system. https://service-manual.nhs.uk/design-system https://service-manual.nhs.uk/design-system
- rabuse 6y agoI honestly hate SPA's. They're not necessary in almost every single use-case, yet everybody is shifting their shit into one.
- renlo 6y agoIt’s because frontend devs are taught to use react, so suddenly every website unnecessarily becomes a react app. If every tutorial and class out there teaches people to use hammers (react) then people start using hammers to screw in a lightbulb or perform surgery.
- slowmovintarget 6y agoWhy SPAs? They're good when you develop capabilities API-first. When we build features, we follow an approach of making the feature possible (customer support can exercise the feature with PostMan or cURL) then making it friendly with a UI. 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.
- axguscbklp 6y agoEven if you develop capabilities API-first, you don't need an SPA, though. You can create some backend code that consumes your API and in turn serves separate web pages to a front end.
- tyingq 6y agoI really believe it's a case of resume driven development. I'm sure there are counter-examples, but the whole move to SPAs, from my vantage point, has been driven by tech people and not leaders. Self-inflicted.
- 6y ago
- estaseuropano 6y agoCompletely agree. And yet, were there ever better days? In the past simply fewer websites were online. I think a bad website is better than none. At the same time the real question is why lots of governments wouldn't need to reinvent everything. That is maybe the original sin.
- tomc1985 6y agoWhy do these things even need to be an SPA? What function does that serve when the standardized and infinitely more compatible form-with-a-bit-of-javascript approach works just as well if not better? 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.
- polynomial 6y agoHow can a government contractor reasonably justify a price tag that's on par with fancy bloated non-government sites, for an no nonsense form + js approach?
- toast0 6y agoCosts the same as what you would otherwise pay, plus it actually works?
- davemp 6y ago> plus it actually works That’s the problem. Maintenance is big money for government contractors.
- vram22 6y ago>plus it actually works? Heh. "That was the most unkindest cut of all." https://www.google.com/search?q=unkindest+cut+of+all+quote https://www.google.com/search?q=unkindest+cut+of+all+quote Also, "the emperor's new clothes". Both relevant.
- danjac 6y agoBecause they're a business that will charge as much as they can absolutely get away with and will do their best to make the project and maintenance costs as bloated as possible. The question is why there aren't people in the government with either the technical ability or the political clout to audit and push back at any point in the project.
- mattwad 6y agothis isn't just a problem with SPAs. The quickly-built vaccine registration site I was using kept giving me 500 errors from Heroku.
- shadowgovt 6y agoAt least regarding the US federal government, it was a known issue that (a) the government wasn't willing to spend enough to hire quality software developers and (b) the government bureaucracy lacked a process to determine whether web software was "good." Specifically, no effective methods of software validation based on modern best practices (the processes they used were descended from the validation processes for material acquisition, which look extremely different from software engineering). 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.
- chubot 6y agoYeah what's weird is that there's is an entire generation of developers who think of SPA as the default. 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.
- zamadatix 6y agoI've always taken "server side is slower" to mean "slower to host" in context of web pages. Sure it may blow chunks to parse 10 MB of JS to click a button and leave on the client side but that's 10 MB of static JS served via dirt cheap anycast style CDN and it doesn't matter if you have 1 client or 100,000 clients you could host it on a single server's worth of CDN which doesn't have to worry about any client state ever (and for the tiny percentage of client state you do need to manage it might be hosted on a much smaller solution that handles just that logic). 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.
- ralusek 6y agoThis is the exact opposite of my experience. 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.
- bstar77 6y agoI exclusively write SPAs these days and I think they are vastly superior for many reasons. The problem is that you can build a shitty product with good tools. 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?
- deleted 6y ago[deleted]
- p1mrx 6y agoSPA = single-page application
- tarmon 6y agoThank you! It is hard to search for that term :)
- mmcnl 6y agoThis is a very simplistic characterization of what's happening. 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 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/ 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.
- ilaksh 6y agoIt kind of freezes up on my phone. Not intolerable but definitely slow.
- mmcnl 6y agoIt loads instantly on my Xr.
- axguscbklp 6y agoWhy do you think it would not be possible to build a website of such quality without frameworks? 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.
- 6y ago
- ec109685 6y agoThe New York Times used to be a mess on mobile where swiping back was a 5 second wait until the SPA synced. It is much better today, so either they ditched the SPA or have now fully simulated a browser’s back and forward behavior.
- BareNakedCoder 6y agoThe founder of SvelteJS works at the NYT. SvelteJS works well on underpowered devices.
- gumby 6y ago> If reddit or nytimes has a bloated, intermittently failing SPA site, that's an annoyance. When it's a form to apply for unemployment, ACA health care, DMV, or other critical services, it's a critical failure. 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.
- mr_toad 6y ago> 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 Government services were slow and unreliable before computers. The problems aren’t technological.
- kodah 6y agoI went to go redesign my blog recently. I was intending to use the Go Template engine, but I'm not a frontend person so I wanted to use a frontend framework. I quickly discovered that most of even the purest of css frameworks did not have instructions for what I wanted to do. They all used Next.js, Webpack, etc and we're designed to be used in Vue or React. I love component frameworks for their simplicity, but everything that powers them is complex.