I want to build a web app using Nim. It would have several pages, but each page should have AJAX abilities if required. Would Jester + htmlx work for this? For reference htmlx is the successor to intercooler js: https://github.com/htmlx-org/HTMLx
Could something like this be written entirely in Karax instead?
I used jester to serve json to a karax frontend. I loved it. Best part was I used the same objects in karax and jester.
The karax frintend app would populate and serialize one or more objects to JSON as the request body. The jester app would then deserialize, do backend things, and respond with serialized object(s) of its own in the response body, which in turn is deserialized and used by the karax frontend. That's a lot of error checking handled by the compiler, and a lot of shared code between backend and frontend via modules both would include. I never want to go back to reimplementing things like string formatting routines in Javascript. It was really, really cool.
This is also precisely how this forum works :D
We need someone to write a few tutorials/make a few videos on how to do this, any volunteers? :)
I used jester to serve json to a karax frontend. I loved it. Best part was I used the same objects in karax and jester.
This. I'm working on a little project right now with the same deal. Using jester for routes/ORM queries and karax for front-end. Best part, as your post said is object definitions can be loaded into both back and front-end. Single source of truth. Also, when things get serialized/de-serialized via nim's json module, I basically get schema validation 'for free' (using the .to method.)
Compared to using say, a Rails-based backend and something like Angular on the front-end (using Typescript for separate definitions), the karax/jester system is so much easier!
We need someone to write a few tutorials/make a few videos on how to do this, any volunteers? :)
Why do I get the distinct impression that these by "volunteers" you mean me? :D
Actually, I'd love to. Long ToDo list. It contains tasks that involve the physical world, so I can't automate them. Snap.