If no one uses desktop computers anymore and webapps are slow and horrible on phones why is JavaScript so popular?
Discussion
Je ne sais quois
Think of a website like a house.
You have the main structure, which is built with HTML (HyperText Markup Language). This is like the walls, floors, and rooms of the house. It defines the content and layout.
Then you have the style and design, which is done with CSS (Cascading Style Sheets). This is like the paint colors, the furniture, the decorations, and the wallpaper. It makes the house look nice.
But for the house to actually do things—for the lights to turn on, for the doors to open, or for a video to play on a TV—you need something to make it work. That's where JavaScript comes in.
JavaScript is the action. It's the programming language that makes websites interactive and dynamic. It's the "verb" of the internet.
Here are some simple examples of what JavaScript does:
When you click a button on a website and a pop-up window appears, that's JavaScript.
When you fill out a form and the website checks if your email address is valid before you submit it, that's JavaScript.
When a photo slideshow on a website automatically changes pictures, that's JavaScript.
When you see a cool animation or a moving graphic on a page, that's JavaScript.
Without JavaScript, the web would just be static pages of text and images. It's the engine that makes the internet a lively, interactive place instead of just a digital book.
Because it’s a native language
Native to what ?
To JavaScript obviously!
Although google says it’s native to web browser.
What I meant is that JavaScript doesn’t derive from another similar language like react that comes from JavaScript.
So its code is pure code built from scratch; even while (like google says) having Java and C as languages of origin.
Which makes it resilient with time offering the interaction needed for a platform with less bugs.
laptops
ugh. js is the worst.
the net was nice when flash was used for animation and js wasn't a thing yet. good times.
Everyone uses desktop/laptops, well a lot of people do. It’s hard to get anything done efficiently on mobile. At least for old man thumbs. I don’t know anyone without a laptop. I think web apps run fine on phones.
Besides, you made VCPs look so good.
Thanks for developing its platform.
You made tomorrow’s money possible.
Because JavaScript went from UI to server side with node.js
It’s still being used a lot. For legacy stuff and for quick and simple and temporary solutions that stay permanent later.
I have 2 desktops, 2 laptops, 2 phones and 2 nodes.
That's an excellent and provocative question. The premise that no one uses desktop computers and that web applications are universally slow on mobile devices is a common, but not entirely accurate, perception. The popularity of JavaScript (JS), in a world dominated by mobile and web applications, can be attributed to several key technical and practical factors.
1. The Premise is Not Entirely Accurate
First, let's address the premise. While mobile usage has surpassed desktop usage for general browsing, the desktop computer remains an indispensable tool for a vast number of tasks.
Professional and Creative Work: Software development, data analysis, graphic design, video editing, and complex content creation are almost exclusively done on powerful desktop machines.
Gaming: High-performance gaming is still a major driver for desktop PCs.
Enterprise and Office Environments: Many businesses and educational institutions rely on desktop computers for daily operations.
For these users, the desktop web is a primary interface, and desktop web applications have become incredibly powerful and feature-rich, often replacing traditional desktop software. JavaScript is the foundational technology that powers this transition.
2. The Rise of Single-Page Applications (SPAs)
The "slow and horrible" web app experience on mobile is often a problem of poor implementation, not an inherent flaw in JavaScript itself. In fact, JavaScript, through modern frameworks, has been key to solving some of these performance issues.
Asynchronous Operations: JavaScript's event-driven, non-blocking nature is perfectly suited for modern web applications. It allows a web page to make network requests (e.g., fetching data from an API) without freezing the entire user interface. This is crucial for creating a smooth, responsive user experience on devices with intermittent or slow network connections.
Single-Page Applications (SPAs): Frameworks like React, Angular, and Vue.js enable the creation of SPAs. In an SPA, the initial page load might be slightly heavier, but subsequent navigation and interactions are extremely fast because the entire page doesn't need to be reloaded. Instead, JavaScript handles dynamic content updates by fetching only the necessary data. This makes the user experience feel native and instant, even on mobile.
3. "JavaScript Everywhere" and the Unified Tech Stack
One of the most powerful arguments for JavaScript's popularity is its unique ability to run on almost any platform.
Universal Language: JavaScript is the only programming language that runs natively in every major web browser. This means a developer can write a single codebase and have it work on Chrome, Firefox, Safari, and Edge without modification, guaranteeing accessibility to billions of users.
Full-Stack Development with Node.js: The introduction of Node.js revolutionized JavaScript. By bringing the Chrome V8 engine to the server, Node.js allowed developers to use JavaScript for back-end development. This creates a unified "full-stack" tech stack, where both the front-end and back-end can be written in the same language. This leads to several technical advantages:
Developer Efficiency: Developers don't need to context-switch between languages, which streamlines the development process.
Code Sharing: Logic can be shared between the server and the browser, reducing code duplication and potential bugs.
Performance: Node.js excels at handling a large number of concurrent connections due to its non-blocking I/O model, making it ideal for real-time applications like chat and streaming services.
4. Massive Ecosystem and Developer Community
Finally, JavaScript has an unparalleled ecosystem and community.
Vast Library and Framework Ecosystem: The sheer number of libraries, frameworks, and tools available for JavaScript is staggering. From specialized data visualization libraries like D3.js to comprehensive testing frameworks like Jest, a developer almost never has to "reinvent the wheel."
Open Source and Community Support: The JS ecosystem is largely driven by a vibrant open-source community. This ensures rapid innovation, continuous improvement, and robust support, making it easier for new developers to learn and contribute.
In conclusion, JavaScript's popularity is not a paradox but a testament to its technical evolution and adaptability. It has matured from a simple scripting language to a foundational technology that powers the modern web on both desktop and mobile, thanks to the rise of sophisticated frameworks, its full-stack capabilities with Node.js, and an unparalleled developer ecosystem. The perception of "slow and horrible" web apps is often a remnant of an older era of web development and not a reflection of what modern JavaScript is capable of.
because of the money that mozilla and google throw at marketing it. they are also major stakeholders in the IETF that cooked up that abomination.
in fact, mozilla, formerly for-profit netscape, still in the business of monopolizing the web, have done a very good job of fooling a lot of internet freedom activists into thinking that they actually want an open web while they maintain and expand their monopoly on its protocol specifications, and choice of languages.
google has plenty of clout to try and change that but flutter and dart are still barely used in anything of note. and i am pretty sure it was mozilla that vetoed adding Dart to the W3C standards. even though it's definitely a better, faster and more secure language than even typescript.
Depends on the browser and operating system?
Still the best bet for cross platform, which many businesses need to maximize target audience. And easy to hire devs.
But that was my point: cross-platform, but it's bad on mobile (unless you have ultrafast internet and a very expensive device) and no one uses desktops (or at least that's what I'm constantly told), so is such cross-platformness really valuable?
Yo, I feel ya! 🤔 But if it’s cross-platform, shouldn’t it still be lit for peeps on all devices? Or is it just a flex that don’t hit right on mobile? What’s your take? 💻📱 #TechTalk
Depends on what you are building and for whom. Most B2B stuff is desktop only, and no one wants to do real work from a phone. Social media apps are something you use in the sofa or toilet, where you are unlikely to have a desktop. Etc
For what its worth, I do hope LLMs will lower the cost of porting apps to different platforms, and we'll see more native apps.
I also question your assumptions: cross platform is necessarily less efficient than native, but doesn't have to be garbage. Users on cheap devices might have bad data plans, and dont want to download your app, but would use your website.
Illuminati imo.
In my view a well-built webapp is anything but slow and horrible ... If you build it correctly, it can be both very fast to load and very fast to navigate....
Because there is no good alternative yet.