Live data from Hacker News

Htmx is part of the GitHub Accelerator

htmx.org

361–370 of 520 posts

Re: Htmx is part of the GitHub Accelerator

#361

hi there, as many of you know, i am the creator of htmx and I'm happy to answer any questions about it htmx has seen a surge in popularity, triggered by a video by fireship dev ( https://www.youtube.com/watch?v=r-GSGH2RxJs ) and a series of videos by ThePrimeagen, a popular twitch streamer on it hacker news readers might be interested in the essays I have written on htmx & hypermedia in general here: https://htmx.org…

As someone relatively new (few months in) to full-stack development, what can HTMX offer me? I've been semi interested since Prime mentioned it a handful of times, but I feel maybe I'm too new to fully understand what I gain from it. As soon as I'm finish with my current project, I'd like to check it out.

For reference, I'm currently working within the T3 Stack.

Re: Htmx is part of the GitHub Accelerator

#362
post #54

I've been a HTMX fan "since before was cool".. Very happy for the recent attention and "success". Also enjoying the shitposting and backlash mostly from the front-end crowd who believe the Web was invented in 2013 and they "made that city". :) I'm biased since the time Backbone.js came around, I understood part of the pain but was moderately skeptical, fast forward to React with the young energetic bros building dead…

Many of the ideas and concepts in htmx are things we worked on starting around 2012 at a top tier investment bank. Implementation details differ quite significantly, but the idea of hypermedia driven applications was core to everything we did. We unfortunately weren't able to win hearts and minds around these concepts in the long run, and blog driven development (a.k.a. cargo culting) replaced our efforts. I feel som…

Nah, look at it this way:

A good idea or a good product are never enough. You have to sell the product in order to have it be successful.

In your situation, you were at a bank, so your TAM was roughly 1 enterprise (or maybe a dozen, tops, if divisions had federated or siloed tech). And your 1-to-a-handful of potential customers were probably of the large and difficult to change variety. That's a huge constraint, and not landing it there doesn't mean your idea was bad, it just means you weren't successful in selling it and I'm going to tell you that you probably _couldn't_ have been successful in selling it where you were, when you were there. I worked for your lazy cousins at the same time - big insurance - and had the same issues selling my own ideas internally, if that makes you feel any better.

HTMX has no such constraints. It's a decade later and the TAM is more or less everyone doing or preferring to do SSR. The same/similar good idea, but different place and time.

Re: Htmx is part of the GitHub Accelerator

#363

It's so odd to live long enough and see the steady pipeline of "look at this much simpler way of doing web apps, just write HTML, not like the previous complex way" projects, which then turn into the previous complex way as the eyes turn towards the next "simple way of doing web apps, just write HTML...". Angular and React started this way on the frontend, while ASP and PHP started this way on the backend (of course…

