Live data from Hacker News

Show HN: I made a HTMX Playground 100% in the browser

lassebomh.github.io

21–30 of 126 posts

Re: Show HN: I made a HTMX Playground 100% in the browser

#22

Wonder if there is there anybody who is making an offline app with request-reponse with html(with HTMX) and a virtual server defined in a service worker?

This is a great question.

I love htmx but in situations that have to work offline I can't use it. Would be a great hack to be able to just run your server code in a worker.

Re: Show HN: I made a HTMX Playground 100% in the browser

#23
post #22

Wonder if there is there anybody who is making an offline app with request-reponse with html(with HTMX) and a virtual server defined in a service worker?

This is a great question. I love htmx but in situations that have to work offline I can't use it. Would be a great hack to be able to just run your server code in a worker.

> Would be a great hack to be able to just run your server code in a worker.

This is exactly why some people build heavy offline-first SPAs in JS. HTMX tries to avoid this entirely. Conceptually (seen from the perspective of HTMX), it makes zero sense to put the server code in a worker and run a client-server architecture in the client‘s browser.

This would be an over-engineered thing that HTMX explicitly tries to avoid in the first place.

Re: Show HN: I made a HTMX Playground 100% in the browser

#24
post #8

Earlier quoted context omitted.

I'm curious about why you use Django together with SQLAlchemy, instead of using the built-in ORM? Or is it just separate projects?

I'm using SQLAlchemy to access external data sources to build reports on. Essentially, I'm using it as a dumb BI connector (mostly to access a Databricks metastore), while my Django ORM manages any app information. I'm not sure it's the most elegant solution, but it has been pretty functional

Unless you’re writing raw sql, Django does not make it easy to build reporting type queries with the ORM so I’d suggest you’re probably doing the optimal thing here.

Fun fact (and a bit of a brag, apologies), I was the contributor that added the “new” Expressions API with the intent of building a reporting platform on top of it. That platform never eventuated but I’ve still got lots of use out of those APIs.

Re: Show HN: I made a HTMX Playground 100% in the browser

#25

Wonder if there is there anybody who is making an offline app with request-reponse with html(with HTMX) and a virtual server defined in a service worker?

I'm working on a server/backend for htmx that's intended to run as a local service beside the browser. In theory you could do this with any server stack that is self host-able. My goal is to produce a single binary with no external service dependancies. I'm using Go, and a lot of the components are readily available, e.g. self updating local service, replicated database, etc. It's easy to cross-compile for different target OS and architectures. As an alternative to building everything into the browser, and assuming you're able to run a separate process, this approach makes a lot of sense to me. It would be great if Go had something similar to Deno's permission management though...

Re: Show HN: I made a HTMX Playground 100% in the browser

#27
> Limited mobile support, Ace Editor (should just be Monaco) and lack of proper error outputs.

Monaco doesn't work on mobile by design, so people use Ace on mobile.

At least the last time I checked GitHub[0].

[0] https://github.com/Microsoft/monaco-editor/issues/246

Re: Show HN: I made a HTMX Playground 100% in the browser

#28

> Limited mobile support, Ace Editor (should just be Monaco) and lack of proper error outputs. Monaco doesn't work on mobile by design, so people use Ace on mobile. At least the last time I checked GitHub[0]. [0] https://github.com/Microsoft/monaco-editor/issues/246

Monaco works fine on mobile, just used it for https://tsdiagram.com

Re: Show HN: I made a HTMX Playground 100% in the browser

#29

hey there, I'm the creator of htmx, and I really appreciate you making this! very cool!

Thankyou for the awesome library! I have a question.

Is there a way to use HTMX with minimal server side changes. Specifically if I have an existing page that you fill in a form and submit and response is of course the entire page. I think it would be cool to tell htmx that the whole page is being returned BUT I only want to update #my-form and that way you don’t need any “if htmx request” kinda stuff on the server.

This is for people who care about their site working without JS. But also it allows you to have a single backend endpoint to handle multiple things (for example comments, sign up to email, like button, all in one)

Re: Show HN: I made a HTMX Playground 100% in the browser

#30

> Limited mobile support, Ace Editor (should just be Monaco) and lack of proper error outputs. Monaco doesn't work on mobile by design, so people use Ace on mobile. At least the last time I checked GitHub[0]. [0] https://github.com/Microsoft/monaco-editor/issues/246

Monaco works fine on mobile, just used it for https://tsdiagram.com

On my android, I cannot type - the keyboard does not open. So it's read-only on my mobile.

I think that was the problem with Monaco on mobile: the keyboard never worked correctly. That was my experience.

Edit: I don't want to complain, Monaco is superb editor and it would be super if it worked on mobile consistently. But from the github issue, it appears that Microsoft doesn't seem to want to change that.

Post reply on HN