So-called modern web developers are the culprits
Published on 2021-12-17.
2022 needs to be the year when we seriously begin to get rid of bloatware, hype and trends in web development. It needs to be the year when we focus on performance and on utilizing the technology in harmony with the intend behind it. I am not saying that we should do all web development in assembly or C, but we need to stop the JavaScript, Ruby on Rails, Python with Django and PHP framework madness.
Google Chrome currently dominates the market share of web browsers. This is a problem because Google, being the advertisement company it is, are planing to implement the deceitful and threatening Manifest V3.
Some people naively look towards Mozilla Firefox as the "savior" and alternative to the Chrome hegemony. Maybe that's because of the way it previously saved the Internet from the "evil dominance" of Microsoft Explorer. The problem is that Mozilla is extremely mismanaged. In 2018 Mozilla got $435.7 million in revenue from search engines who pay to be the default search option in Firefox in different parts of the world, mainly Google, but also Yandex and Baidu. Still, in 2020 Mozilla cut about 25% (250 people) of its global workforce, blaming the corona virus impact on economies as something that "significantly impacted their revenue". Yet, Mozilla had received more that enough money. In 2018 Mozilla's top executive was paid $2.4 million and his payments has more than doubled the last five years!
Mozilla is NOT the "trusting" organization it used to be. If Mozilla is going to survive, the management needs to be fired ASAP with no compensation what so ever, products that nobody wants need to be stopped and Mozilla needs to be limited to its core competence, not only so that it can survive on less revenue (perhaps by donations only), but also so focus can be where it needs to be.
Still, we need to pause here for a second!
We need to ask ourselves why we are having these problems to begin with? Why do we even need these major browser vendors in the first place?
I blame the so-called modern web developers! They are the culprits!
It is the so-called modern web developers that keep stuffing websites with bloated and unneeded JavaScript. It is the so-called modern web developers that keep building websites on unsuited platforms. It is the so-called modern web developers that build websites so that absolutely nothing works unless you run with one of these miserable browsers.
Without so-called modern web development we don't need these huge monsters that the browsers have become. We can get fully functional websites with simple lightweight browsers, and only very specialized websites would require special solutions. But even most of these special solutions can be made to work without any of the huge browsers.
I know that some web developers just doesn't know any better, they do web development as they where taught, but that's possibly the least acceptable excuse. If you're doing any kind of software development you need to study beyond what you have been taught, you need to understand the technology you work with. You need to know when to use a specific tool over another.
Other web developers are forced by their employers and managers. They know they build bloat, but don't really have a choice. And this is perhaps the true core of the problem, greed. Share holders, business owners, startups and managers driven by greed. They want everything done fast and easy because they are unable or unwilling to look beyond their greed for profit.
We need a new movement in web development. We need to make it so that it will be absolutely frowned upon to have a website that doesn't work without JavaScript enabled unless it is absolutely necessary. This MUST be a requirement for the future development of websites on the Internet. If there should be any truth to the hype about a "Web 3.0", then this is one of the most important matters besides decentralization.
We need this movement not only because of the above mentioned problems with our dependency on a few browser manufactures, but also from an environmental point of view. The power requirements of the bloated websites, both on the servers and on the clients, are absolutely ridiculous. Because of the excessive stuffing of JavaScript into the browser (apparently no so-called modern web developer knows how to create a frontend without JavaScript - sigh!), the user regularly experience an increase in power consumption when he opens a simple webpage. And because of the ill-suited server based frameworks, such as Rails and Django, the servers also experience an unneeded increase in power consumption. Even PHP, that is running most of the websites on the Internet, doesn't go free. The culprit is not PHP in and off itself because PHP has since version 7 seen major performance improvements, some very much motivated by environmental concerns, no, the culprits are still the so-called modern web developers who, when working with PHP, cannot figure out how to do anything without one of stupidly inefficient frameworks such as Laravel, Symfony, CodeIgniter or Yii.
The fact is that all the popular frameworks are crap. None of them are developed with performance as a goal. Rather, they are mostly developed by theory. Theory about abstractions, design patterns, and all the other buzz that is more or less useless in real life. Not only that, you cannot use a framework in first place because when you need performance, you need to work with raw optimized code. You need to remove all the clutter, not add more of it! You cannot build software for performance when it requires 75 classes or modules just to print "Hello world" on the monitor. What you need is simple tools, small, optimized and specialized libraries, not frameworks.
We used to sit around in the Unix Room saying, 'What can we throw out? Why is there this option?' It's often because there is some deficiency in the basic design — you didn't really hit the right design point. Instead of adding an option, think about what was forcing you to add that option.
― Doug McIlroy.
With regard to Rails and Django specifically then that is a matter beyond comprehension. Neither Ruby nor Python should ever have been utilized for web development. They are simply ill-suited because they are too slow. They are the wrong tool for the job. Just because I can use Bash to create and run a website doesn't mean it's a good idea to do so.
As a personal recommendation I strongly suggest doing all web development in Go, yet without JavaScript on the frontend. Learn how to do Go web development without anything but the Go standard library.
If you're a web developer consider these points:
- If you have studied "modern" web development on some university or educational institution you need to be willing to discard what you have been taught and start to think for yourself. Unless you have had a really good teacher chances are that you have been listening to the ranting of fools, people who know nothing but theory. Study how the underlying technology works so you can make educated decisions based on fact and real life experience (if you haven't got any, the Internet is filled with blog posts about it). So-called modern web development is working against the technology it is running on.
- Learn how to make a website with just HTML and CSS on the frontend. Only use JavaScript on the frontend for small UI improvement if you must, but make sure that the improvement is truly justified (you need to do proper user testing to know that). Even when it is justified, make sure that everything STILL work without JavaScript.
- Stop making these stupid single page websites! The HTTP protocol is build to serve small individual and discrete requests, each with its own unique purpose. It is absolutely idiotic to load an entire website on to the browser in one go. Most people don't read or view 90% of the content on a website. There is absolutely no reason to load e.g. the "About Us" page on to the browser if the user never reads it! Split the website up in several small parts (like we did with web 1.0) and let the user decide what he or she wants to see, that is what HTML anchor tags are for. Serve a small front page only, then let the user specifically request what he or she wants by clicking on relevant hyper links. This is how the web is supposed to work - even on a smartphone.
- Stop sending JSON from the backend to the frontend. You're not building a freaking API! When the client is a browser you need to send HTML directly to it.
- Make all logic and user input validation run on the server. You can build the application so that it only requires a single round trip to the server to validate all user input in one go. There is no need for AJAX/JavaScript. Only rarely does JavaScript truly improve the user experience. Rather, often JavaScript validation and JavaScript in general breaks the natural flow of the website making keys like TAB and other things not work properly.
- Stop sending fonts to the browser! Nobody cares about your fonts and very few people besides graphical designers even notice any difference!
- Stop sending huge images to small displays. Set the correct size of elements before they load, this prevents the content from jumping all over the place.
- Stop sending the browser to CDNs. It is dangerous, privacy compromising and can potentially harm your users. Serve your content locally, but keep it minimal.
- Do caching. There is no need to generate the same dynamic content over and over again. Also, don't inline everything. Inlining everything prevents any of those resources from being cached and reused on other pages. User will have to re-download everything if they click on any links on your page.
- Get rid of ads and remove all popups, slideovers, mailing list signup garbage, etc.
- Give clear and concise information on your website. Don't make users chase answers.
- Stop using Google Analytics, Facebook links and all the other social media junk on your website! We need to get rid of all of this. Besides, do you really need all the statistical data? If so, are you absolutely sure that the statistical data that the server already is collecting isn't enough? You do know that you can collect most of what is truly needed on the server alone right?
- Don't use programming languages unsuited for web development. Python and Ruby are two programming languages that should never have made it to the web. Make sure that the programming language has been optimized for web development. Even consider using C for very specific tasks that require massive performance. It will surprise you just how much money you can save by the huge increase in performance that C can provide.
- Take ownership of the software you develop. You have to do this. When you take ownership you become responsible for everything that happens with the project. This has a major impact on the quality of the work you do and it complete changes your mindset. If something goes wrong, you're responsible. The power requirements your project creates on users computers, you're responsible. The impact your project is having on the environment, you're responsible. The impact your project is having on people with disabilities, you're responsible. The impact your project is having on the future, you're responsible. If you cannot be responsible you should not be involved!
- Stop following trends and hype blindly. Make educated decisions. You should know that most trends and hype are driven by either idiots or people who make money on people who follow trends and hype.
from Hacker News https://ift.tt/3mbSQcY
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.