ASP had some strange things where you could write what looked like a client side handler on a button and it would call a function in the server. Circa 2007 or so it seemed a to be a huge mistake because it didn’t play well with the so-called “model-view-controller” paradigm where, most importantly, the request handler could decide which view to render. (e.g. you fill out a form and if you mad a mistake it redraws the…

ASP.Net is different than Classic ASP... ASP.Net had a "WebForms" model, where the default behavior was a postback with a rerender on a lot of handler actions. That also included a ViewState input attached to your page/forms that was used for (re)hydration to handle change and other event detection. The use of viewstate with a lot of the component libraries at the time was pretty aweful. Not to mention feature/browser detection was just plain wrong as Firefox started to gain traction, before Chrome.

I can say I migrated away and mostly separated render/js/backend with ASHX handlers until MVC took hold. These days, I tend to prefer the modern SPA models for browser applications. Though will also use static generators, server generation or other techniques if you don't need an interactive application.

HTMX seems pretty interresting as a kind of in-between, closer to the ASP.Net Webforms without the complete excessive overhead in the box.

Re: Htmx is part of the GitHub Accelerator

#364

hi there, as many of you know, i am the creator of htmx and I'm happy to answer any questions about it htmx has seen a surge in popularity, triggered by a video by fireship dev ( https://www.youtube.com/watch?v=r-GSGH2RxJs ) and a series of videos by ThePrimeagen, a popular twitch streamer on it hacker news readers might be interested in the essays I have written on htmx & hypermedia in general here: https://htmx.org…

Hello,

Maybe stupid question, but what are the downstream implications for folks like Vercel/Netlify/etc. who bet the farm on complex server rendered JS pipelines?

Re: Htmx is part of the GitHub Accelerator

#365

hi there, as many of you know, i am the creator of htmx and I'm happy to answer any questions about it htmx has seen a surge in popularity, triggered by a video by fireship dev ( https://www.youtube.com/watch?v=r-GSGH2RxJs ) and a series of videos by ThePrimeagen, a popular twitch streamer on it hacker news readers might be interested in the essays I have written on htmx & hypermedia in general here: https://htmx.org…

https://twitter.com/foxy4096/status/1691432812870828032?s=20 This is a boon to many django developers. I remember few month ago I was making a post liking system, before htmx, I had to use jQuery to fetch the json api server and update the like count, but with the use of HTMX, oh boy it was like I was just writing plain html along with my django logic. This is one of the greatest thing I've found. Also, handling form…

I've also found htmx a great way to retain server side rendering with minimising the recalculation cost of client changes.

By avoiding needing to add lots of client side logic to still get very low latency updates, it's given me the best of both worlds.

The way Django's template system works also makes it so easy to render a full page initially, then expose views for subcomponents of that page with complete consistency.

On a tangent, Django's async support is still half-baked, meaning it's not great for natively supporting long polling. Using htmx to effectively retrieve pushed content from the server is impeded a little by this, but I slotted in a tiny go app between nginx and gunicorn and avoided needing async he'll without running out of threads.

Re: Htmx is part of the GitHub Accelerator

#366
post #99

Earlier quoted context omitted.

I wrote ASP then, and it worked fine. We also wrote our own htmx like handlers. The main reason that people forget is that js was just too slow on the client to really do anything. The only way to get performance was render pieces on the server and replace the client html. I remember having the server render js multi-dimensional arrays consisting of key and html snippet that client js could reference to do html manip…

I'm not sure JS being slow was the reason. It's rather lack of trust that JS can and should be used for such things, and the difficulty of mixing client and server logic together. You kinda want to simplify things and relegate JS simply the role of detecting an event and delegating it to the server for processing and injecting the result back. But JS, from the moment it was introduced, was quite capable of carrying o…

Most C#, .Net devs and even VBScript devs had very little desire to learn JS. Not to mention that prior to IE6 becoming dominant there was a lot of very painful variance between browsers. JQuery helped to normalize this a lot. Part of why the ASP.Net (and others) were modeled with a full server postback. It worked fine when the server was in a server room in the corner of the building you were in, over the internet on dialup, not so much.

Re: Htmx is part of the GitHub Accelerator

#367
post #350

Earlier quoted context omitted.

htmx uses hypermedia, rather than client-side managed state as much as possible, htmx tries to take HTML to its logical conclusion (from my perspective) as a hypermedia, rather than imposing other ideas on top of it

Does this ideology lead to significant technical differences from early versions of Angular 1 and early versions of Vue?

Ok, I see, the idea is to render parts of the page on server and swap those parts on the client with things like: https://htmx.org/attributes/hx-swap/

So it's not really an "Angular-1-like", but more like Vaadin in JS.

Re: Htmx is part of the GitHub Accelerator

#368
post #59

[flagged]

nobody has the right to be forgotten nothing you say can be unsaid; therefore speak judiciously https://uuliveoak.org/Story%20ideas%20-%20service%20or%20cla... > “Now Yankel,” the Rabbi began “go back through the town and collect all of the feathers. Put them back into the pillow and bring the fully stuffed pillow back to me.” > “But Rabbi!!!” Yankel burst out. “That will be impossible. Even as I was walking away fro…

various people are posting irrelevant things about laws, missing the obvious ethical point

if anyone has the right to be forgotten, then nobody has the right to remember, and prohibiting people from remembering would be an appalling degree of totalitarianism (though not an unprecedented one: https://en.wikipedia.org/wiki/Censorship_of_images_in_the_So...)

that doesn't, of course, imply that it's praiseworthy to repeat everything true that you remember; that is lashon hara

with respect to which, there's an interesting halakhic discussion about whether portraying yourself in an accurate but very unfavorable light, as kitanata and 0ct4via have done in their comments, is also forbidden

https://judaism.stackexchange.com/questions/30372/lashon-har...

ובספר עלי תמר על הירושלמי שם הביא סיפור על בעל החפץ חיים ז"ל שנסע ברכבת ופגש יהודי שלא הכיר שהוא החפץ חיים וסיפר לו שהוא נוסע לבקר אצל החפץ חיים בראדין והפליג בשבחו והחפץ חיים אמר לו למה אתה הולך אליו כי אינו גדול כמו שאתה חושב אלא הוא יהודי פשוט ואותו יהודי התרגז על דבריו וחרפו וגדפו והגיע לידי הכאה ואחר כך כאשר בא לבקר את החפץ חיים בביתו השתומם לגלות שהוא האיש שאיתו רב ברכבת ובקש מחילה ואמר לו החפץ חיים שאדרבה הוא אסיר תודה לו היות וכתב ספר שלם על הלכות לשון הרע ולא עמד על ההלכה שאסור לדבר לשון הרע גם על עצמו עד שהעמידו הוא על הדבר עכ"ל הסיפור וכתב עליו בעלי תמר שיש סמוכין לזה מהירושלמי הנ"ל. ואולם אין פוסקים הלכה מתוך סיפורים וכבר כתבתי שאין ראיה מהירושלמי ומה שלא עמד על הלכה זו בספר חפץ חיים אותו נקבל כי אכן לא נמצא שם אבל מה שמשמע שחזר בו ודן דין חדש לאיסור לא נאמין לזה בלי ראיות מש"ס ופוסקים ובעיקר הסיפור בשלמא אם היה אומר לנוסע אני החפץ חיים ואיני כמו שאתה חושב אלא אני יהודי פשוט שפיר דמי ולא היתה יוצאת מזה שום תקלה אלא הנוסע היה מוסיף לו אהבה בעד ענוותנותו היתירה אבל במה שהסתיר זהותו וכאילו דיבר סרה על אחר יש בו מראית עין של לשון הרע ועוד שהכשיל את הנוסע באיסור דאורייתא של גידוף והכאה אלא בודאי אין הסיפור אמת

In the book Alei Tamar on the Yerushalmi there he brings a story about the Chofetz Chaim, that he was traveling on a train and a Jew who did not recognize that he was the Chofetz Chaim met him and told him that he was traveling to visit the Chofetz Chaim in Radin and he was effusive in his praise. And the Chofetz Chaim said to him, "why are you going to him? He is not as great as you think; he is just a simple Jew." And that Jew got angry over these words and he disgraced him and cursed him and ended up hitting him. Afterwards, when he came to visit the Chofetz Chaim in his house, he was astonished to discover that this was the man he had been with on the train, and he requested forgiveness. And the Chofetz Chaim said that on the contrary he is thankful to him, for he had written an entire book about the laws of lashon hara but had missed the law that one must not speak lashon hara about oneself, until this fellow set him straight on this. This is the end of the story, and the Alei Tamar writes on it that there is support for it from the Yerushalmi mentioned earlier. However, we do not decide halacha from stories, and I have already written that there is no proof from the Yerushalmi. And that which [was mentioned in the story] that the Chofetz Chaim missed this law in the book Chofetz Chaim, we can accept because indeed it is not to be found there. But that which it implies that he retracted and judged the law anew for prohibitiveness we will not believe without proofs from the Gemara and Poskim. And with regard to the actual story it would have been fine had he said to the traveler, "I am the Chofetz Chaim and I am not like what you think; I am just a simple Jew" and no problem would have resulted. In fact the traveler would have increased his love on account of his extra humility. But that which he hid his identity and appeared to speak badly about someone else would be maris ayin of lashon hara, plus he caused the traveler to violate the biblical prohibition of cursing and hitting. Instead, the story is certainly untrue.

Re: Htmx is part of the GitHub Accelerator

#369

I think we need an impressive "made with htmx" example that will trail blaze an new class of web experiences. People have typecast htmx as something to use for simple use cases that dont "warrant" getting out the serious guns. There is something to that, but it is limiting. Htmx and related 'back-to-the-server' approaches are a distinct category that could have been explored much earlier but for various reasons isnt

The problem with that is you need (one of many) server-side options to respond to the events... you could do a TodoMVC HTMX front end, but what would you use for the backend to work with it? Go, C#, Rust and a handful of others seem like pretty natural options, but as with all things, YMMV.

I mention C# in that ASP.Net MVC + Razor seems like a very clean match to the HTMX paradigm.

Re: Htmx is part of the GitHub Accelerator

#370
post #343

Earlier quoted context omitted.

>The fact your HTML barely reads like HTML after Tailwind, and reads more like your file is corrupted is I guess not mentioned in the tagline. Not my experience for the record. I use Tailwind in my side project, and it is exactly as convenient as it sounds to write my styles directly into HTML rather than think of a class name, add it in HTML, switch to the proper CSS file (or create it if it doesn't exist and make s…

Is this how Tailwind is supposed to work? I've never used it, but this sounds awful. How do you keep styles consistent across different areas of a website? Do you manually write matching styles into HTML every time you need them?

I used it to build my saas template for my side projects. It's not awful at all - quite the opposite. But I'm an old guy using python+flask+tailwind+htmx. I try to inherit as much from my base template as I can, and then for different sections that are a bit more bespoke, an intermediate layer there to inherit from. It's not perfect, but the things that I tend to want to tweak or play with are as much in a single place as I can make them. I hadn't designed it this way from the beginning or it'd probably be cleaner.
Post reply on HN