Compile the | Nuclear Coke, Tina
"2022 is here, and it's time to reflect on outdated software, hype, and absurd trends in web development. Grasp this year, we should also refocus on performance and technology application, and reunify the means and purposes. Of course, I'm not trying to persuade you to do web development in assembly or C, but it's time to stop the crazy ideas about JavaScript, Ruby on Rails, Python, Django, and PHP frameworks. ”
This is a blog full of anger. The author, unixsheikh, a "tech angry youth" born in the 70s, throws out the idea in a "radical" way: "Web developers should spend more time optimizing."
Obviously, it's a bit biased to blame web development, but his views do echo some people's voices. After the article was published, a supporter emailed him saying: "I have been arguing with my teachers and partners about the issues in the article. I used a project tool with 1786 packages and 69 vulnerabilities – 45 medium-risk, 20 high-risk, and 4 critical-risk. It 'weighs' 432 MB and is a mess inside. Even more ridiculous, it's not even enough to output 'hello world', as separate routing and state management packages are additionally required. It's all crazy, but everyone is running wild on this road, and it's called the 'modern way'. ”
Some netizens commented on Hacker News, "It contains some unacceptable truths." "Many people think that web development is a trivial matter that doesn't require front-end engineers, they exist only to add complexity to JavaScript, and 100% of the functionality of websites can be handled using plain HTML + HTTP forms." But the reality (IMO) is that browsers are 'new operating systems'. For most consumer and business software, running in a browser is the obvious choice. Whether you like it or hate it, this is the current implementation approach. ”
Different people always bring different opinions, and arguing is not necessarily a bad thing, and we have translated this article from unixsheikh in the hope of bringing some thought to the reader. Here's what he shared:
Not the browser's fault
Google Chrome is dominating the current global web browser market, and new problems arise from this - as a practical advertiser, Google is constantly advancing the highly deceptive and threatening Manifest V3 program.
Some friends naively see Mozilla Firefox as a savior and replacement for challenging Chrome's hegemony. That's right, Firefox did save us from the clutches of Microsoft IE. But today's Mozilla is extremely poorly managed. In 2018, Mozilla generated $435.7 million in revenue from major search engine vendors, which was mostly used to push the default search engine option on Firefox browsers around the world. It's mainly Google that spends money, along with Yandex and Baidu. While the situation is OK, Mozilla refereed about a quarter (250) of the world's employees in 2022, citing the economic turmoil caused by the COVID-19 pandemic "severely impacting the company's revenues." But is that really the case? , mozilla bosses got $2.4 million in 2018, and salaries have more than doubled in the last five years.
Mozilla is no longer the kind and reliable old guy, and to survive, they must have a big change of executives, stop products that no one wants, and return to a donation-based, customer-based development path. Of course, all of the above is gossip, just to bring up the first question that really matters.
Why do we need these browser vendors? Without them, wouldn't there be so much? I think the problem is with the so-called "modern web developers" who are the culprits!
It's these so-called "modern web developers" who have been building websites with bloated and unnecessary JavaScript, constantly developing web on platforms that don't fit. This is equivalent to forcing users to use browsers produced by big manufacturers, otherwise they will not be able to access Internet content normally.
Without what's called "modern web development," we wouldn't need these monster-sized browsers. We only need a simple lightweight browser to access all the features on the website, and only a few very professional websites require special solutions. Even so, most of these special websites don't have to rely on large browsers at all.
Web development needs an innovation
I know that some web developers don't understand these more reliable ways of developing, but that shouldn't be the reason. For any software developer, everyone should learn more and be exposed to new knowledge in addition to the knowledge they use. We need to know when to use this tool and when to fit another. I think it's time for a web development revolution to try not to use JavaScript on websites unless absolutely necessary.
In my opinion, this should be a necessary condition for the future development of Internet sites. Especially at a time when the concept of "Web 3.0" is in full swing, I believe that de-JS should be the most important exploration goal besides centralization.
The reason for such a battle goal is not only because our over-reliance on a small number of browser developers has caused a lot of real-world problems, but also because the whole process is wasting energy. Bloated websites have skyrocketed every visitor's electricity bill, bringing a double-loss result from both the server side and the client side.
Because there is so much JavaScript code in the browser (it seems that so-called "modern web developers" don't know how to develop front-ends without JS), users can increase device power consumption even by opening the simplest web pages. In addition, due to the use of unsuitable server-side frameworks such as Rails and Django, there is also a waste of server power consumption. In addition, it is reminded that although most of the websites running on the Internet are written in PHP, their cost is not low. PHP itself has solved a number of major internal and external performance problems since the v7 release, and has made power-friendly, but "modern web developers" are still using inefficient frameworks such as Larave, Symfony, Codelgniter, or Yii, whose existence makes PHP improvements meaningless.
In fact, all the frameworks that are currently popular are terrible. Their development is mostly based on abstract theory and design patterns, and contains many noise elements that are completely unrelated to real-world applications. More importantly, I'd like to call you to abandon these frameworks outright – because performance optimization is inseparable from the original code. We should stay away from chaos instead of adding more messy variables. If a piece of software output "Hello world" requires 75 classes or modules, it has absolutely no performance optimizations at all. Go back to simple, small, and highly optimized dedicated libraries and say goodbye to frameworks, okay?
In the past, when we discussed Unix, we often thought, "What else can be discarded?" Why does this option exist? "This is because basic design always contains flaws, and perfect design points are a goal that can never be achieved." So instead of rushing to add options, think about which options are truly "can't be without." ― Doug McIlroy
In the case of Rails and Django, the project team clearly did not understand the above point. Ruby and Python shouldn't be used for web development because they're too slow to fit. You can even create and run a website with Bash, it's all right, it's just not wise.
Some argue that developers' time is more valuable than computing resources, and the goal of Rails and Django is to help people get work done quickly. But that's exactly the problem: The over-bloated problem facing the entire Internet today is triggered by these irresponsible and short-sighted views. Fast, right? Apparently not.
As a personal recommendation, if you are a "modern web developer", it is highly recommended that you use go for web development, but do not use JavaScript on the front end. Most importantly, try web development without using the Go Standard Library. This is not only a learning experience, but also a valuable boost and inspiration.
Advice for web developers
If you're a web developer, you'd like to seriously consider the following:
If you've studied "modern" web development at a university or training institution, try to let go of everything you've learned and think for yourself. Unless you happen to meet a good teacher, it is likely that standing on the podium is a guy who only understands theory and reads the script. We have to study how the underlying technology works and make informed decisions. The so-called modern web development is clearly the opposite of all this.
Learn how to make a website using only HTML and CSS on the front end. If necessary, you can make a little UI improvement in JavaScript, but make sure that the improvement requirements are real and reasonable (validated in conjunction with user testing). And even if it makes sense, try to see if you can achieve the same effect without JavaScript.
Find a low-end notebook to test the product.
"Web application" is another well-designed brainwashing term. Whether you're delivering static or dynamic content, and whether users are able to interact instantly, the essence of a website is still just a site. It's not a game, it's not a complex piece of software like Google Maps, and it really can't be called an "app" for most websites that display text. Don't be fooled by the buzzwords, most websites can work without JavaScript.
Stop running a one-page website! The HTTP protocol is designed and built for small individuals and discrete requests, emphasizing that each request has its own special purpose. Loading an entire website onto the browser at once is obviously pointless, because 90% of the content has no chance of getting into the user's field of view at all. In the simplest example, is it necessary to preload page content such as "About Us"? Did anyone look at that thing? So, remember to divide your website into smaller sections and let users decide what they want to see, which is what HTML anchor tags do. Provide only a small homepage, and then the user clicks on the relevant hyperlink to request what they actually want to see. Isn't that how the Web works, and how does it work differently on a smartphone?
Stop sending JSON from the backend to the frontend, we're not building apis. Since the client responsible for content delivery is the browser, what is the direct sending of HTML?
Let all user input authentication occur on the server side. During the development process, try to complete all user input verification through only one round trip of the message to the access server. That's right, AJAX/JavaScript is not needed at all. JavaScript doesn't really improve the user experience; conversely, JavaScript validation and JavaScript ontology often disrupt the natural flow of a website, making keys such as TAB and other elements not work properly. Also, any input validation that is not performed on the server side is an error! In other words, any client-side-based input validation— whether implemented by JavaScript or html 5 built into the browser — can be bypassed, after all, on the client.
Stop sending fonts to your browser. Not many people really care about fonts, as long as they're not too ugly. Do a user test and the results may surprise you. Just let the browser select fonts directly from the operating system.
Stop sending browsers to cdns. This is dangerous, detrimental to privacy, and can even harm user rights. Deliver content locally.
Remove ads, delete pop-ups, and don't put so much spam on your page like presentations, mailing lists, and sign-up tips.
Also users a quiet and cheerful world, so that the website content as clear and concise as possible. There are too many things to see.
Don't use Google Analytics, Facebook links, and other social media spam on your site! We have to learn to get rid of these inherent elements. Also, do you really need any statistics? If so, isn't the statistics collected on the server side enough? Most of the information you really need can be collected directly by the server, right? In addition, if you choose to run across servers, logs are automatically sent to the log server. So stop relying on Google Analytics, which is unnecessary and questionable — maybe Google keeps lying to you.
Do not use programming languages that are not suitable for web development. Python and Ruby are two languages that should never appear on the Web. In summary, programming languages must be optimized for performance, and even C can be considered for specific tasks with demanding performance requirements. The resulting massive performance gains may correspond to cost savings beyond everyone's imagination.
Firmly grasp the ownership of the software you develop. This ownership means that we need to be responsible for everything that happens in the project. This will not only help improve the quality of the project, but it will also completely change our development mindset. Once something goes wrong, it's our own responsibility. How much power the project consumes on the user's computer is our business, the impact of the project on the environment is our business, the disabled experience provided by the project is our business, and the impact of the project on the future is also our business. If you are not willing to take on this responsibility, don't just get involved.
Stop being led by trends and hype. You should already feel that most of the trends and hype are deliberately guided by stakeholders and blindly promoted by a large group of ignorant people. So think more about yourself when you encounter problems, and don't rush to take sides.
Many friends may think that this article has no trendy content, and it was posted in 2001. I hope so, too, but unfortunately a lot of it needs to be discussed until ten years later. More and more web developers today realize that the idea of "modern web development" that has been preached in the market for years is wrong. Resources are limited, and we shouldn't splurge on both the server side and the client side.
https://12ft.io/api/proxy?q=https://unixsheikh.com/articles/so-called-modern-web-developers-are-the-culprits.html