5 ms·
I know this is tangential but I was trying to decide what I wanted to use to make an app that could be accessed from android, ios, and desktop in a convenient w
by ye-olde-sysrq 4y ago
I know this is tangential but I was trying to decide what I wanted to use to make an app that could be accessed from android, ios, and desktop in a convenient way. I am not a fan of how churny the js world is, and I come from a background in Swing/Qt/GTK/etc desktop development.
I evaluated HTMX as a not-js way to do modern web apps. It was fine, it was certainly interesting. I had some concern about how much pain I would be in for when I inevitably wanted to borrow something from the js ecosystem, like a charting library or something.
I actually ended up deciding on godot with gdscript and while I'm not done yet, I'm having a pretty dang good time. I'm a little annoyed that I have to pay apple to get it on iOS, but I have to pay apple anyway because safari is such an annoying odd one out from how firefox and chrome's renderers work. It's always safari that has weird things it doesn't like, in my experience. And I have hope that either Epic Games or Europe will manage to force Apple to let people sideload apps.
- Takennickname 4y agoDoesn't godot refresh the entire screen at X fps? That would kill battery life, no? Asking cuz I considered this route before but decided against it for battery and app loading time reasons.
- DisownedWheat 4y agoGodot does have a low CPU mode that limits screen refreshes until something is interacted with on screen or animated, it's what the actual editor uses. I'm not sure whether it works on web exports though.
- rmbyrro 4y agoMight be worth double checking. Last time I read, this mode wasn't supported on mobile devices, which is precisely the ones more sensitive to energy use.
- boterock 4y agogodot ticks at that rate, but if you don't transform UI things, they don't get redrawn. so maybe the framebuffer is switched every frame, but draw calls shouldn't be reissued unless needed. also, I think it is possible to make it not tick from time updates, but only from input event updates, or maybe an animation actually running. similar to what the editor does.
- rmbyrro 4y agoIt still consumes more battery than an HTML page on a browser, doesn't it? Can't tell how significant is the difference, though.
- somethoughts 4y agoFrom what I could tell the sweet spot for HTMX would be much more targeted at adding some JS magic to an existing backend server based web app (i.e. Django, Flask, Rails) where the developer primarily is a Python/Ruby, HTML/DOM and database expert and doesn't want to get bogged down into supporting a full fledged frontend like React, Angular, etc. to add some UX flair to their mostly CRUD based app. Native apps (i.e. iOS, Android, MacOS) purely in HTMX is probably not its sweet spot. Probably Electron (or Godot) would be better.
- recursivedoubts 4y agothere is a really neat mobile-native hypermedia called HyperView: https://hyperview.org/ https://hyperview.org/ which is discussed in depth in our book: https://hypermedia.systems/book/hyperview-a-mobile-hypermedia/ https://hypermedia.systems/book/hyperview-a-mobile-hypermedi...
- rlawson 4y agoQuestion. Have you ever seen someone use htmx in a capacitor/cordova app? I would rather use htmx like I have been instead of a different tech (like Hyperview)
- hokumguru 4y agoTurbo is pretty similar to htmx and Turbo iOS produces some stellar experiences https://github.com/hotwired/turbo-ios https://github.com/hotwired/turbo-ios
- ye-olde-sysrq 4y agoFunny you mention turbo/hotwire, I actually encountered a bug almost immediately after upgrading to Rails 7 where for some reason HTML5 video tags would work after a real page load but would not (with no error messages or anything) after a hotwire/turbo-"page"-"reload". I tore hotwire and turbo out and it worked. Oh, this was only on iOS and macos Safari, of course. Worked fine on FF/chrome.
- 4y ago
- PaulHoule 4y agoI am using d3.js inside an htmx app with no problems.
- wg0 4y agoSo htmx works flawlessly with any other JS library? Asking because of my limited knowledge. If you happen to have a blog post or something on that, would be helpful.
- neurostimulant 4y agohttps://htmx.org/docs/#scripting https://htmx.org/docs/#scripting
- egeozcan 4y agoI don't like libraries creating their own languages, but if one had to, they better have docs like you have. Amazing.
- PaulHoule 4y agoI gotta start blogging about that system because it really is cool. HTMX is not too different from Jquery in terms of how it works so it is compatible with most if not all JS libraries. In my case I have <script src="https://unpkg.com/htmx.org@1.8.4" integrity="sha384-wg5Y/JwF7VxGk4zLsJEcAojRtlVp1FKKdGy1qN+OMtdq72WRvX/EdRdqg/LOhYeV" crossorigin="anonymous"></script> <script src="https://d3js.org/d3.v7.min.js"></script> in my header and I write JS that uses d3.js from a <script> tag, I am not messing around with a Javascript build system but I see no reason why you couldn't have a react app that is compiled and lives in a <div> inside an htmx page.
- arcanemachiner 4y agoIn my experience, yes. A large part of playing nice with other JS libraries is that HTMX works with the DOM in the browser, instead of creating a Virtual DOM (VDOM) like React and Vue (and others, eg. Solid.js) do, which leads to a lot of libraries only working with those platforms they're made for. Which is a great tragedy IMO.
- riwsky 4y agoI would be much more comfortable with the Epic Games App Store if they just let me pay to submit my app instead of micropurchase a bunch of loot boxes hoping for a submission crystal.
- wg0 4y agoWhat kind of app is that? Wouldn't it be hard to create user Interface in godot especially text editing components, radio, check and select boxes etc?
- ye-olde-sysrq 4y agogotdot's editor itself is built in godot, it has an entire suite of Swing/Qt/etc-feeling components and GUI layout stuff. A long-standing frustration for me is that I always felt like it was really easy to make a responsive layout with Swing (I know desktop apps don't deal with quite the gamut of weird aspect ratios that websites do, but for the apps I built users typically tiled them and resized them between portrait/landscape and various sizes based on need and if they were actively using them or just passively monitoring them. So a lot of the considerations felt very similar compared to modern web design), whereas in CSS it's such a struggle comparatively (though flexbox and css grid and several other similar things have improved it a lot). Now that, compared to godot, godot feels a lot more like the productivity/design experience I got out of Swing and friends.