YouTubevideo· Sep 20, 2024· 14:23

Is Hypermedia the Future?

Watch on YouTube ↗

transcript

33 moments
  1. I don't hate JavaScript I know a lot of people think that just because I make a lot of fun of JavaScript or my phrase is from JavaScript to LEL JS larl that kind of thing it doesn't mean I don't think JavaScript is useful or even essential in the modern web I just think that the ecosystem of JavaScript has been in this phase for far too long that that is the answer to everything instead of using

  2. JavaScript where it needs to be the answer so before I go off on that rant we're going to read hyper media on whatever you'd like by Carson gross the creator of HTM X written on May 23rd 2023 and I think there's going to be a lot that I like and maybe things I don't necessarily agree on in this article but it'd be interesting to read it all the

  3. way through and then share my thoughts as well but Carson gross is the creator of HTM X you can find Carson on Big Sky software at GitHub or the website big sky. software is Carson grosses CV hyper media on whatever you'd like the one big remaining advantage of mpas is serers side programming language choice if

  4. you're already part of the anti- JavaScript resistance then nothing I say in the rest of this talk is going to matter that much but I'm going to get into this later that ship might have sailed that was a quote from Rich Harris have Spas ruin the web a concept we'd like to talk about is the howl stack howl stands for hyper media on whatever you'd like this is a joke but not really software stack and reference to more well-known Stacks like the lamp stack or the mean stack the tldd of the howl

  5. stack is this when you use a hyper mediad driven approach for your web application you free yourself up to choose whatever server side technology best fits your problem and your own technical tastes feeling the JavaScript pressure if you decide to use an SBA framework for your web application you will naturally have a large front-end codebase that is written in JavaScript given that the following question inevitably will come up well why aren't we doing the back end in JavaScript too

  6. this is a reasonable question to ask and there are a lot of advantages to adopting the same programming language on both sides of the wire you can share application logic between the two code bases a good example here is validation logic you can share data structures between the two code bases you can build up exse in a single language JavaScript making it easier for developers to work in various parts of your application you can reuse the build system and dependency management knowledge you've

  7. required for the front end this pressure to adopt JavaScript will only grow as your investment in the JavaScript front-end ecosystem grows furthermore JavaScript has improved dramatically in The Last 5 Years and there are now multiple excellent server side run times for executing it many of the older arguments about the messiness of the language can be we waved off as preventable via linting developer discipline and so forth JavaScript is the dominant language among the web

  8. development thought leaders and there are massive numbers of tutorials code camps Etc that strongly emphasize the language nothing succeeds like success and JavaScript as well as react have succeeded let's call the result of this the JavaScript pressure and acknowledge that nearly every developer working with the web feels it at least to some extent hyper media our only hope what hope do non-javascript developers have in web development well there is

  9. one older technology sitting there in the browser alongside JavaScript hyper media browsers offer excellent HTML support and the related document object model or Dom in fact even if you are using an Spa framework you will be working with that hyper media infrastructure in some form via jsx templates for example if only to create uis that a browser can understand so you're going to be using HTML or or the related Dom apis in some manner in your

  10. web application well what if we made HTML a more powerful hyper media that's the idea of HTM X which makes it possible to implement common modern web application patterns using the hyper media approach this closes the ux gap between traditional npas and Spas making taking the hyper media route feasible for a much larger set of web applications once you adopt this hyper media approach and remember you're going to be using hyper media infrastructure

  11. anyway so why not Leverage as much as possible a surprising side effect occurs suddenly the advantage of serers side language choice that Harris attributed to mpas is back on the table if your application's front end is mainly written in terms of HTML maybe with a bit of client side scripting and with no large JavaScript code base you suddenly dramatically diminished or entirely eliminated the JavaScript pressure on the back end you can now make your server side language and framework

  12. Choice based on other considerations technical aesthetic or otherwise perhaps you are working in Ai and want to use a lisp variant for your project perhaps you're working in big data and want to use Python perhaps you know D jeno really well and love the batteries included approach it takes perhaps you prefer flask and the strip down approach it takes perhaps you like the raw close to the HTML feel of PHP perhaps you have an existing Java code base that needs some sprucing up perhaps

  13. you are learning cobal want to use HDMX to make make a nice front end for it perhaps you just really like rust oaml cotlin hcal net closure Ada cold fusion Ruby whatever these are all perfectly reasonable technical philosophical and aesthetic perspectives and by adopting hyper media as your primary front-end technology you pursue any of these goals without a bamal code base hyper media doesn't care what you use to produce it you can use

  14. hyper media on whatever you'd like an open web for everyone and when we say whatever we really mean it here is a screenshot of the HTM X discord's howl subsection recently know that these are just the channels that happen to have active traffic there are many more you can see we have ongoing conversations in a bunch of different programming languages and Frameworks Java go.net rust closure PHP Ruby python o camel we even have some folks talking about using

  15. HDMX with bash and Cobalt this is exactly the future that we want to see a rich and vibrant web in which every backend language and framework can play as an equal and interesting alternative each Lang and framework has their own unique strengths and cultures and each can contribute to the magical hyper media system that is the web but is it an anti- JavaScript resistance before we finish this essay we do want to address the idea that the resistance of JavaScript everywhere is

  16. necessarily anti- JavaScript now admittedly we have laughed at our fair share of jokes about JavaScript and we have gone so far as to create an alternative scripting language for the web hyperscript so it might seem like we should be card carrying anti- JavaScript but to the contrary we are deeply appreciative of JavaScript after all both HTM X and hyperscript are built in JavaScript we couldn't have created these libraries without JavaScript which

  17. whatever else one might say has the great virtue of being there and we even go so far as to recommend using JavaScript for front-end scripting needs in a hyper mediad driven application so long as you script in a hyper media friendly way further we wouldn't steer someone away from using JavaScript or typescripts on the server side for hyper media driven application if that language is the best option for your team as we said earlier JavaScript now has multiple excellent serers side run

  18. times and many excellent serers side libraries available it might be the best option for you and your team and there's no reason not to use it in that case hyper media on whatever you'd like means just that whatever you'd like but JavaScript is not and it should not be the only server side option for your team turning the ship around with the Resurgence of interest in and improvements of hyper media an open and diverse future for the web is now a real

  19. possibility if not an emerging reality the web was designed to be an open polyglot and participative Hyper media system and the ship hasn't sailed on that dream at least not yet we can keep that dream Alive by relearning and re-embracing the foundational technology of the web hyper media quote from teach I hate that the HDMX Community has devolved into Builders helping each other without regard for likes engaging those who don't follow the hype expanding sound bites into Nuance it may

  20. not score cheap social media points but it's healthy the web used to be worse than this I talked in my Alpine Ajax video or both of the videos that I made about Alpine Ajax and I talked about how I don't really know HTM X that well I know enough about HTM X to know what it does I know that Alpine Ajax was inspired by HTM X and is just a little bit more formatted for Alpine itself and

  21. I know that Livewire was heavily inspired by HTM X and similar to things like Hotwire and all these things that have tight Integrations with their particular backend of choice so something like Livewire is in backend agnostic in the same way the HDMX is or even Alpine Ajax is and there's a reason why a lot of people ask me why did you go from JavaScript knowing JavaScript

  22. and not using inertia with larl there's a couple of different reasons why and I talk about them in my tech Stack video that I'll link in the description or show notes as well as like a little card up here if you're watching the video but the premise of it is how it resonated with me as a developer in the sense of DX how was I writing particular code how I would write particular code within the

  23. JavaScript ecosystem mostly using things like nextjs or spelt and spelt kit I was using something like Firebase or super base or stuff like that where I would interact with a server in my client code or maybe sometimes I was writing uh serers side functions within an API route and a lot of times I was doing a lot of collocation I was writing my code and then writing the logic for my code

  24. just a couple lines up that's why I liked spelt because I could write JavaScript in my script setup script tag up above and then in my template I could just write HTML and what appealed to me most about Livewire it was the same thing especially when Livewire volt came out it was just more tightly knit with the back end where I could call server side code from my server logic and then in my

  25. template I can just write HTML and there's a reason why I think HTM X is so talked about and popular right now is because it forces you to think about where are you using JavaScript again I am not anti- JavaScript I don't hate JavaScript Livewire uses a ton of JavaScript and just obvious skates it away from me and forces me to choose when I'm using Alpine for example versus when I'm using Livewire when am I and I

  26. have a lot of videos about this but when am I opening a dialogue should that dialogue be open on the server and I get information from the dialogue from the server or does it already exist on the client and then I'm just opening it up now I have to consciously think about these choices and I think that's where this uh resistance not even resistance I think that's where this uh effort comes from within the HTM X world the HDMX

  27. ecosystem is there are things that the web has given us for free within HTML within hyper media within JavaScript but are we using them in the way that they are meant to be used are we trying to kind of push them into a hole that maybe they shouldn't be pushed into I'm a huge fan of using the tools that you need for the projects that you need just as much as I'm a huge fan of learning new things for the sake of learning and also learning how to do things in a tool that

  28. you use that might not even be the best tool for the particular problem at hand but then you know why it's not the best tool instead of just automatically saying well I can't use HDMX because I have to do this and this whole Spa thing that I'm going to need well maybe if you're wanting to learn HDMX maybe start building that say okay well why does everyone say this isn't good in an Spa format I have done the same thing with Livewire and I've become a better

  29. Livewire developer now I'm not going to say Livewire is the perfect solution for every single scenario I think it can be used that way but there's a reason why other tools exist there's a reason why inertia exists there's a reason why react nextjs there's a reason why all these things exist and you have to learn how to do that instead of taking someone else's word for why it exists or why it doesn't work in a particular scenario so again if you're wanting to learn HDMX or

  30. maybe insert your own meta framework here within JavaScript or laravel first instead of saying H I can't learn that because my new project it doesn't work with that um I really need this fully featured you know fast client side framework I need this insert particular feature from nextjs or versell or something like that well first in whatever thing you want to learn again

  31. it all goes back to that learn why people say that why do people say HDMX can't be an SBA I don't think that's fully the case I think there's ways you can make it but learn okay well it's because you have to talk to the server every single time you need to do something so you really need something like Alpine or something like view petite for example on the front end doing a lot of those interactions but you can still make it

  32. very Spa like whether you're using HDMX Live Wire hot wire turbo links what have you learn the reason why you're not doing something or learn the reason why you're not using something before you learn the reason why you should do it and all of that comes with just building things just learning about things or just using things in a way that maybe it should be used and maybe it shouldn't because that's when you'll truly know okay am I using this the way I should or

  33. am I just getting better at the tools that I have at my disposal

just you here