Hello friends,
Welcome to the iHateReading thread
Well before proceeding I want to ask a question.
Do you know who invented the website or World Wide Web (WWW)?
It's difficult to guess mostly computer science student might remember the inventor of the first website in the world.
Tim Berners Lee is the inventor of the first website or the World Wide Web.
HTMX
The new convention of creating a web application
By just writing CSS transitions, HTML components, Server events and web sockets using HTML attributes one can easily create web applications that work forever.
I was watching the YouTube video shared below by the HTMX team, and the speaker mentioned Tim Berner as well.
jQuery is not DEAD
Well most of us who are in frontend development prefer React, Next and Tailwind CSS for creating web applications.
Which is good and fast and server-side rendering provides a decent developer experience but these single-page applications have one main and few basic problems over time
- Single-page apps have a lot of dependencies involved that make app vulnerable to a crash in production
- Single-page apps are a bit slow because they deal with more JS than plain HTML and CSS
One can easily argue that why I blame single-page apps being slow.
To the people who knew nothing about Single Page Apps(SPA), SPA and MPA are single and multiple-page apps meaning the application entry point will be a single page just like in react, index.js page inside src directory and in multi-page apps there is not concept of entry point for the app just like vanilla JS apps we use to build 7/8 years ago before react came into existence.
jQuery is 75% of today's websites
Yes, you read it right?
Reactjs are so popular and trending still the entire world's websites are built or use jQuery.
Source of information - https://w3techs.com/technologies/overview/javascript_library
Well, this sounds pretty interesting to me because we developers often think the latest tech stack is the fastest one and more compatible and easy to use but the data points predict the reverse.
Why jQuery is so popular yet unpopular?
The main reason why jQuery is so much in the websites is because it's browser backwards and forward capability
Developers are not forced to upgrade the jQuery package version in the current app and that is one reason that makes it the most versatile and growing and working tech stack in the browser.
Imagine you developed an app 3 years ago, that we did for our website iHateReading and as a developer you might use a few latest tech stacks at the time of building the app such as
- Next.js
- Tailwind CSS
- Vercel
- React
- Shadcn
Most of the tech stack would have changed a lot in those last 4 years and most of the dependency packages would have upgraded and released the latest version as well making it difficult for us to keep on upgrading the packages hence our currency apps are versatile and long-lasting
Whereas using technologies that last forever under the hood like jQuery, HTML and CSS along with HTTP methods to handle form submit and server events developers create apps that last forever without the need for much of changes,
Read the article by the HTMX team, https://htmx.org/essays/future/?cmid=a84b211d-bf9a-403e-a90c-a434d14d291e that explains the concept of preferring jQuery under the hood.
jQuery is becoming unpopular because of moderate yet difficult writing syntax, and more easy and developer-friendly frameworks as the competitors make jQuery lose popularity.
HTMX love for jQuery
HTMX team on the same factors in favour of jQuery as described above prefers using jQuery and has decided to bring the server-side events, web sockets and form submission to be handled using jQuery.
I will bring more about HTMX in some other blog because HTMX is gaining popularity in the world of programming and the concept of writing apps forever seems to be solid.
A basic overview of HTMX is explained as follows
HTMX gives you access to AJAX, CSS Transitions, WebSockets and Server-Sent Events directly in HTML, using attributes, so you can build modern user interfaces with the simplicity and power of hypertext
htmx is small (~14k min.gz’d), dependency-free, extendable & has reduced code base sizes by 67% when compared with react
The founder of HTMX has written a book named Hypermedia Systems that brings HTMX into the real world.
The HTMX team and founder have brought the concept of hypermedia systems that help to create the HTMX framework.
https://hypermedia.systems/book/contents/
If anyone like to get into the details, below is the Hypermedia Systems online book that provides 3 chapters
That's it for today
See you in the next one
Summary
Thisarticle examines HTMX, a framework for building web applications. HTMX leverages HTML attributes for AJAX, CSS transitions, WebSockets, and Server-SentEvents. It contrasts with single-page applications (SPAs), highlighting SPAs' dependency issues and performance limitations. jQuery's enduring popularity, despitenewer frameworks, stems from its backward compatibility. HTMX, small and dependency-free, offers an alternative, reducing code size significantly. Therefore,HTMX presents a viable, long-term solution for web development.Thisarticle examines HTMX, a framework for building web applications. HTMX leverages HTML attributes for AJAX, CSS transitions, WebSockets, and Server-SentEvents. It contrasts with single-page applications (SPAs), highlighting SPAs' dependency issues and performance limitations. jQuery's enduring popularity, despitenewer frameworks, stems from its backward compatibility. HTMX, small and dependency-free, offers an alternative, reducing code size significantly. Therefore,HTMX presents a viable, long-term solution for web development.
