News for hackers. Stuff that matters.
Re:Ask HN: What novel tools are you using to write web sites... by recursivedoubts on Sunday April 04, 2021 @09:33PM (#26694468)
I am working on two alternative tools for building web apps:

https://htmx.org - uses HTML attributes and HTML-over-the-wire for AJAX/Web Socket/SSE interactions

https://hyperscript.org - an experimental front end programming language derived from HyperTalk that is event-oriented and that removes the distinction between synchronous and asynchronous code.

Both tools are HTML-oriented and are designed to be embedded directly in your HTML, rather than along side it. I am trying to popularize the term "Locality of Behaviour" for this idea:

https://htmx.org/essays/locality-of-behaviour/

There are a few tools that are moving people this direction these days, notably AlpineJS and Tailwinds.

Re:Ask HN: What novel tools are you using to write web sites... by systemvoltage on Sunday April 04, 2021 @11:01PM (#26694880)
I've played with HTMX (and previously intercooler.js). Just wanted to say - everything you touch is awesome. Thanks for your efforts.

I also like Alpine.js and Stimulus.js projects. They're trying to simplify the insanity of front-end development.

Go + HTMX is super powers. It peels away the piles and piles of framework layers and still gets you 90% there. For the 10%, just use React/Angular/Vue.

Re:Ask HN: What novel tools are you using to write web sites... by recursivedoubts on Monday April 05, 2021 @09:30AM (#26698658)
thank you very much, that's awesome to hear
Re:Ask HN: What novel tools are you using to write web sites... by mrwetsnow on Sunday April 04, 2021 @09:50PM (#26694546)
"Locality of Behavior" is how everything started, when we used to embed PHP code into html. :)
Re:Ask HN: What novel tools are you using to write web sites... by recursivedoubts on Sunday April 04, 2021 @10:01PM (#26694598)
yep

the idea wasn't wrong, but the level of expressivity wasn't there yet

trying to fix that

Re:Ask HN: What novel tools are you using to write web sites... by crabmusket on Monday April 05, 2021 @03:51AM (#26696350)
I'm really looking forward to Hyperscript growing more capabilities. I love that it's very natural-language-oriented. I'm really interested in frameworks like this that could make HTML website creation more accessible for regular people. Watching a friend try to build a website with SquareSpace I was thinking... for the amount of effort she put into learning SS's tools and quirks, she could almost have just learned HTML.
Re:Ask HN: What novel tools are you using to write web sites... by recursivedoubts on Monday April 05, 2021 @09:30AM (#26698671)
yep, the tool chain startup costs in front end development are very high unfortunately
Re:Ask HN: What novel tools are you using to write web sites... by crabmusket on Wednesday April 07, 2021 @04:27AM (#26721865)
I honestly think for the sorts of websites you make in SquareSpace, they shouldn't be. There's no reason that to develop a static website (even with some dynamic elements like a shopping cart) that you should need e.g. a build process to target modern browsers (i.e. consumers in Western economies).

But this is probably me being idealistic. It's why I like things like hyperscript... it feels like we might be _just_ on the cusp of what I'm saying being true.

Re:Ask HN: What novel tools are you using to write web sites... by simplify on Sunday April 04, 2021 @11:46PM (#26695113)
I'm not sure what came first, but it's unfortunate that hyperscript.org clashes with hyperscript, the pure JavaScript notation to describe HTML.
Re:Ask HN: What novel tools are you using to write web sites... by alanpearce on Monday April 05, 2021 @10:27AM (#26699424)
hyperscript (`h()`) had its first commit 9 years ago and the syntax is common in other rendering libraries (e.g. mithril, ivi).

_hyperscript (this one) seems to have released 0.0.1 only last year.

Definitely very confusing on the naming front. It is at least possible to disambiguate searches with the underscore.

Re:Ask HN: What novel tools are you using to write web sites... by replwoacause on Monday April 05, 2021 @01:04PM (#26701610)
This is incredible. I’ve been looking for something like this for a long time. Love the site and documentation, please keep up the fantastic work. I am excited to play with this over the weekend and see what I can make!
Re:Ask HN: What novel tools are you using to write web sites... by sbaildon on Monday April 05, 2021 @07:02AM (#26697491)
htmx looks super intriguing.

Anyone have recommendations for server-side languages that make HTML templating fun? I’m leaning towards Elixir+Phoenix using sigils[1]

[1] https://hexdocs.pm/phoenix_html/Phoenix.HTML.html#sigil_E/2

Re:Ask HN: What novel tools are you using to write web sites... by easton on Sunday April 04, 2021 @11:31PM (#26695043)
HyperScript is so cool. I’m seriously going to look at this after I was stuck in a pit of addEventListeners yesterday.
Re:Ask HN: What novel tools are you using to write web sites... by recursivedoubts on Monday April 05, 2021 @09:31AM (#26698682)
:) it's pretty cool, but also pretty alpha

happy to help you get started if you want to jump on the discord

Re:Ask HN: What novel tools are you using to write web sites... by mikesabbagh on Monday April 05, 2021 @09:56AM (#26699010)
beautiful solutions, thank you for ur work

Is there similar solution for manipulating tables and json? I am not a front-end developer, so when i am preparing a poc, it always takes me so long to parse data in a table. Someone must have done the same thing as htmx for tables, or i hope ...

Re:Ask HN: What novel tools are you using to write web sites... by recursivedoubts on Monday April 05, 2021 @10:44AM (#26699683)
what kind of manipulations?

you can implement server side versions of most manipulations and then use htmx to trigger them and rerender the whole table, if that's acceptable from a UX standpoint

here is an example of active search that filters a table:

https://htmx.org/examples/active-search/

Re:Ask HN: What novel tools are you using to write web sites... by geoah on Sunday April 04, 2021 @09:40PM (#26694501)
on the same note, I'm really enjoying basecamp/hey's hotwire stuff together with go templates.

will be checking out htmx as well, thank you for the links.

Re:Ask HN: What novel tools are you using to write web sites... by notagoodidea on Monday April 05, 2021 @04:33AM (#26696592)
Just wanted to thank you for htmx!