Uh what? How is this front page? The A in Jam stands for APIs but the author writes that off in favor of (amongst others) storing dynamic site data in a GitHub repo. I feel like I’m taking crazy pills.
I read it as: sometimes an app+database is the best solution to the problem, and not APIs from a cloud storage provider. That probably applies to most small web apps and blogs, which is where people mostly use WordPress.
They mention Disqus and maybe there are some good 3rd parties alternatives. It is an important point about that content belonging elsewhere then but I guess that is the Jamstack tradeoff?
Tied to community building, is there a Jamstack solution for forums? This is a very similar use case to comments.
Because then your "static" site is supported by dynamic components and now suddenly we reach the obvious conclusion of "wait, why the hell did we re-engineer everything?"
Generating static content and saving to a CDN is just a really inefficient way of caching dynamic content.
> Generating static content and saving to a CDN is just a really inefficient way of caching dynamic content.
Disagree; updating your content when (and only when) it changes sounds a lot more efficient than dynamically generating whenever it's requested and then putting a cache in front of that.
Cache warming is an overcomplicated way to achieve most of the same thing. You already know exactly what's changed; why would you throw that information away and then attempt to regenerate it, instead of just using it directly?
How well does cache warming support users editing the content directly on the database and control-versioning it?
Witch static webpage generators, your non-technical editors get all the benefits from editing flat-text files with markdown and git, instead of relying on a sys-admin to watch the state of the database for them.
JAMstack is not about "everything is static", it's about "everything is encapsulated behind an API and implemented with the best technology available".
The JAMstack pattern allows storing static content as editable flat-text files, and dynamic comments in a database without mudding everything within the same CMS code; it's just a better separation of concerns.
>and now suddenly we reach the obvious conclusion of "wait, why the hell did we re-engineer everything?
Generating non-changing content statically for speed and SEO beforehand and using dynamic components where necessary doesn't seem like a bad trade-off.
I guess fully dynamic server-side rendering (with a cache in front of it) would be the easiest to manage, but not hip anymore I assume.
I had to read the whole "storing comments in GitHub repos, triggering builds, etc." thing a few times. I feel like we've left the realm of what's reasonable here.
I collided into a similar shortcoming with search. I wound up creating an ElasticSearch instance, which has so far worked great, but was an incredible hassle compared to a traditional CMS+frontend like WordPress.
Were I to require comments, I would probably pursue a similar solution — a minimal cloud server with a bare bones comments API. Is this not the obvious solution? But as a newbie to JAMstack, I was definitely stunned to learn that headless CMS providers like Contentful and Sanity do not appear to provide services like this. (please correct me if I'm wrong)
In your case and for search, you could either have gone the propietary route with algolia.io, (awesome DX, might get hefty bill if you grow a lot).
Or, you can go elastic, which I've heard is somewhat a bit hardware-hungry mostly to fitting everything into ram?? (gross over simplification on my part)
Also you can use elastic cloud or any other cloud providers branded elastic service.
You are correct, Elastic is a RAM beast. Fortunately the data I had was in the low hundreds of documents. Can't recall why I passed on Meili
Algolia… the other thing about JAMstack is, it's a bit tiresome how so many JAMstack solutions are paid services. I don't begrudge anyone trying to make a buck — I am too, after all — but the level of community, support, and rate of improvement just doesn't keep up with a really good open source project. Try to get help with a Wordpress issue vs Contentful.
Also their pricing seems to think that customers are either free-tier devs or enterprises who can afford hundreds or thousands of dollars a month for their services. Most of the people I deal with look at a $25/mo Squarespace package as reasonable and they're not wrong.
I won't consider JAMstack "of age" until we have an open source headless CMS on par with Contentful or Sanity.
Hey thanks for your answer, yes I also do feel that way about the paid-ness of JAMstack and related tools, but oh well we live on a capitalist society afterall, and for every venture backed project there's an indie one!
I can personally recommend PrimeCMS, it was my introduction to open source and what make me discover also AccountsJS (Which I contribute to) and graphql-modules and all the awesome @theguild graphql tools, which are actually open source.
How I see it, is nice to be able to use those free tiers to develop MVP's and have a clear plan of moving out of those once the bill gets too expensive... That's the game for me at least...
just today a retool open source alternative was in the homepage, so there's room for everyone here I think!
What JAMStack means, is more layers of abstraction, but an easiness of getting started too, you can get it as simple or complex as you want anyway...
I think a lot of people assume that Jamstack sites need to be static sites through and through. I don't think this is realistic and you will be overcomplicating things for yourself if you try to do this. For things that don't change often, having a static site has obvious benefits and Jamstack is well suited to build those parts of your site. For user generated content, you are better off just storing it somewhere else and loading it dynamically.
For the (perhaps small) set of users who keep javascript disabled in their browser, I think it's fair to say that a Jamstack site gives them a thoroughly static experience.
It would be interesting to have a dynamic page for the most recent blog post which 'compiles' to a static web page subsequently. So comments are live for a while, but then become static content after the post goes off the front page.
I haven't played around with it as much as I'd like, but I was investigating IndieWeb tech for doing webmentions and comments on my static site: https://indiewebify.me/
I'm running the comments currently using https://commento.io/. It's nicely small, basically unobtrusive, and isn't Disqus which I feel has privacy problems.
About the IndieWeb, yes I know about it, and I want to use it. Partly that's why my static site is based on Hylia (https://github.com/hankchizljaw/hylia), because it has Webmentions in its roadmap. Alas! Nobody ever implemented it, and now Hylia is archived!
I don't have the knowledge of JavaScript to implement webmentions in Hylia all by myself (I'm more of a PHP developer). I could still try, but it'd take quite some time, which I don't have (I'd rather employ it on my actual project)
Thanks for sharing how you are using commento.io! This looks pretty great. It would be even better if they had a free/starter plan to get more adoption.
I saw a neat commenting implementation ran on an eleventy site where each blog post has a comment link that takes the user to Twitter and they can comment with the blog post url and at build time it fetches the comments from Twitter and renders them on the blog post.
I use the Jamstack to some extent at work (Gatsby and AWS Lambdas). I think it's an interesting technology stack with some excellent use cases (and a fair amount of hype).
I also use Wordpress for serveral small/mid sized personal and F&F blogs.
I don't think comparing the comment options in Wordpress to the comment options in Jamstack applications is fair. Wordpress is a complete CRM designed for blogs/modular websites. The Jamstack is a design pattern; it's not supposed to include the kitchen sink.
Like @qeternity mentioned, the A in Jamstack stands for APIs. The author only mentioned the ability to hosts comments in Wordpress (or another CRM). Why not roll your own comment system? Sure, that's extra work, but it's also very doable if you're building a Jamstack application (again, it's not a one-click solution -- Wordpress already exists for that).
> As a result, my own blog, which is a Jamstack site, doesn’t support comments! What do I do if I want feedback on a blog post? I add a link to a corresponding tweet, asking to add a comment there. I myself feel ashamed at this compromise, but given my site’s stack, I don’t see how I can solve it. I still like my blog as a Jamstack, though, because it’s fast, it’s free, and I create all the blog posts in Markdown using VSCode. But I can’t create a community!
I don't have a "free" solution for you. But you could use a storage option like Dynamo DB, create an AWS Lambda endpoing (with API gateway) to add/get comments, and return them as JSON to your Jamstack application. Boom. A comments system. Pricewise, it shouldn't go over the AWS free tier for Lambda. I could literally spin this up in an afternoon -- let's do it this weekend if you're in.
100% agree. Just want to point out that you can integrate API Gateway with DynamoDB directly (with some Velocity mapping). In fact here's a blog post from 2016 showing just that - the use case being a comments API: https://aws.amazon.com/blogs/compute/using-amazon-api-gatewa...
But you could use a storage option like Dynamo DB, create an AWS Lambda endpoing (with API gateway) to add/get comments, and return them as JSON to your Jamstack application.
This is also what I was thinking. But let's continue that train of thought... Now your site is a hybrid of static and dynamic content with two separate systems (probably a static site builder plus this serverless comment system). Why not go all the way to a CMS?
I personally don't think of Jamstack sites/applications as being 100% static. The core nature of the Jamstack is the ability to extend functionality with APIs/microservices (jamstack.org have a diagram example: https://d33wubrfki0l68.cloudfront.net/b7d16f7f3654fb85723603...)
Having separate systems is (at least in my understanding and experience) a core design feature of the Jamstack.
Your question is valid. Why not go all the way to a CMS? If the author wants dynamic features AND doesn't want to build them himself, he might want to reconsider Wordpress.
Because that's not considered cool anymore and doesn't give you the opportunity to play with lots of different tools for no reason other than over-engineering.
The other comment mentions a technically valid point about separation of concerns and delegating maintenance to separate teams (essentially the same value proposition as microservices), but in the real world, is this an actual problem for 90% of websites out there, especially when talking about simple, personal or small-business websites? I don't think so.
I would say that what most people commenting on this thread don't realize are the benefits of storing static content as code in plain text files.
Text content in a database is unversioned and only accessible through SQL queries in sophisticated dedicated clients; while content in markdown files can be changed with plain text editors and treated just like source code, getting all the advantages of branching, diffing and merging versions among multiple users.
Think about whether you'd like to work with all your source code stored inside a CMS like Wordpress instead of VCS like Git, and you'll begin to understand why Static Website Generators are a good thing for the people responsible of updating the content.
I wanted comments on my blog/website (maybe more as an academic exercise than on the expectation that someone would actually comment) but wanted to keep it as low-maintenance and dependency free as possible. As the site is build with a static site generator (Zola), it would need to be an SSG friendly system.
The code is already hosted on Github, so I created a separate repo for the comments where each post would get an issue. Zola will pull all the comments on each issue on built time and embed them on the respective blog pages. A webhook on the repo will trigger a built when a new comment is made.
Can't say this system is battle tested yet, as there's been nary a comment posted, save for the couple test ones by me...
The underlying tools changes, but peoples' brains don't.
People aren't great at keeping many things in their head at once. A stack that massively expands the number of different technologies a full-stack web developer (working alone) has to keep track of is going to lead to decreased productivity.
JavaScript obviously has a big long life ahead of it, but I doubt that the Jamstack will outlive Wordpress.
Thanks for posting this. I've been working on a CMS for a project I've been developing and it was originally based on some common JAMStack principles but a while back I forecasted some of these roadblocks. I've had doubts since then but seeing someone describe the environment like that solidifies some of my thoughts around its limitations.
There are no silver bullets, every architecture has trade-offs. JAMStack isn't failing at anything, it's users are failing at picking the best tool for the job.
The whole JAMStack thing feels like a lot of hype propped up by loss-making free plans from providers such as Netlify. It's no longer considered "cool" to have servers so we now impose artificial limitations on ourselves to not run any server-side code what-so-ever even when the problem at hand (like managing comments) requires it.
It's a major technical regression for the sake of hype and being "cool", potentially fueled by misunderstandings about good old server-side code. "Server" doesn't mean underpowered crap on AWS that will bankrupt you if your site is popular - dedicated servers or VPS with unmetered (or at the very least capped) bandwidth still exist and are affordable, and "server-side-code" doesn't mean disgusting PHP code that constantly needs patching; use a proper framework and you most likely won't have to worry about patching for years.
I wish more people would look beyond the hype and actually use the best technology to solve the problem at hand. In this particular case, JAMStack feels like over-engineering for the sake of it that doesn't solve any real problems in the majority of cases.
Amen. A properly configured and hardened VPS on a service like Digital Ocean or Linode can run and vertically scale your app well into profitability. It’s really not that hard to manage a server with Nginx, Php (or whatever) and Mysql (or whatever).
After mastering those basics, any obfuscation layer built for “ease of use” was actually limiting to me. With a few exceptions like Laravel Forge. But that essentially auto-manages a VPS with a Laravel app for you. You still have root access to Ubuntu.
I get what you are saying, but on the other hand, there is a need for static website. Not every site needs a backend. There are use cases where a static site is a simpler and more efficient solution that a wordpress site for example. Jamstack got popular due to a need, it wasn't just a hype.
Like a few of you I get the sentiment in this, but disagree pretty hard. Wordpress commenting is a minefield, and from my experience has many issues - particularly around moderation. A lot of the suggestions in the comments here show there are a tonne of methods to integrate comments into a statically published website. Yes most of those rely on server'ful' implementations but you'know what that's ok! I've been following 'serverless' and 'JAMStack' and whatever for years now and I think it is at a point of existential crisis. On the one hand you have the purists that want everything to exist in cached buckets otherwise it doesn't count. These people are taking the 'serverless' vibe a little too seriously for my taste. Yet on the other hand you have things like Nuxt, Next and Sapper - yes more frameworks - but these 'meta-frameworks' embrace the great things about static content alongside the benefits of dynamic APIs. Some of the stuff that Vercel is doing is insanely good and makes it possible for small teams to implement rapidly and let ideas win out. At the core it feels this argument is a team of 8 devops, vs the two or three product people that are doing it all. I get that metal will always win, but I feel that there are compromises in technology that need to happen to get stuff made.
I have my nextJS app, both be my frontend, backend (api). and just connect via either Prisma or TypeORM to my postgres database.
You could have this pg database in any of the cloud providers who do provide managed databases and clusters.
You could also use any such serverless database, I personally like fauna.com
Every tool has it's place, from my POV as a self-thaught software engineer, the more tools I have on the toolbox, and the more thoroughly and intimately I know these tools, then I'm theoretically better positioned to choose the best option available (as of my knowledge) for the task at hand.
I switched from WP to Hugo 3 years ago (no Jamstack), and I don't miss the slowness of WP, the ever-present risk of getting hacked and the incredibly convoluted and poorly documented spaghetti nature of WP plugin and theme development one bit.
58 comments
[ 0.77 ms ] story [ 137 ms ] threadTied to community building, is there a Jamstack solution for forums? This is a very similar use case to comments.
Generating static content and saving to a CDN is just a really inefficient way of caching dynamic content.
Disagree; updating your content when (and only when) it changes sounds a lot more efficient than dynamically generating whenever it's requested and then putting a cache in front of that.
Witch static webpage generators, your non-technical editors get all the benefits from editing flat-text files with markdown and git, instead of relying on a sys-admin to watch the state of the database for them.
The JAMstack pattern allows storing static content as editable flat-text files, and dynamic comments in a database without mudding everything within the same CMS code; it's just a better separation of concerns.
Generating non-changing content statically for speed and SEO beforehand and using dynamic components where necessary doesn't seem like a bad trade-off.
I guess fully dynamic server-side rendering (with a cache in front of it) would be the easiest to manage, but not hip anymore I assume.
Were I to require comments, I would probably pursue a similar solution — a minimal cloud server with a bare bones comments API. Is this not the obvious solution? But as a newbie to JAMstack, I was definitely stunned to learn that headless CMS providers like Contentful and Sanity do not appear to provide services like this. (please correct me if I'm wrong)
Or, you can go elastic, which I've heard is somewhat a bit hardware-hungry mostly to fitting everything into ram?? (gross over simplification on my part)
Also you can use elastic cloud or any other cloud providers branded elastic service.
I also just remembered of MeiliSearch, project found on GitHub built with Rust. https://github.com/meilisearch/MeiliSearch
Algolia… the other thing about JAMstack is, it's a bit tiresome how so many JAMstack solutions are paid services. I don't begrudge anyone trying to make a buck — I am too, after all — but the level of community, support, and rate of improvement just doesn't keep up with a really good open source project. Try to get help with a Wordpress issue vs Contentful.
Also their pricing seems to think that customers are either free-tier devs or enterprises who can afford hundreds or thousands of dollars a month for their services. Most of the people I deal with look at a $25/mo Squarespace package as reasonable and they're not wrong.
I won't consider JAMstack "of age" until we have an open source headless CMS on par with Contentful or Sanity.
I can personally recommend PrimeCMS, it was my introduction to open source and what make me discover also AccountsJS (Which I contribute to) and graphql-modules and all the awesome @theguild graphql tools, which are actually open source.
How I see it, is nice to be able to use those free tiers to develop MVP's and have a clear plan of moving out of those once the bill gets too expensive... That's the game for me at least...
just today a retool open source alternative was in the homepage, so there's room for everyone here I think!
What JAMStack means, is more layers of abstraction, but an easiness of getting started too, you can get it as simple or complex as you want anyway...
Whole classes of spam prevented...
I'm running the comments currently using https://commento.io/. It's nicely small, basically unobtrusive, and isn't Disqus which I feel has privacy problems.
About the IndieWeb, yes I know about it, and I want to use it. Partly that's why my static site is based on Hylia (https://github.com/hankchizljaw/hylia), because it has Webmentions in its roadmap. Alas! Nobody ever implemented it, and now Hylia is archived!
I don't have the knowledge of JavaScript to implement webmentions in Hylia all by myself (I'm more of a PHP developer). I could still try, but it'd take quite some time, which I don't have (I'd rather employ it on my actual project)
I think of it as the Pinboard model.
The source is open sourced but the Twitter part isn't included sadly.
I also use Wordpress for serveral small/mid sized personal and F&F blogs.
I don't think comparing the comment options in Wordpress to the comment options in Jamstack applications is fair. Wordpress is a complete CRM designed for blogs/modular websites. The Jamstack is a design pattern; it's not supposed to include the kitchen sink.
Like @qeternity mentioned, the A in Jamstack stands for APIs. The author only mentioned the ability to hosts comments in Wordpress (or another CRM). Why not roll your own comment system? Sure, that's extra work, but it's also very doable if you're building a Jamstack application (again, it's not a one-click solution -- Wordpress already exists for that).
> As a result, my own blog, which is a Jamstack site, doesn’t support comments! What do I do if I want feedback on a blog post? I add a link to a corresponding tweet, asking to add a comment there. I myself feel ashamed at this compromise, but given my site’s stack, I don’t see how I can solve it. I still like my blog as a Jamstack, though, because it’s fast, it’s free, and I create all the blog posts in Markdown using VSCode. But I can’t create a community!
I don't have a "free" solution for you. But you could use a storage option like Dynamo DB, create an AWS Lambda endpoing (with API gateway) to add/get comments, and return them as JSON to your Jamstack application. Boom. A comments system. Pricewise, it shouldn't go over the AWS free tier for Lambda. I could literally spin this up in an afternoon -- let's do it this weekend if you're in.
This is also what I was thinking. But let's continue that train of thought... Now your site is a hybrid of static and dynamic content with two separate systems (probably a static site builder plus this serverless comment system). Why not go all the way to a CMS?
Having separate systems is (at least in my understanding and experience) a core design feature of the Jamstack.
Your question is valid. Why not go all the way to a CMS? If the author wants dynamic features AND doesn't want to build them himself, he might want to reconsider Wordpress.
Because that's not considered cool anymore and doesn't give you the opportunity to play with lots of different tools for no reason other than over-engineering.
The other comment mentions a technically valid point about separation of concerns and delegating maintenance to separate teams (essentially the same value proposition as microservices), but in the real world, is this an actual problem for 90% of websites out there, especially when talking about simple, personal or small-business websites? I don't think so.
Text content in a database is unversioned and only accessible through SQL queries in sophisticated dedicated clients; while content in markdown files can be changed with plain text editors and treated just like source code, getting all the advantages of branching, diffing and merging versions among multiple users.
Think about whether you'd like to work with all your source code stored inside a CMS like Wordpress instead of VCS like Git, and you'll begin to understand why Static Website Generators are a good thing for the people responsible of updating the content.
And several third-party developers are building user-friendly CMSs on top of it.
https://mxb.dev/blog/using-webmentions-on-static-sites/
The code is already hosted on Github, so I created a separate repo for the comments where each post would get an issue. Zola will pull all the comments on each issue on built time and embed them on the respective blog pages. A webhook on the repo will trigger a built when a new comment is made.
Can't say this system is battle tested yet, as there's been nary a comment posted, save for the couple test ones by me...
People aren't great at keeping many things in their head at once. A stack that massively expands the number of different technologies a full-stack web developer (working alone) has to keep track of is going to lead to decreased productivity.
JavaScript obviously has a big long life ahead of it, but I doubt that the Jamstack will outlive Wordpress.
It's a major technical regression for the sake of hype and being "cool", potentially fueled by misunderstandings about good old server-side code. "Server" doesn't mean underpowered crap on AWS that will bankrupt you if your site is popular - dedicated servers or VPS with unmetered (or at the very least capped) bandwidth still exist and are affordable, and "server-side-code" doesn't mean disgusting PHP code that constantly needs patching; use a proper framework and you most likely won't have to worry about patching for years.
I wish more people would look beyond the hype and actually use the best technology to solve the problem at hand. In this particular case, JAMStack feels like over-engineering for the sake of it that doesn't solve any real problems in the majority of cases.
After mastering those basics, any obfuscation layer built for “ease of use” was actually limiting to me. With a few exceptions like Laravel Forge. But that essentially auto-manages a VPS with a Laravel app for you. You still have root access to Ubuntu.
I have my nextJS app, both be my frontend, backend (api). and just connect via either Prisma or TypeORM to my postgres database.
You could have this pg database in any of the cloud providers who do provide managed databases and clusters.
You could also use any such serverless database, I personally like fauna.com
Every tool has it's place, from my POV as a self-thaught software engineer, the more tools I have on the toolbox, and the more thoroughly and intimately I know these tools, then I'm theoretically better positioned to choose the best option available (as of my knowledge) for the task at hand.
https://github.com/umputun/remark42
I switched from WP to Hugo 3 years ago (no Jamstack), and I don't miss the slowness of WP, the ever-present risk of getting hacked and the incredibly convoluted and poorly documented spaghetti nature of WP plugin and theme development one bit.