So-called modern web developers are the culprits
Published on 2021-12-17. Modified on 2023-10-27.
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 as soon as possible 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 on donations only), but also so focus can be where it needs to be.
Yet, 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 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.
This drawing represents what you get when you follow the "modern way of web development".
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 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 more 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), 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. PHP in and off itself is not the problem 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 the ridicules inefficient frameworks such as Laravel, Symfony, CodeIgniter or Yii.
The fact is that all the popular PHP frameworks are bad. They are mostly developed not to solve problems, but to fulfill object-oriented theory. Theory about abstraction, design patterns, and all the other buzz that is more or less useless in real life.
Not only that, PHP is the framework! You cannot use a framework on top of that because you need performance, you need to work with raw optimized code. You need to get rid of all the clutter, not add more of it. You cannot build software for performance when it requires 75 class dependencies just to print "Hello world" on the screen.
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 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 tools 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!
Some people argue that developer time is more costly than computing resources and Rails and Django is all about getting things done fast, but that is exactly the problem. The problems we're facing on the Internet today is the long term consequence of exactly that irresponsible short term view. To get things done fast rather than right.
As a personal recommendation, if you're doing any a so-called "modern web development", I strongly suggest that you try to do web development in Go, yet without JavaScript on the front-end. Learn how to do Go web development without anything but the Go standard library. It will not only be a learning experience, but you will gain a valuable insight and Go will enlighten you immensely.
If you're a web developer consider these points:
- If you have studied "modern web development" on some 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 people who know nothing but theory. Study how the underlying technology work so you can make educated decisions. So-called modern web development is working against the technology it is running on.
You need at least a basic understanding of TCP/IP, DNS, HTTP, web server, web browser, and Internet security. If you don't, and all you know is how to put together a working web application using a popular framework, then you are about as useful to yourself as a monkey with a torque wrench. - 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.
- Test your product on a crappy laptop
- No, your website is not a webapp even if you call it so
- Stop making single page websites!
The HTTP protocol is build to serve small individual and discrete requests, each with its own unique purpose. It makes no sense 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 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 back-end to the front-end. You're not building an API!
When the client is a browser you need to send HTML directly to it. That is what it is for. - Make all 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 or 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.
Furthermore, if you're not doing input validation on the server anyway you're doing something very wrong! All client based input validation, whether done by JavaScript or browser build-in HTML5, can be circumvented - it's running on the client, remember? - Stop sending fonts to the browser. Nobody really cares about fonts and few people even notice. Do a user test, you will be surprised. Let the browser choose the fonts from the operating system - many users disables your fonts anyway.
- Stop sending the browser to CDNs. It is dangerous, privacy compromising and can potentially harm your users. Serve your content locally.
- Get rid of all popups, slideovers, mailing list signup jump-up-in-your-face garbage, etc.
- Stop using Google Analytics! Do you truly need all the statistical data? You do know that the server is already collecting statistical data right? Don't let Google Analytics do it for you, Google Analytics is used to track users across the interweb. Besides, how do you even know that you can trust Google to display valid statistical information back to you?
If you absolutely must, then at least use an open source alternative. - Stop using Facebook likes and all the other social media junk on your website! We need to get rid of all of this. It is also used to track users across the interweb.
- 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 performance.
- Take ownership of the software you develop! 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 changes your mindset. If something goes wrong, you're responsible. The power requirements your project demands on users computers, you're responsible. The impact your product is having on the environment, you're responsible. The impact your project is having on people with disabilities, you're responsible.
If you cannot be a responsible software developer, you should find something else to do. - Stop following trends and hype blindly. Make educated decisions. You should know that most trends and hype are driven by either ignorance or people who make money on people who follow trends and hype.
Maybe you believe that this article belongs in 2001, but you're wrong. More and more web developers are finally waking up to the fact that what they have been doing all these years of so-called "modern web development" is wrong.
We need faster, more secure, and less power hungry websites both on the servers and on the clients.
Email from an anonymous user
I have been arguing with all of my teachers and classmates about this very problem!
You use a project tool that pulls down 1786 packages with 69 vulnerabilities. 45 moderate, 20 high and 4 critical. In summary 432 MB of a mess. Yet, you can't even print "hello world" with it. You need a separate package for routing, another for state management, etc.
This is just about as crazy as it gets, yet everyone is doing it and it's considered "the modern way".