Replies: 9 comments 35 replies
-
It would be nice to create a repository with this POC, then we could fork Quinoa to have something fully compatible and see if it's worth merging? WDYT? |
Beta Was this translation helpful? Give feedback.
-
Also I remember @phillip-kruger showing me a Java library able to deal with assets (css, sass, fonts, ...) we should also see if NodeJs is the best solution forward. |
Beta Was this translation helpful? Give feedback.
-
@ia3andy, here's a simple recreation of the project structure: https://github.com/TeHMoroS/quinoa-request-control-discussion It's a simple HDA-style approach with Htmx and with Quarkus+Renarde as a back-end and template source. Basically a very stripped down version of what we're using (Gradle-based). If you don't want to read the ton of "rationale" behind this, then just skip to the Request control issue at the bottom of the README. :P |
Beta Was this translation helpful? Give feedback.
-
I'm not sure I understand why we're not simply attempting to serve the request and if it's not served or there's a 404, say, we then redirect to the UI server? This would allow you to hit the Renarde endpoints (and even static assets), and if nothing matches, then forward to the UI server, with zero config (paths) required. |
Beta Was this translation helpful? Give feedback.
-
Here are a lot of places we need to advertise about Quarkus + Quinoa/HTMX once it's ready: https://github.com/rajasegar/awesome-htmx |
Beta Was this translation helpful? Give feedback.
-
I opened a thread to discuss this on Quarkus core repo: quarkusio/quarkus#27525 |
Beta Was this translation helpful? Give feedback.
-
There is now a custom Quarkus Extension called Web Bundler to accomplish exactly this: https://github.com/quarkiverse/quarkus-web-bundler |
Beta Was this translation helpful? Give feedback.
-
Hi. I've been continuing with the HDA-style approach using Quarkus (with Renarde), Quinoa and Htmx. My initial opinion is that Quinoa is quite SPA-centered and very hard to use for MPA or HDA apps.
This is going to be quite long, so here's a TL;DR: Quinoa could use an option for specifing requests that's it's allowed to redirect or the ignoring option could be regexp-based, otherwise it's unusable for developing MPA/HDA-style apps.
Long version:
After resolving the CSS purge issue with templates being outside Quinoas graps (#61) by a workaround (disable purge in dev mode), I've been hitting other road blocks, but let's get the context straight first.
When creating an MPA (classic multipage application) or an HDA (hypermedia-driven application, specifically with Htmx returning ready parts of the HTML), one often uses a configuration where back-end code handles templates (Qute in this case) and also has an additional side-pipeline for handling assets (JS, CSS, images, fonts, etc.) which is Node-based - mostly the aftermath of SPAs going mainstream and focusing all of the attention. This pipeline is almost always on this - a asset processing pipeline, not a fully-fledged UI app.
It's not really that exotic: Laravel has a whole module just for that (Mix), likewise Symfony (Encore). Quinoa on the other hand is mostly SPA-focused which bascially makes it imposible for using with a asset processing pipeline. My experiences with this so far were:
npm build
all the time, which while being errorless, is very slow (imagine fine-tuning your UI code/CSS/whatever with small, rapid changes and being forced to wait a few seconds on every refresh - unusable in the long run).Now, let's look at the dev server. It's a nice solution for an app that has all web resources (HTML, JS, CSS, other) on Quinoas side. Just redirect the requests to the UI dev server, ignore the REST API ones and done. This. This is very SPA-centric. It's basically unusable for a MPA-style development (hence HDA-style also, which is very similar, yet results in a hybrid SPA/MPA-like app).
A two problems here:
/images
,/css
,/fonts
- for MPAs/HDAa you'll probably have only a few of those).The above forces us to use the
npm build
style, which with constant full rebuilds (Webpack already takes around 4-5s at this point, and we're getting started), makes us thinking of dropping Quinoa in favor of hand-feedingsrc/main/resources/META-INF/resources
by Webpack (which requires hand-crafted Gradle, Git and Webpack config and launching two dev mode tools separately). Resolving the second problem (by regexp or additional "allow requests" option) would make Quinoa fit for making MPA/HDA apps with only a bit of additional configuration.Beta Was this translation helpful? Give feedback.
All reactions