Bonus: Considering your legacy (code)
Okay. So imagine this scenario. You're a programmer, which if you found this podcast, that's probably true. And you have been given a project that is a legacy code base. And that could be any any legacy code base.
Lazarus:It could be your own you know, whether it's rails or I'm just going to use Laravel for almost everything because that's what I do in my professional life. And you have to go into that project and add a really nice fancy new feature. And there's a lot of issues that are, you know, immediately it's like, okay, what am I going to do? If I want to do all the new stuff, all the good stuff that's out there, Livewire, React, Vue, you know, front end kind of fanciness, alpine. It's going to be the first step is just gonna be taking that old code base and making sure that it can even handle any of the new stuff Because there's lots of cool new tools and they're all out there and but you have to keep, you know, it's all great if you do a new install and you're starting fresh and you're doing a new project and all that kind of stuff.
Lazarus:But how do you do it if you cannot get everything up to date or you don't want the first step of your project to be, you know, updating a massive code base with all these different packages and all these different installs and different npm things, and you just need to to upgrade everything first before you can even get started on building the new feature. So if you want to kind of leverage some of the newer stuff that's always a problem and most people you're just gonna end up trying to rebuild it from scratch or you're gonna abandon it or you're gonna do a huge project to update everything first. So those are kind of your options right now. And there is, I think, one of the most appealing things for me and the reason that I'm sort of starting this podcast is that I'm I'm realizing that there is another option and that is h t m x. And basically what you can do is just do an include.
Lazarus:So because there's no build process, because there's no, you know, even composer in PHP, that's a build process. And that's fine. It's great. Composer is way better than some of the other build process type stuff. You'll see package manager does a great job, and that's fine.
Lazarus:And you just, you know, it's good to keep your apps up to date, but you just can't always do it. Whether it's if you don't, you know, if it's your own app, that's the sort of thing that just stops you from doing work. So what you can do is you can just do the include, go to htmx.org, copy that tiny little line, include that at the top of your, you know, root layout file for your app, and you've got access to everything in HTML. And that basically means that you you can build the sort of stuff that you just would not be able to do without, you know, in other ways. Because it's kinda just plugging in to the basic HTML and extending HTML, and adding some ajax, and all this functionality of, you know, what to do on different events, and how to handle the data, and all this kind of stuff.
Lazarus:It's it's kind of like tapping into that without having to change anything else about your project, and you can just get started immediately. Go into your app.blade.php if you're in Laravel. If you're in something else, you know your layouts better than I do. Whatever your root layout folder is, whatever your root layout file is, just include that. It's almost like I want to give it as like a homework assignment, like include that and add some cool new fancy feature to your ancient app just immediately and push the code up.
Lazarus:And that sort of simplicity where it's not interfering with anything else, it's not requiring, it's not built like a house of cards on these tiny dependencies with thousands and thousands of files that all depend on some random person in some random place updating some JavaScript thing. All that, it's kind of just gone and instead you just get to include something and then work with it and it's just so it's just a such a better experience. So this podcast is kinda gonna explore HTMLX and some of the different options you have, different ways to do AJAX requests and custom events and all this kind of stuff. And basically bigger picture, why? Like what's the purpose of it all?
Lazarus:As like a long time developer, this kind of clicked for me immediately, and it's so easy to learn for anybody who's been developing for a long time. There's just basically no, you know, there's no mental overhead in how this is gonna work. It's more about, you know, just trying it out and seeing if it clicks for you. And it probably won't, you know, it's not gonna click for everybody, but for people out there who are craving simplicity, when they sit down to do their work and they want to be able to just get to work and do their stuff, without doing a bunch of kind of setup and, you know, I'm not going to get into all that right now, but if you are craving simplicity in web development, if you feel like JavaScript has kind of gone off the rails so to speak, then, you know, I think h t m x is is a good option and I'm just gonna be talking about it here. So I hope you will join me.