I started creating web apps with Django, because it's amazing. Soon after I started looking at React and all those SPA which offered way more dynamic content, and started questioning my decisions. I learnt JavaScript, React... But I didn't quite like using Django just like an API and making all the front with JavaScript. HTMX came to save me, and now I feel like I can do whatever I need with Django + HTMX, plus the benefits of pre-rendered pages in SEO
to be fair, a lot of the javascript metaframeworks also prerender by default. i also like django a lot, but decided to go with nextjs for my most recent project. i feel like there is just more and better tooling {e.g. the ui component libraries} for building front end stuff in the javascript world.
Template engines will never disappear. You're talking very much in the area of web development. But Jinja is very prominently in the networking world, and Go's template engine is still gonna stay in Kubernetes. Both are used more in the area of configuration, but that said it's still nice to use HTMX over JS any day of the week.
Java script by itself is a fulstack language it troubles me to learn python for backend only to end up learning java script which can do back and front end. If htmx has no community at all then they have me, at least me and the developer 😅
You should give htmx a try. Then you can learn any language (not hard at all) and use a framework (or, if it's golang, you don't need any) for the backend, and just use htmx for anything complex on the frontend. Templates really do their job. I don't think it has no community. as far as I know, there's a discord. And even then, the documentation is really good, cause it even covers common htmx patterns and such (funnily enough, you can literally do them on your own without ever reading those patterns, they just come naturally).
Imo, the main problem with template engines is the lack of static type checking during dev and the ability to build components: JSX/TSX (server side) and Golang/Templ are great choices. What about other options ?
IMO You are desecrating a corpse, Dennis. Templating engines are a thing of the past. One of the most powerful features of frontend JS frameworks is state management. htmx is OK for SMALL personal PROJECTS, but it wont allow you to do all sorts of things you can do with proper frontend frameworks. You'll end up writing JS anyway, and in the end it'll turn into an ugly hot-fix spaghetti code mess. The Django project should ditch the templating engine entirely and focus on its API, making it as JS friendly as possible. I would advise newbies from the start not to bother with the templating engine, forms etc and just use DRF or Ninja.
It depends. If you want to build web systems to last (think Wikipedia) they should be true hypermedia based to be future proof. In 20 years all these React pages will be as dead as those Flash pages from 1998.
both have their place in the toolkit of a web developer IMO. i think we shouldnt so easily dismiss something if a lot of people like it. because there probably are reasons which you didnt consider or which you dont prioritize in your own work.
I love this take. HTMX has been my "go to" lately since I do love Django / jinja style templates.
I started creating web apps with Django, because it's amazing. Soon after I started looking at React and all those SPA which offered way more dynamic content, and started questioning my decisions. I learnt JavaScript, React... But I didn't quite like using Django just like an API and making all the front with JavaScript. HTMX came to save me, and now I feel like I can do whatever I need with Django + HTMX, plus the benefits of pre-rendered pages in SEO
Sounds like you and I have a similar experience 👊
For me, HTMX just came about 7 years too late haha
@DennisIvy it's never too late! Hahaha
to be fair, a lot of the javascript metaframeworks also prerender by default. i also like django a lot, but decided to go with nextjs for my most recent project. i feel like there is just more and better tooling {e.g. the ui component libraries} for building front end stuff in the javascript world.
but in the end it doesnt really matter what you use to build it, as long as you are comfortable and can focus on shipping features :)
@IamYouWeAreEveryone true! Easy components libraries and implementations is the last cool thing that I think Django's template system is lacking.
Good to see you back, missed your content.
I just picked up EJS template and it just works. I am using Deno / typescript although I am just learning both. So far I am liking HTMX
I See Your Django Course At Traverey Media , It Was Great Experience Bro, Thanks For Making That Course.❤
Greetings from Greece Dennis! Nice to see you back again! Happy new Year and please don't leave us again!
Template engines will never disappear. You're talking very much in the area of web development. But Jinja is very prominently in the networking world, and Go's template engine is still gonna stay in Kubernetes. Both are used more in the area of configuration, but that said it's still nice to use HTMX over JS any day of the week.
Yea you are right, I’m definitely referring more to the web dev world.
when we see frequently contents like in this way, motivate us
👊
thank dennis. I am glad that I'm getting notifications from you again :)
☺️
EJS is back, baby! 🎉
💪
What is the difference between HTMX and Alpine? I see that in Laravel projects they are mostly using Alpine.
Alpine is a Js framework use it for toggle interactivity htmx is for sending http requests without page refresh and Laravel mostly uses Livewire
Java script by itself is a fulstack language it troubles me to learn python for backend only to end up learning java script which can do back and front end.
If htmx has no community at all then they have me, at least me and the developer 😅
You should give htmx a try. Then you can learn any language (not hard at all) and use a framework (or, if it's golang, you don't need any) for the backend, and just use htmx for anything complex on the frontend. Templates really do their job.
I don't think it has no community. as far as I know, there's a discord. And even then, the documentation is really good, cause it even covers common htmx patterns and such (funnily enough, you can literally do them on your own without ever reading those patterns, they just come naturally).
Imo, the main problem with template engines is the lack of static type checking during dev and the ability to build components: JSX/TSX (server side) and Golang/Templ are great choices. What about other options ?
You can most certainly build components with a template engine. I do this all the time.
Ok, I'll give up the secret for you here - it's FastHTML - you can tank me later :) Happy new year!
Django + HTMX course loading?
Yes
React : Are trying to take my job HTMX ?
Awesome spas are too tedious
Both have their place :)
To much expensive
How?
IMO You are desecrating a corpse, Dennis. Templating engines are a thing of the past. One of the most powerful features of frontend JS frameworks is state management. htmx is OK for SMALL personal PROJECTS, but it wont allow you to do all sorts of things you can do with proper frontend frameworks. You'll end up writing JS anyway, and in the end it'll turn into an ugly hot-fix spaghetti code mess. The Django project should ditch the templating engine entirely and focus on its API, making it as JS friendly as possible. I would advise newbies from the start not to bother with the templating engine, forms etc and just use DRF or Ninja.
It depends. If you want to build web systems to last (think Wikipedia) they should be true hypermedia based to be future proof. In 20 years all these React pages will be as dead as those Flash pages from 1998.
nah, hypermedia and using hypermedia as the engine of application state scales better than SPAs for many, maybe most, web applications
Totally disagree - this is the worst advice one can give to beginners
Low iq take
both have their place in the toolkit of a web developer IMO. i think we shouldnt so easily dismiss something if a lot of people like it. because there probably are reasons which you didnt consider or which you dont prioritize in your own work.