Live data from Hacker News

WTF is JAMstack?

jamstack.wtf

31–40 of 52 posts

Re: WTF is JAMstack?

#31
post #13

How is this different from a single page app? The article is also loaded with BS: > Faster performance. Serve pre-built markup and assets over a CDN Just like every single-page app. > More secure. No need to worry about server or database vulnerabilities Total BS. A form post is an API call by another name. Your server and database are just as vulnerable via an API. > Less expensive. Hosting of static files are cheap…

You miss "The modern web revolution starts" from the 2017 block on the page.

Re: WTF is JAMstack?

#33

Earlier quoted context omitted.

Yup, it pulls stuff in ahead of time. That said, that's just for the initial render. Once things are mounted and "static" can take advantage of apollo or whatever request lib you'd like for "dynamic" content. But the idea is to build out most paths in the build phase and then push up. A lot of the time thats all a site will need. It works amazingly well, at least with Gatsby.

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 ins…

Static 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, also checkout: https://www.gatsbyjs.org/showcase/

Re: WTF is JAMstack?

#36
post #13

How is this different from a single page app? The article is also loaded with BS: > Faster performance. Serve pre-built markup and assets over a CDN Just like every single-page app. > More secure. No need to worry about server or database vulnerabilities Total BS. A form post is an API call by another name. Your server and database are just as vulnerable via an API. > Less expensive. Hosting of static files are cheap…

25 days ago I made this comment: "The key is to invent a new term for an existing entity. Here the author tries to introduce the term "document site" for static websites." The same happens here. Take an existing concept. Stick a new label-term on it. Market it like you're the inventor of this revolutionary concept to the unaware. Profit.

Ironically, "documents" are what the original web elders called the things at the end of links.

Re: WTF is JAMstack?

#37
post #17

Earlier quoted context omitted.

Yup, it pulls stuff in ahead of time. That said, that's just for the initial render. Once things are mounted and "static" can take advantage of apollo or whatever request lib you'd like for "dynamic" content. But the idea is to build out most paths in the build phase and then push up. A lot of the time thats all a site will need. It works amazingly well, at least with Gatsby.

So there is no server-side rendering of content? Will Google index this correctly?

The way Gatsby works is during the build phase it will take every path it can through your app _as if_ it was an SSR app, and compile flat html files out of that. So by the time it gets to your server it's remarkably SEO friendly.

Re: WTF is JAMstack?

#38

Oh look, something that takes 10x longer to develop than static html that is more performant and easier to manage.

I struggle to beat a Django/Rails site with a few libraries and server side rendered templates. Not as straightforward to host as a static site, but much more straightforward than a static site plus a bunch of micro service APIs, plus I can render content on a fast server rather than a slow phone.

I’m all for SPAs for products that reach a certain level of complexity. They are 10x more capable, but take 10x the work.

Re: WTF is JAMstack?

#39
I wish they spent a bit more time on the CMS part of the equation. It's hugely important to enable content editors to make changes. The solution isn't that valuable if it's limited to devs only. I also don't think there's a clear winner yet. Maybe, Contentful if you have a boatload of money, but I certainly don't.

I did just implement Netlify CMS in a project though. Super easy to get set up and it's open source. It's missing some things from more polished CMSes that you might expect, like editor roles, but it's still pretty young. The project lead is really responsive and I have high hopes for it long term.

Re: WTF is JAMstack?

#40
post #13

How is this different from a single page app? The article is also loaded with BS: > Faster performance. Serve pre-built markup and assets over a CDN Just like every single-page app. > More secure. No need to worry about server or database vulnerabilities Total BS. A form post is an API call by another name. Your server and database are just as vulnerable via an API. > Less expensive. Hosting of static files are cheap…

You seem to confuse things. JAMstack doesn't try to replace SPAs, it's trying to replace Wordpress. It's simply a better choice for websites and blogs than either SPA or Wordpress. It really is a different concept than SPA.

In pure JAMstack, APIs are used only at the build step, and you don't have to expose them. You get your content such as blog posts from the API, render them to html and store on CDN.

Monolithic architecture refers mostly to Wordpress. With JAMstack you separate your CMS from your frontend, and you can manage your content with a service like https://www.contentful.com/ that doesn't define how the content gets rendered.

Post reply on HN