Help Me Understand SolidStart vs. Next.js Caching

I'm new to meta frameworks like SolidStart and I'm learning about Next.js to understand them better. Next.js automatically caches data for faster performance, but it seems SolidStart doesn't do this. Why is that? Does SolidStart's unique reactivity system mean it doesn't need caching like Next.js? If not, does using SolidStart mean sacrificing performance because it doesn't have automatic caching? Thanks, Chris
3 Replies
peerreynders
peerreynders8mo ago
Why is that?
I'm assuming you are referring to these Next.js caching features. In my perception the difference is both practical and philosophical. Solid's reactivity doesn't come into play server side but it's SSR doesn't go through an intermediate fake-DOM but goes straight to HTML (string). Jason Lengstorf recently observed that Next.js can be weighed down by it's ever present Just In Case functionality (though “supports everything out of the box” is popular with a certain audience despite of Rasmus Lerdorf's observation that “…everyone needs a framework; what everyone doesn't need is a general-purpose framework. Nobody has a general problem…”) which is why Jason prefers the Astro approach of “only add it when you need it”. Going further Solid always embraced “primitives not frameworks ” and that still is true for SolidStart. SolidStart was never meant to be a “meta-framework” in the sense of Next.js but just the start to building the framework that you actually need for your particular problem. Practically speaking SolidStart needs to be focused in order to be sustainably maintained with minimal effort over the long term while providing the primitives from which the community can build more opinionated solutions like create-jd-app. Perhaps it's good to keep in mind that back in 2013 React took on AngularJS by eschewing the “complete OOTB” approach and focusing on “just the V in MVC” (until flux).
Learn With Jason
YouTube
Why I'll choose Astro (almost) every time in 2024
Astro has become my JavaScript framework of choice for web projects going into 2024. I always found myself struggling with feeling like I had a whole bunch of complexity I didn't need with frameworks like Next.js, but not enough power or flexibility with pure static site generators like Hugo. Astro's "just in time" approach to handling dynamic w...
10 Lessons from 10 Years of Amazon Web Services
On March 14, 2016 it has been 10 years since the launch of Amazon S3, the first AWS service. Here are some lessons learned in those 10 years
Building Your Application: Caching | Next.js
An overview of caching mechanisms in Next.js.
peerreynders
peerreynders8mo ago
The only caching in SolidStart that I'm aware of is the router cache which is even shorter lived than Next's router cache but it should still accomplish the objective of “reducing server requests on navigation”.
ChrisThornham
ChrisThornhamOP8mo ago
@peerreynders thank you. That makes sense. I did mean the caching features you referred to. The more I look into this, I realize that Solid provides you with the tools you need and then gets out of your way. Next has a lot baked in that is likely not necessary for every project. I'll dig into the resources you mentioned. Thanks again, Chris
Want results from more Discord servers?
Add your server