I always use Nuxt by default for new projects, and it's a correct decision every time. People who choose to do Client Side Rendering (SPA) finally struggling on SEO and other tasks.
1. Nuxt can runs in SPA mode just like using Vue CLI. The opposite is not true
2. SEO is the winning feature of Nuxt, no doubt.
3. Real server status code: especially useful for redirections and 404 pages. For example if you do `curl -I /some-page-that-does-not-exist`, you will get back 404 status code, which is critical for sitemaps and uptime tools. (Instead in SPA you always get 200 for all the pages).
4. Pages written in Nuxt seems to display faster, because the HTML is sent immediately. I say "display" here, not necessarily "load" faster.
5. Real Express middleware helps a lot when doing route validations and authorizations. You can also make calls to private API without exposing them on the client side.
6. Can adjust the amount of HTML sent to client by wrapping client-side-only components in a <client-only> component. Which means that on the server you don't need to generate giant HTML for a simple datepicker, and let the browser does that
Why are people slapping Static Site Generators to all the problems?
Imagine you build an e-commerce website that has ten thousands of products, that can be accessed by example.com/products/{product-slug}. Now what is making more sense:
1. Generating ten thousands of .html file for each products in the DB
2. Use routing in Nuxt like this "/products/$productSlug" and query for $productSlug in the database
To me the (2) approach is a clear winner here. And the performance only depends on how fast your API can query a single product from the database, which is pretty fast 99% of the time.
And what is the best solution? Client Side Rendering is worse, because users see a blank page until the script is parsed. 100KB is actually desirable, because it's included Vue and Vuex out of the box.
Nuxt works fine for all the uses case that I have come across, even for ERP projects. With Nuxt you can have real redirects, real 404 pages, and a well-established project structure. The only hard thing is that server-side error is more difficult to inspect
No native support for concurrency operators, no real event loop implementation, lack built-in support for non-blocking IO...
I do Elixir regularly and Actor Model is not something PHP developers know
Is this just a long way of saying it doesn’t have “async” because threads are a perfectly fine concurrency primitive that you can build event loops on top of.
no PHP framework is similar to the thing that NextJS/Reactis doing. The output is the same (well, isn’t the point of web framework is to spit out HTML?) but the methodology is totally different.
Not at all. I have worked with both for a long time and I can clearly see the differences. They are used for different purposes. The people comparing any PHP frameworks to NextJS have not been very experienced with frontend development, IMO.
Not necessarily. I recently rewrote an old web application written in php and jquery with django, react and typescript. The new application has roughly the same LoC count while having more features and better interactivity.
1. Nuxt can runs in SPA mode just like using Vue CLI. The opposite is not true
2. SEO is the winning feature of Nuxt, no doubt.
3. Real server status code: especially useful for redirections and 404 pages. For example if you do `curl -I /some-page-that-does-not-exist`, you will get back 404 status code, which is critical for sitemaps and uptime tools. (Instead in SPA you always get 200 for all the pages).
4. Pages written in Nuxt seems to display faster, because the HTML is sent immediately. I say "display" here, not necessarily "load" faster.
5. Real Express middleware helps a lot when doing route validations and authorizations. You can also make calls to private API without exposing them on the client side.
6. Can adjust the amount of HTML sent to client by wrapping client-side-only components in a <client-only> component. Which means that on the server you don't need to generate giant HTML for a simple datepicker, and let the browser does that