Our great sponsors
</> htmx - high power tools for HTML
> 2) If there's a form input at each step, the server needs to store that info and be aware that the user has an incomplete checkout. Now the user is at step=2 and presses the back button, or clicks on the step=1 link. In that case, the server should know the information stored in the point no. 2 above, and return an HTML form with the data pre-filled based on the last state.
The problem is that when you press back button in the browser, it doesn't make another request to the server. It reloads the page from browser memory. A link back can be made to work, but that's not what I was speaking to.
I tested the most trivial case, when you return a response, and push navigate to next step, then press browser back button, form state is not retained. Both chrome and firefox do not restore the form state on navigation back after a url push navigation.
I don't think that without some client side JS that saves/reloads prior form state this is a solvable problem because of browser behavior. Either that, or perhaps use different divs for each step then have js hide/show them which is what I will try next but involves writing js to do so.
It's pretty clear that htmx hasn't considered back button much at all, it also clobbers the page titles in history as well (https://github.com/bigskysoftware/htmx/issues/746), but that's a fixable problem.
Access the most powerful time series database as a service. Ingest, store, & analyze all types of time series data in a fully-managed, purpose-built database. Keep data forever with low-cost storage and superior data compression.
Rapid, easy full-stack web development starter kit in Go
I was going to mention that I was surprised htmx wasn't mentioned in the article. It's backend-agnostic an extremely easy to use. Drop in Alpine.js and I think you have a really powerful setup without writing any JS. I've been using this with Go and enjoying it.
Wt, C++ Web Toolkit
The article actually left out one of the oldest frameworks for doing this:
I have also tried wasm with various Rust frameworks (Seed and Yew).
While there can be live coding with the backend, I guess because of my background, I like to use strongly typed languages in the backend to help catch logical errors earlier.
So this is the architecture pattern that I am using.
The magical reactive component framework for Django ✨
You can try Django Unicorn (https://www.django-unicorn.com) if Django is your cup of tea.
Have used it in production and it works great. Author is also very responsive to bugfixes / feature requests.
Lift Framework (by lift)
🐍🕸 WebAssembly runtime for Python
Clean code begins in your IDE with SonarLint. Up your coding game and discover issues early. SonarLint is a free plugin that helps you find & fix bugs and security issues from the moment you start writing code. Install from your favorite IDE marketplace today.
I do not usually write front-end but when I do I use https://www.scala-js.org/
Write web-native p2p distributed apps in Swift (and others)
> I feel like this would enable a more sensible choice:
I'm working in something like this
The offline first comes from the fact that every application runs first as a daemon which provide a gRPC api to the world of the services it offers, where the web-UI application process might also consume this same api from its daemon -process manager or from other applications.
Scala library for managing immutable application model
Write Scala.js React apps just like you would in ES6
Simple, expressive, and safe UI library for Scala.js (by raquo)
I do use a virtual DOM but I only use it to patch the HTML in the browser (no synthetic events or anything like that). The meat of it starts here: https://github.com/cheatcode/joystick/blob/development/ui/sr....
My focus for v1 is on developer ergonomics and solidifying an API (this will be frozen after v1 with the only changes being additions if absolutely necessary—a component you write today will look identical to one you write in 10 years).
All future major versions will be solely focused on performance and security (my way of saying: I haven't stress-tested renders, but for the time being it will work well for the majority of use cases).
Phoenix LiveView but for Django
I'd love to see this approach make more headway in the Django community. Based on the last DjangoCon it seems like the community is coalescing around HTMX.
This tool does play very nicely with Django's templating engine; you can just have HTMX re-render a particular template block on the server, and send down that updated block. The migration path is quite clean; you just wrap your "HTMX-updated" template block in a `hx-post` div.
Having not gone too deep on HTMX, I'm interested in folks' thoughts on where it's lacking vs. LiveView and Hotwire. One area I can see is performance; Elixir is going to be faster than Django, and so if you're trying to handle high session counts over websockets. But the impression I get is that HTMX is a bit more light-weight, so I'm wondering if there's usecases that can't be met with it vs. LiveView.
Other Django libraries that haven't quite seen as much uptake:
We have https://github.com/edelvalle/reactor, and a port of Hotwire: https://github.com/hotwire-django but both of these don't seem to have much adoption (yet!).
LuaJIT is JIT compiler for the Lua language. (by LuaDist)
> No offence, but have you written any compilers or interpreters?
I have, but nothing sophisticated.
> The points that you discuss [...] may be performance concerns for application developers [...] but they have very little to do with the optimisations you can make as a compiler/interpreter writer. [...] The only one that's somewhat relevant is 'global scope by default'
But let's dig in a bit on your claim that things like all numbers being doubles or having a array cum map cum record type has very little to do with the optimizations you can make as a compiler/interpreter writer, because it sure seems to me that LuaJIT and V8 do a bunch of optimizations around these things. Both have dual number representations under the hood and will try to avoid representing numbers that remain in the domain of 32 bit integers as double values internally when that gives performance gains. The logic for figuring out if that's the case doesn't seem to be super-straightforward or target architecture independent from looking at the comments in <https://github.com/LuaDist/luajit/blob/master/src/lj_opt_nar...>.
LuaJIT furthermore uses NaN tagging (as do some JS engines, although not V8), which looks less attractive to me as a representation strategy if your numbers are not all/mostly notional doubles (as is indeed the case in newer version of Lua where 64bit integers are the dominant number type)
Also, as far as the super-flexible lua tables are concerned, I'm pretty sure LuaJIT goes through some amount of trouble to specialize various common use cases of tables, e.g. as arrays without holes, and surprise, so does V8 (https://v8.dev/blog/fast-properties#elements-or-array-indexe...). I don't think you'd find something equivalent in a high performance scheme implementation.
> but this doesn't touch the surface of the issues that make JS hard to optimise, such as the fact that your, say, memoisation of an object property or method may be broken by an `eval` call of an arbitrary runtime value somewhere else in the code (which, due to asynchronicity, could take place at more or less any time from the point of view of your given 'peephole').
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
My SaaS makes $50K MRR and is built on vanilla Ruby on Rails and jQuery
4 projects | news.ycombinator.com | 3 May 2023
Vercel claiming credit for making Webpack
5 projects | /r/nextjs | 26 Apr 2023
Can an API be merely a server that has post requests sent to it, rather than something that is installed?
3 projects | /r/learnprogramming | 5 Mar 2023
Phoenix Liveview Implementations
1 project | /r/django | 7 Feb 2023
Why I selected Elixir and Phoenix as my main stack
36 projects | dev.to | 21 Jan 2023