3 ms·
I'm trying to decipher what this is. So far I've learned there's a thing called "Jamstack" that seems to be about static websites. How does one manage databases
by liminal 6y ago
I'm trying to decipher what this is. So far I've learned there's a thing called "Jamstack" that seems to be about static websites. How does one manage databases with this technology?
- aoeusnth1 6y agoI think the idea is that instead of generating the original http content based on your DB, you have static webpages which have JavaScript call out to your dB-backed API to modify the content in an SPA. This can then be made more efficient with automatic server side rendering.
- yawnxyz 6y agoI run a super small site, so all the data is compiled at build time into JSON files and served using serverless/lambda (e.g. short server-side functions). The data I'm getting from Notion and Airtable, so I don't have to run a "real" DB. For commenting I'm experimenting with services like Fauna and Supabase
- Griffinsauce 6y agoYou either generate pages at build time from the data or you build a static page that will fetch the data from the client. This means you have zero server side rendering, you're just serving up static files, which of course is faster and can utilize CDNs and such. SSR is also still possible, that would basically give you a classic model of fetching data on request and then rendering the page. My impression is that this is meant more as a transition than a preferred option. The SSR features are also optimised to the point that the data fetching and rendering is decoupled. So a client side (JS) navigation only needs to fetch the new page's data. The DX around this is super smooth (just expose an async function...)