3 ms·
How is that different from a regular single-page application? My understanding of JAM from watching [1] was that your entire site is static, except for JS that
by cpeterso 8y ago
How is that different from a regular single-page application? My understanding of JAM from watching [1] was that your entire site is static, except for JS that calls out to serverless APIs to CRUD your content on the backend or initiate some workflow with a third-party service like PayPal or Twilio. If your site allows user comments, then you would rebuild your static site every time the user comment is submitted instead of rendering the comments on the server when handling the request.
[1] https://www.youtube.com/watch?v=grSxHfGoaeg https://www.youtube.com/watch?v=grSxHfGoaeg
Google's HTTP 203 show about JAM stack [2] talks about doing sites claiming the do static site rebuilds "every second" and debates whether static site rebuilds would scale for a large site with lots of old content like the BBC or New York Times.
[2] https://www.youtube.com/watch?v=QXsWaA3HTHA https://www.youtube.com/watch?v=QXsWaA3HTHA
- lgregg 8y agoStatic Site Generators basically compile the entire site and serve it as static files to a S3 equivalent bucket with the API component which could connect anywhere. There are faster compilers than others (i.e. Hugo, written with Go) that can compile 1000s of pages in a handful of seconds while others are slower comparatively (i.e. Jekyll); I personally like Gatsby[1] since it's Javascript based making it easy for me to understand and debug. There are setups where those builds can be more modular, so in the case of your News Industry example, you can split it up by section or have custom builds with web hooks based on the section that needs to be updated. Comments normally would probably be something like Disqus but I've also seen a demo of a Netlify dev doing a hacky hijack of their forms function which allowed you to approve a comment then re-render based on approved comments. You can also setup a CD system that builds every X seconds/minutes/hours/days/etc. It's just a different way to build websites. I think it's useful for marketing websites but not as helpful when you need a true app. [1] https://www.gatsbyjs.org https://www.gatsbyjs.org, also checkout: https://www.gatsbyjs.org/showcase/ https://www.gatsbyjs.org/showcase/