TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

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

482 点作者 bitterblotter超过 1 年前
I recently dug up an old project in an attempt to improve on it. It&#x27;s a code sandbox for playing around with HTMX in the browser, that runs a mock server within the sandbox iframe. The server &quot;framework&quot; is loosely based on Django, so if you&#x27;re familiar with Django, you&#x27;ll immediately understand what&#x27;s going on.<p>I recommend clicking through the examples.<p>Github repo: <a href="https:&#x2F;&#x2F;github.com&#x2F;lassebomh&#x2F;htmx-playground">https:&#x2F;&#x2F;github.com&#x2F;lassebomh&#x2F;htmx-playground</a><p>Probably my favorite part is the lack of HTMX specific code. It&#x27;s designed to mimic the client and server, but really nothing else. In principle, this means that it is agnostic to whatever frontend framework is being used.<p>Known problems: Limited mobile support, Ace Editor (should just be Monaco) and lack of proper error outputs.<p>Feel free to give feedback, suggestions or questions.<p>I learned a lot when making it, and I hope you&#x27;ll something about HTMX! Happy tinkering.

17 条评论

recursivedoubts超过 1 年前
hey there, I&#x27;m the creator of htmx, and I really appreciate you making this! very cool!
评论 #38909431 未加载
评论 #38908089 未加载
评论 #38936526 未加载
评论 #38913163 未加载
评论 #38919178 未加载
nlstitch超过 1 年前
I was seriously thinking about using HTMX myself, but I&#x27;m kinda scared it&#x27;s developer pool seems too small to hire devs from.<p>I&#x27;m used to proprietary frameworks, in my case I worked with intershop which uses isml. (this is comparible to something like thymeleaf). In recent years we tried to move away from this approach and go to the angular front end Stack because it&#x27;s easier to hire a dedicated frontend developer than it is to hire a specialized fullstacker. Stuff can get complex when you&#x27;re using something like htmx and developers don&#x27;t want to fight spaghetti monsters. You don&#x27;t want you backend guys to be the bottleneck, e.g. when FE just creates HTML and the backend has to tie it all together.<p>My question is; has HTMX thought about the pitfalls like this, and how do you counter it?
评论 #38910589 未加载
评论 #38911334 未加载
评论 #38911915 未加载
评论 #38912575 未加载
评论 #38982501 未加载
评论 #38910623 未加载
philips超过 1 年前
Nice! I have been using maplibre with django and htmx. I should try and put an example up there to share with others.
评论 #38908785 未加载
评论 #38907626 未加载
评论 #38907455 未加载
评论 #38912686 未加载
Towaway69超过 1 年前
&gt; Limited mobile support, Ace Editor (should just be Monaco) and lack of proper error outputs.<p>Monaco doesn&#x27;t work on mobile by design, so people use Ace on mobile.<p>At least the last time I checked GitHub[0].<p>[0] <a href="https:&#x2F;&#x2F;github.com&#x2F;Microsoft&#x2F;monaco-editor&#x2F;issues&#x2F;246">https:&#x2F;&#x2F;github.com&#x2F;Microsoft&#x2F;monaco-editor&#x2F;issues&#x2F;246</a>
评论 #38909365 未加载
mseidl超过 1 年前
Does this support ActiveX?
评论 #38910247 未加载
评论 #38910302 未加载
nymanjon超过 1 年前
You could use a Service Worker to do this and then have multiple pages in a different tab to be able to navigate around. It would be too difficult to do that. Then you could just use native JavaScript or whatever the user wants for the pages to be generated.<p>This is cool though. Good job!
aatd86超过 1 年前
Made with svelte?! Where are the purists of the MPA and their pitchforks? ;)
评论 #38909822 未加载
johnnylambada超过 1 年前
I love the concept behind htmx &amp; started reading the book today. But every time I think about using it, I remember that I&#x27;ll eventually have to support native mobile apps as well and I&#x27;ll be completely re-writing not only my frontend but much of my backend to do it. I know about hyperview.org but a react-native app won&#x27;t really cut it for the use cases I&#x27;m interested in.
评论 #38920773 未加载
aitchnyu超过 1 年前
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?
评论 #38908905 未加载
评论 #38909087 未加载
评论 #38983044 未加载
TobyTheDog123超过 1 年前
I wonder if it would be a good idea to move the whole HATEOAS thing towards things like desktop and mobile apps. Might be a fun experiment.
评论 #38909550 未加载
评论 #38912003 未加载
评论 #38910090 未加载
评论 #38983152 未加载
pacifika超过 1 年前
Used it for work today. It works well and will keep using it going forward although I might make a php based version.<p>I did lose my work a few times when I tried to paste the json into they url load field (it requires an url) and when I couldn’t cleanvthe network request browser (feature request). Great work.
greatgib超过 1 年前
@bitterblotter there is a typo in the description on the main page I think: &quot;It will run a mock server that intersepts outgoing&quot;<p>Intersepts =&gt; intercepts
imetatroll超过 1 年前
Are there any companies using htmx? Places where we can see examples of complex interaction?
评论 #38910779 未加载
评论 #38910751 未加载
评论 #38911030 未加载
ametrau超过 1 年前
Dang this is why I keep coming back to HN. Nice one.
sroerick超过 1 年前
This is very cool!
yesco超过 1 年前
Finally a way to use HTMX as a SPA framework ;)
评论 #38983233 未加载
评论 #38912260 未加载
评论 #38912099 未加载
评论 #38910884 未加载
评论 #38910128 未加载
评论 #38912430 未加载
Solvency超过 1 年前
Is Htmx just the long overdue successor to DHTML that was all the hype in, say, 1997?
评论 #38908035 未加载
评论 #38908500 未加载
评论 #38911294 未加载
评论 #38911814 未加载
评论 #38908043 未加载
评论 #38912436 未加载
评论 #38908516 未加载