DEV Community

Discussion on: Qwik – The Post-Modern Framework

Collapse
 
mindplay profile image
Rasmus Schultz

Just my two cents, but (at least for the time being) I view this more as a modern static site generator with good support for client side interactions, than as an alternative to frontend frameworks. Yes, there are similarities in terms of form factor, with code looking (for better or worse) similar to React - but the execution model is totally different, and that's not just an "optimization".

It seems like a good choice for websites - but doesn't make much sense for heavily interactive applications, in my opinion. You'll only add a lot of network reliance, a ton of HTTP requests, potential delays and instability - for an application, waiting two seconds for it to load and launch is not a problem, and it's more important the app stays fast and responsive once it's running.

For something like e-commerce, where load times are crucial, I'm not even sure if I'd pick this. You would get more control with a straight forward MPA approach, a lightweight UI framework (Preact, Solid, etc.) for interactive areas on the page, and carefully loading what you need, when you need it.

It definitely fills a new niche though - I'm sure there are projects where this might be the best choice. 🙂

Collapse
 
mhevery profile image
Miško Hevery

I see this confusion a lot about lazy-fetching and constantly waiting on the network. It is not what actually happens. Navigating to the site will caues eager download of all interactions so that even if you loose network connection the site will continue working.

I think that Qwik excells at highly interactive applications. The more interactive the more it shines, as it loads less than CSR equivalent.

Collapse
 
tleperou profile image
Thomas Lepérou • Edited

🙌

Qwik excels with the e-commerce constraints and high interactivity apps – and more than any other SPA/meta frameworks I've been working with the last 15 years.

If generating static content is an option, it's not its strength.
Also, it won't play nice with offline mode.

🤷

The latency of downloading chunks happened to be an issue to me, that was during its beta though. First/ since then, the pre-fecthing strategies improved well. Second/ new paradigm new way to reason about.

It's still at its early stage, so there're obviously things to polish.

💎

That being said, reaching 100% to lighthouse with no effort is very profitable.
Running seamlessly backend and frontend code is also very profitable.

Nuxt and Next are still behind regarding the code extraction and resumability – despite being backed by huge communities and companies.

I'm quiet excited about that piece of technology!

Collapse
 
ayoub_alouane profile image
Ayoub Alouane Playful Programming • Edited

Thank you for your comment, it's an old Article that i wrote, i just republished it here, so to answer your question, Qwik will not download every file only when you click, but after doing the first load to show the page, the framework will start automatically downloading the code necessary fo the web app using a service worker, and it will store it in the cache, so we will not sent a request to the server and wait 2 secondes every time someone click on a button but it will grab it instantly from the cache of the browser, if the code is not downloaded yet it will download it from the server, to have details here is the explanation of how this prefetching works: qwik.builder.io/docs/advanced/spec...
(just updated the article with that part)

Collapse
 
hoachlinux profile image
Nguyen Hoach

Nice

Collapse
 
mindplay profile image
Rasmus Schultz

Yes, effectively a re-implementation of browser native prefetch - this optimization is available to an MPA as well. 🙂

Thread Thread
 
mhevery profile image
Miško Hevery

We tried prefetching, but it did not quite work, and so we had to build the Service Worker builder.io/blog/code-prefetching-i...