by andrewstuart · 3y ago · 0 comments
No. Choose what you like, what you enjoy, or what the boss told you to use. Ideally the project defines prioritize that give guidance. Otherwise do what feels right.
Don’t follow some arbitrary doctrine.
>> Choose the least powerful language suitable for a given purpose.
(Don't make me needlessly enable JavaScript to use your site.)
Rubbish. Web technologies are way too sophisticated to boil down to some silly rule of thumb that “the least powerful technologies are the” best in some way.
As a professional developer, use every technology at your disposal and use it in whatever way you like, including the most advanced techniques.
Ridiculous to be given the most one of the most powerful development tools ever made - the web browser - and artificially constrain how you use it for some dogma.
And if you’re a junior developer, ignore people who tell you how you should program - do it how you like unless the boss says different.
The walkthrough in the article seems to demonstrate pretty effectively that the powerful development tools offered by a modern browser may obviate the need for elaborate frameworks in many cases.
Where this is the case, then, relying a framework instead of the tools the browser already provides artificially constrains an application, potentially for dogmatic reasons, and regardless of a developer’s level of advancement.
Browsers have rapidly come a long way even just in recent years. Frameworks well and truly have a place, but narrowly relying on frameworks, particularly out of beliefs about browser capability established years ago (like when React was introduced), can neglect browser-native functionality that can provide same-or-better results, with potentially better outcomes in performance, accessibility, maintainability, and more.
This qualifier probably applies to >90% of this website’s audience, so I don’t think it’s useful.
Using less power if you can get away with it is absolutely sensible. If my implementation is suitably robust without the use of type families, data kinds, singletons, lenses, etc., then that’s a more economic solution.
What actually makes a site screen reader friendly? Developers that actually write accessibility tests, tab through their site manually, open it with a blindfold and a screen reader to make sure they can navigate it, etc. This myth that no JS automagically enables accessibility needs to die.
A website that requires JavaScript is, and always will be, worse than one that accomplishes the same without JavaScript.
Are users happy? Is dev speed of improvement good enough? Can you onboard new devs easily enough?
That’s it. Nobody cares if you used CSS or JS for a toggle switch.
The only people who disable JavaScript in their browsers and expect the 2023 internet to accommodate them are right here in this thread.
Just componentize it and move on to solving the next business problem, not the next code elegance problem.
Only a very small but vocal minority of users disable JavaScript, as it's not a default setting in any of the web browsers with a market share higher than the rounding error.
In a lot of cases, designing a no-JS website disadvantages both the service provider and the users:
- the service provider has to support a higher load to render the page and process the data on the server,
- the user has to endure longer processing times for their data, since their request necessitates a round trip from/to the server adding additional latency.
For example, let's think of an image processing web app. All of this can be done on the client side (and this gives the user a higher sense of privacy since their data doesn't need to reach the server). It's much faster there, reduces the server load - allowing the service to be used by more people at once.
And there is no value in appeasing the no-JS minority, since either maintaining a no-JS version of the app in parallel, or building the entire app without JS, outweighs the potential ROI from the <1% of users[1].
If you disable JavaScript because of tracking and ads:
- browser extensions exist to only prevent tracking JS from running without affecting the websites,
- you can still be tracked server-side.
[1] https://gds.blog.gov.uk/2013/10/21/how-many-people-are-missi... - 0.2% of users of the UK online government services had JavaScript disabled. Based on the research I can find online, most of the no-JS users are using TOR, which isn't a terribly profitable demographic for commercial websites.
I keep JavaScript always on and if I see a website abusing my trust, I just blacklist the entire website from my browser and never visit it again.
As a developer, all of my publicly available personal projects feature no tracking, no advertisements, and no third-party JavaScript in general. JavaScript is a really good tool, but as any tool can be, JS can be misused.
> Don’t follow some arbitrary doctrine
Isn't choosing what the boss told you to use simply because they told you to following arbitrary doctrine?
If someone has a reasoned argument for a specific tool they should share it, at which point you're picking it for that reason not because of the boss said to
Developers, engineers, whatever need to be responsible with the product they make. Part of that means making tool decisions that fit the specific context and pushing back when necessary