The Simplest Tech Stack
HTML-код
- Опубликовано: 7 сен 2024
- A Go + HTMX stack to build modern web apps.
💬 Topics:
- What is HTMX;
- HTMX Tutorial;
- Go Tutorial;
- Go + SQLite;
- Advantages of multi page applications;
- Working with Go Standard Library;
- How to structure a modern web app;
- JS framework alternatives;
- Build a simple web app.
🥇 Become a Member - / @awesome-coding
✉️ Join the Newsletter - newsletter.awe...
📖 Blog Article - www.awesome.cl...
"Since the web is neither as complex as game development nor as sensitive as the embedded systems, web developers have to create their own job security through useless complexity." That's the strongest line I've heard in a while. I'm stealing it.
Me too
Exactly. Web dev is just a simple select from database and display to browser and input from browser and save to database. Tools nowadays are uselessly complicated 😅
Gold
it depends what kind of what web app?? is it web app like figma? canva? then it's quite complex@@genechristiansomoza4931
To be honest, in my personal experience, anything with a "nice" GUI is going to be complicated because GUIs are complicated...
If you are doing a ultra minimalist interface (maybe just command line), the world is kind of your oyster.
Remember folks, it never hurts to just use css and javascript. Abstraction of the same concepts is just a dialect difference.
JSF (Java Server Faces) just waiting in the background like "oh okay we're looping entirely back to thin clients and fat servers?"
You sir should take away your JSF mention and leave this comments section immediately.
Back in the early 2010, JSF was used in one of my real work projects... I still have nightmares about Primefaces...
@@awesome-coding Was using it several years later, fixing up for a "nice" GUI done by dedicated UI\UX designer. You should get a medal for using that premature stuff.
@@awesome-coding I use JSF with PrimeFaces for my job. 😭😭
It's not all sunshine and rainbows.
Btw, it would be interesting to see something related to SPAs as well
Microsoft used to call this Active Server Pages 20+ years ago.
This stack is overlaps with every single template based web application server in existence including the original perl-based PHP which predates ASP by a long shot. making this obvious comparison doesn't make you sound as smart as you think it does. Also ASP only ran on the windows platform and there's nothing open-source about he IIS application server that it required.
@@TerenceKearns why did you feel the need to whip it out?
@@guser7137must be a devoted PHP fan
That's why they say: "When you need new ideas, read old books"
The Simplest Tech Stack with Go
PHP: "and I took that personaly"
There is an alarming number of PHP enthusiasts in the comments😅
* Coldfusion left chatroom
@@awesome-coding PHP is ❤
@@awesome-coding PHP video next?
ironically GO + HTMX is arguably simpler even then PHP... I don't know if you remember configuring php.ini and your apache httpd.conf... it was "fun"
0:10 pure wisdom
u forgot to say that Go has a nice mascot
True that :))
Lol worst part of the language
gopher? XD
@@popel_ yes that and an http server setup lol
So basically we got back to when i was doing the same with php 5 + jQuery ...
We changed this as soon as react was invented to get faster response with json and more reactive pages. Are we going back again?
My thought as well. Just looks like basic PHP
Yes we are, because 90% of the web if not more it's just simple forms, storing data and presenting it. You don't need shared state accross "components". All that mumbo jumbo it's just more fat your devs have to maintain. Back in the day the problem was that the full refresh was expensive, but with this addition HTML fixed the issue that triggered virtrualDOM manipulation.
yes because you don't have to maintain state in 3 places and do serialisation to JSON and back again for every call
Agreed. The original reason of using react was making web dev easier but it had totally turned into opposite way. People was just trying to show off to catch the latest tech ten plus years ago, even though the jobs or projects they did never needed React. I used to say now already 2024, web dev still spent hours and days on frontend to deal with code based css or JavaScript without any dragging and dropping frontend controls, this is a shame.
Awesome Golang + HTMX video! Would love a deep dive on PocketBase.
Coming soon!
Great stack for todo app
please show the end result, it would make it so much easier to understand
correct
Yeah. That was my only gripe with the video, but I can imagine what it would be like in the browser.
Thanks for your feedback! Will keep it in mind for future videos.
@@awesome-coding I forgot to thank you for making the video. My bad.
I appreciate you making the video. It was the first time I’d watched someone build out anything simple with Go and HTMX.
My other option would be Prime’s video, but it’s so long, I’ve yet to watch it.
@@samuelodan2376 Thank you!
A deep dive into pocket base would be great!
Will do! Thanks for the input!
PHP + HTMX
Great video, would love to see a deepdive on pocketbase, using a similar project example
Coming soon! Thanks for your feedback!
Fireship from eBay.
😂😂😂😂😂😂😂
A while back I would say the same, but fireship is all about AI now, or tech scandals. Good ol' days when he was doing some coding stuff. So now this is the new fireship!
He's doing a great job and the quality is also pretty good tho
hilarious xD
I'll take it.
you can add templ in this stack
Especially since net/http in go 1.22 makes Gin and other frameworks mostly unnecessary.
@@charlesbcraigso what is the recommend framework then, htmx+go+templ?
I would like to watch a video about Pocketbase and SPA
Coming soon!
Yes, please!
What’s SPA ??
@@bestskyever Single Page Application
more HTMX please
awesome innovative way of presenting. Thanks sir
Thank you!
In 9:37 you've managed to build just a Hello World app. It's not the simplest tech stack by any means. In the same time you could have built a functional CRUD app with Rails and Turbo.
I love this video. Can you make more btw?
Like seriously, its kinda maddening how over complex ts shit is.
Game dev and embedding is so simple and straightforward for me. But trying to deal with 9 quadrillion different frameworks and all this mindless bs makes me suicidal
Glad you like it! More to come!
Pocketbase please! I've been poking at it using its static pages with JS and HTMX calling the back end, but very nice to see what someone who knows what they are doing show one around.
I can see how Pocketbase could replace some of the fastapi/flask/quart approaches I've been using.
I really like your videos Mr. Awesome.
Working on it!
Just finished learning React and now i gotta learn htmx lmao
the journey has just begun 🤣
you never finish learning react
trust me bro, as some one working on large application using react, the best decision i have ever made. React along with redux tool kit and RTK has made me handle some of the most complex shit ever. This kind of tutorial is good for learning etc, never works in real word applications if the apps are complex.
Only showing code and no intermediate steps or a working solution really doesn’t demonstrate much
Thanks for the feedback! will keep it in mind.
And we are all the way back again
You, sir, have awesome content! Instant subscription!
Thank you!
the less moving parts and the simplest stack are the reasons why even today there are apps running in legacy code without a single trouble and handling millions of users, and i've seen lot of developers trying to migrate to a new modern alternative creating more issues than what is solving, i know that not all websites are created equally, and some needs heavy interactivity ( which i still wants to know what is a heavy interactive websites ) of course apps like figma, penpot are the exception.
PocketBase mentioned LETSSSGOOO
Can you also please make one about how to add css and interactive components like carousels using this tech stack?
Sure thing! Will add it on my todo list.
Thanks for the feedback!
Would be nice to see a git repository with the final code. I tried to follow along, but got stuck at the end with adding the task.html. I think I missed an update to the index.html that ties it all together?
Same. Did everything the same and in the end it didn't work.
Same. Pretty frustrating result. He never created a "task.html" file, so I'm not sure what that's referencing.
Update, I actually spent a bit of time getting this working, and I have a working repo. RUclips doesn't like outside links, but my username is ctstewart, and the repo name is basic-todo-with-go-htmx.
I fixed several issues that were in this video that were preventing this from running. One major problem that I could not fix is Windows compatibility. Windows dev for the sqllite and Go requires gcc, something I couldn't get installed properly and gave up on. It was far easier to develop within a Dev Container using VSCode and Docker. The setup file is part of the repo.
If either of you have any questions about the changes I made to get it working, I'd be happy to help!
Yeah, seems to just be a plug for his pocketbase solution.
Please create a crash course atleast 1 hour tutorial
Would be great to have timestamps in your videos
You forgot about data validation, emails, async jobs, caching, etc... Like 99% of the rest of the stack.
If only we would render html, life would be so good.
Right?... It really does feel like that amounts to 1% and the 99% is complexity.
poketbase is really interesting. I'd like to see a video on that!
Coming soon!
Pocketbase yes
The simplest tech stack is JS , CSS and HTML.
*the simplest way to make spaghetti
spaghetti is a language-independent phenomenon.
@@yayz_ it depends on the one coding it.
@yayz_ I love pasta!
Came here to say exactly this.
Please make fast api & fast html tutorial
wait no github code provided?
I've got this feeling that we're constantly reinventing the wheel somehow...
it is the same wheel - we are just presenting it as "innovation" every 10 years :D
You probably should do a second video about how to add authentication to this basic web app. As is, your one todo list editable by anyone finding your url isn't near anything usable.
Simplicity is no point if you can't go production ready.
Anyway, nice explanation. I'm still not sold on Go, since any back-end language could easily do the same in about as many lines of code.
Very high interactivity on the site: use a framework as you mostly write js (or wasm) anyway. You probably won't write most changes to the backend anyway.
Minimal interactivity: return html with your backend and sprinkle in some js of your choice. (e. g. HTML, jquery, etc)
You can also use Interaction between components on site as interactivity.
haters will say that latency is an issue and blablabla.
just setup multiregional apps with cloudfare and turso and u are good to go.
Say you couldn’t do that, what is the best framework across languages for latency? Honestly just curious, never really occurred to me
Is there a video for SPA?
In 8:16 the form should also have method="post" attribute
I think most modern "Full-Stack JS" solutions like Next, Nuxt, etc would probably be better classed as SPAs with SSR, because they typically switch to client side routing after the initial server render, and as you said, they send JSON or framework specific responses (like RSCs) instead of HTML.
Most can "prerender" a route, and that would return just HTML, but that's typically the exception rather than the rule, aside from things like Astro
Could you add a link to a full code?
Yes to Pocketbase ❤
Nice vid, what VSCode theme are you using?
video was so good you earned yourself a subscriber !!
Yay! Thank you!
these animations are so cool, how do u make them
Thanks! I’m using Premiere Pro
@@awesome-coding cool
thanks
We want Pocketbase tutorial
Will do!
03:07 3-TH 🙌
😅
Yes! In for a PocketBase video. It's such a cool tool.
Coming soon!
still waiting for enterprise HTMX web that isn't todo app
Please PocketBase 😊
Astro with htmx is something special btw 🎉
i convinced my company to migrate over. we decided with poem (rust) instead of go. it's a lot more productive than next.js.
Go + templ + htmx + tailwindcss is so fireeee
It's a fire until you realise that you need to implement accessible UI. I also wish you good luck in finding professional developers with reasonable salary expectations who will use this technology stack. But overall this is a great stack for hobby projects.
@@alexandershishkovskiy I do frontend at work and enjoy writing in this stack on my free time.
Can you tell me more about the a11y or give some starting point to go and learn about. I'm interested
I’d remove templ and tailwindcss. You are better off using Pure CSS and HTML Templates IMO
@@alexandershishkovskiy ehh youre over emphasizing the time bottleneck that UI components are.
gopress has plenty of components already or once could use alpine and set then some components in an afternoon.
Really though, UI components arent much of a write time bottleneck, effective db queries and backend business logic are, both of which this stack excels at speeding up :)
Could you do a video on how to do lazy loading with this stack?
amazing video!
Just add turso and now you are production ready :)
turso for what ? does the database/sql std lib is too complex for you ?
adding subscription based products to your stack isn't going to make it production ready
@devloper344 I think the idea is that SQLite is not scalable on its own, and Turso solves that through their distributed edge solution.
I've been using this quite a bit lately.
SPA please
Will do!
Itching to try these now . Ig who needs sleep anyway
Hey bro, can you make a proper tutorial or course where you connect Pocketbase to Go and use HTMX with HTML or TEMPL? Sure if you have time, thank you and best of luck in the future!
Will do! Thanks for your input!
Rust ecosystem is getting stronger as well
"Frequent Releases" signals the _opposite_ of stack longevity. Do you see PHP getting frequent releases? Sky scrapers still under construction are not fit for occupancy.
Great video ❤
Thank you!!
"... use a web framework that will be around in10 years ..." :) I like this kind of humor.
:)) Vue and React are 10 years old, Angular is 8 years old. So it's not really that uncommon :D
@@awesome-coding And how different is the current version from 1.0? #ItsStillTheSame #KindOf #SomeHow 😄
Fiber is simple and faster. HTMX may need some JS code which can be added with petite-vue
Make an ASP NET Core video:
-MVC
-Web API
-Blazor
I'm actually diving into the .NET code world these days, so this video might happen soon.
we are re-implementing the wheel for no reason here, the frameworks that you mentioned as extremely complex ( which they are not ) are battle tested in almost all aspects possible and usually they have some guidlines which must be followed when using, which further more increase the final code produced,
its insane there is no sqlite driver in the standard library. having to import from github feels so dirty.
if go had drivers for postgres and sqlite it would be the goat.
I thought the json struct tags were to rename the key so it doesn't export the capitalized value
What was that version of Vue that you put in the same category as HTMX ??
Petite Vue - github.com/vuejs/petite-vue
@@awesome-coding Thanks!!
The only issue with go templates is that you don't have any types
If that's a real issue, you can use Templ instead.
POCKETBASE ❤
Yes, Please SPA !!!
Will do! Thank you!
I think scalability is over rated, most apps will neber reach that complexity
This is actually a valid point
I think a combination of cloudflare worker with its edge based D1 database & R2 storage makes better tech stack when combined with cloudflare pages. 🤔
This is just my personal choice 😊
Yes
D1 is not edge yet
@@duayenemre I have personally tested the api performance (with D1 operations) on edge servers. It does exist on edge
Back in the day, we called MPAs "web applications".
🤣
awesome
Nice content
Thank you!
Define Simplest
I would love to see video about Django! It's such an underrated framework ❤
The one thing stopping me from using this kind of stack at work is that all my projects require searchable multiselects which are a pain to model in it
I don't use go or HTMX, but I imagine it would be local data that Javascript or WebASM uses to adjust the contents of the HTMX dropdown, storing the data in a Trie, using Levenshtein edit distance for auto complete.
@@RPG_Guy-fx8ns I think writing them as Svelte WebComponents probably makes sense.
Please do a proper PB tutorial. It has been so difficult to find a good one that doesn't just stop at showing auth.
Will do! Thanks for the input!
Great video!!! I have a question if you don't mind answering, which font do you use in code snippets? like on 4:48
Hey! MonoLisa :)
Hi, great video, however i dont agree. ( simplest diff of the best)
The simplest tech stack would be:
server: Apache http
lang: PHP 8+
framework: symfony ( because is only frameworks which take advantage of latest php features)
template engine: Latte, because is the must secure template in PHP and dont like twig
DB: SQLite ( for simple things, maybe postgres)
Cache: redis
Frontend lib: HTMX (+ maybe with alpineJS)
Of course with docker.
This is even more easy to learn and deploy. ;)
Again this is the simplest ( with PHP) however is it the best ???? it is another story !!!!!!!
Good point!
PHP, NodeJS, and similar technologies were invented precisely to avoid having to create websites in C and other system languages like we did in the 1990s (CGI scripts). Yet after 2020, the trend is to start coding websites in system languages again. 😅
This is actually a very long discussion :))
please bring more go videos
That's the plan!
Is React not capable to creating an MPA?
Not on its own - You need to pair it with something like Next JS or Astro to have server side rendering.
What's your opinion about Blazor NET8
Hey! I don't have enough experience with it yet so I can't really have an informed opinion :(
What about Using Rust with HTMX, i mean if you know little bit of Rust already?
It's probably the same mix. I just find Go way easier to learn and work with compare to Rust. (I also have very little experience in Rust, so I might be subjective)
Yes. This.
good tuto until the end, but... where is the example of the app running? show the code working, where is the gist for the code? good animations and voice, but I think the video needs some polish, thanks anyway, it was useful
Thank you for your feedback!
Maybe video on fasthtml ?
Will look into it!
why dont u make a video on ruby on rails, it would be even more simple
I don't have that much experience with RoR :(
Great Go advertisement! Now I want to use it in my next project. Although, I also think I should just stick to what I’m most familiar. 😫
What's your preferred language?