How the Jamstack is failing at comments
leoloso.com
leoloso.com
Tied 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.
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.
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.
Whole classes of spam prevented...
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...
The source is open sourced but the Twitter part isn't included sadly.
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.
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...
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.
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.
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.