Introduction to Flat-File CMS
buttercms.com
buttercms.com
Proprietary plugin code serves the need of the purchaser to feel special by getting something customised for them. They can then pretend it's a secret sauce for their business, despite it actually impairing employee productivity compared to, say, stock Wordpress.
It’s not vanished; here it is: [redacted]/doc/groupware.html
(JWZ has anti-HN measures on his site.)
https://web.archive.org/web/20050217051819/https://www.jwz.o...
It seems that the so-called “vanished” article would be more appropriately named the “disappeared” article.
It's really interesting to see a new generation of vertical specific, large scale CMSs emerge (like from publishing with Chorus from Vox[0] or Arc from the Washington Post[1]).
My problem with 'Enterprise CMSs' was always that they tried to sell one hammer for every single type of nail, and actually, use cases for content management are so varied (and often specific to verticals) that you buy a big generalist CMS and end up having to customise and mess about with it so much you're always left in the situation you described.
[0]: https://getchorus.voxmedia.com [1]: https://www.arcpublishing.com
* No need to dig through dozens of plugins to find the one that actually works. Since "EnterPriseCMS" is .NET, you can just write your own!
Guess what? That's the problem that the SQL databases already solve.
So, to circumvent this, I searched for a database that can be version controlled but doesn't require a separate database server. And I found one - SQLITE.
It's been amazing so far. It can be inside my GitHub repo, while giving me access to normal SQL queries via my ORM. With a static file solution built on just flat files, complex querying is definitely not possible. With now over 30,000 posts in the SQLITE database, my static file generator is still absolutely fast.
I now use my solution for a high traffic client with 3-4 million visitors a month and it works really well for them.
One downside of SQLITE is multiple concurrent writes, but so far it hasn't been much of a problem yet.
This isn’t a reasonable claim. In SQL databases if you want to do this, you have two options:
1. Go through and update every row to add a value for the new column—which you can do in flat files just as effectively, though almost certainly more slowly because files are comparatively slow.
2. Define a default value—which you can also do in flat files just as effectively and just as quickly.
In this vein, I tend to find the problem to exist in precisely the opposite direction: you need to apply some sort of transformation to all the database entries, for example to update a markup pattern or links to a certain domain. If it’s flat files, you can use standard text-processing tools and easily do anything (presuming you’re a developer). But if it’s in a database, you probably need to go through some database driver which will probably be a pain to deal with for anything involved, and there’s a fair chance with this style of app that you won’t even have access to that and will just be completely stuck.
For the likes of blogs, I hate having to deal with database-driven apps. Give me a set of files that I can work with every time.
Notwithstanding all that: 30,000 posts is quite a bit as most flat-file systems go, and a well-architected SQL database certainly should perform somewhat better than a well-architected flat file system, simply because the overhead per record in a database is fundamentally lower.
Things like migrations and batch operation and revision management just tend to be way more flexible on flat file systems.
Sure, all of these can be maintained with static files as well. And that's what we did initially. But, over time, it becomes a maintenance nightmare. Plus, nothing like going into a nice fluid UI and checking/unchecking checkboxes. One common argument is these interfaces can be had with flat file CMSes as well. But then, you will end up re-writing an ORM for the filesystem which goes back to my original problem - SQL databases and their ORMs already solve this problem.
It's easy to think flat file CMSes when you're dealing with small files. When dealing with over 30,000 posts, you need to find that file in a directory, open it up and you'll see a totally different structure of the file compared to the most recent ones. They lack consistency. In a database, if I added a new column all old values will be prefixed with null. But the columns are the same for every entry, unlike a static file CMS.
Finally, think also about complex queries. Have you seen Wordpress's queries? To generate a simple Navbar menu, you will make so many joins. Especially if you are trying to render menus under different categories (eg. on category pages).
Or, how about displaying related posts? It's much easier to query an SQL database, to get something related to the current post. Good luck doing that on 30,000 files whose contents reside inside of the file itself. There's no argument here.
All I'm saying is, we tried all that flat file CMSes have to offer. At a scale of 30,000 (now it's actually close to 50,000) posts, it's no joke. In fact, we plan to open source our flat file CMS'es ORM. It's great for small blogs. But for big publishers, you need to use a hybrid approach.
Don't you then miss out on human readable Git diffs when posts are changed? And now you can't edit posts with a standard editor or e.g. the GitHub web UI?
Also, what language are you using? Shouldn't reading in 30,000 posts and building some stats/relationships/lookups on them be pretty fast?
You never got those with wordpress either. Seems like they're going for some kind of hybrid. Trading some of the simplicity of standard static file generators for some of the power of a tool like wordpress.
I quite like the idea.
Nothing to stop them from storing historical versions in the DB, then it wouldn't be much more logic for the site generator to spit out the site at X point in time, or a diff. Whether that's a feature you'd want is another thing.
> what language are you using?
"re-writing the core of Wordpress to Elixir"
No way all of the myriad vendors in the headless-CMS world survive this downturn.
I think that needs to inform any CMS decision.
Ultimately I suspect there will be vertical integration at play with the companies raising money to be the Wordpress of the 21st century. Wordpress is a CMS after all.
After about a year of paying €8000 a month for hosting they replaced it with one really good 100% custom WordPress theme.
There is the type that just saves its data in file form, just like you would in a db. And I never get why this would be desirable. You loose all the benefits of a db system without gaining much.
The other type, the interesting one, is the one where you can work directly on those flat files, not needing some kind of admin interface. Now this can be great!
But it often seems more flat-file cms belong to the former category. I do not know why one would prefer these if you still need a server with a dynamic language and a web interface to edit content. Just use a db!
I never heard of headless API CMS Systems before, but it honestly sound really silly. If you write a front end that consumes JSON, you could just as well write a front end that made db calls. And if you must have JSON, write a wrapper around your db. Having that stuff hosted by someone else is just peak cloud nonsense.
I am not sure I understand; could you please explain? That sounds like working directly on flat html files; or are you talking about working directly with a DB that then writes to flat files?
Thanks!
You put markdown files in a folder and it creates html for you when the page is requested. When you use their web based admin tools, they also just change the markdown files. Easy to use from web and local.
I guess many static site generators work the same and we had good success teaching our content creators some markdown. For many, it is often easier than navigating something like drupal and working with the kinks of whatever WYSIWYG editor.
Either way, is it as simple as you’re making it out to be?
Of course, that then becomes a much bigger discussion about websites vs apps and the current state of the web which we have on here quite regularly.
one that stood out at the time among flat-filers was textpattern -- not sure if the very yellowish branding was the reason.
databases won over flat-files though. primarily because the web needed to scale. it is also worth mentioning sqlite which at the time was, and still is, a perfect middle ground.
The same approach is used with big flat file sites. Editing on dynamic portion and viewers see cashed site.
Many big sites actualy use cmses as static site generators. But cashing is not that different.
[0]: https://golang.org/pkg/text/template/ [1]: https://gowebexamples.com/templates/
You could just do:
<div data-copy-content-from="#about-page .profiles"></div>
And that would go into your about page, copy the content from there, and insert it into the current page.If you built it out well enough, you could do everything using just static HTML and CSS files and just syncing the content whenever it changes.
I've been thinking about this idea for a while. I even started my own framework to try to make something like this work. I'd love to know what other people think.
You don't need to reinvent anything. Just use what used to exist.
(Also, you start doing SSI, and then you want a bit more power, so you switch to PHP, then before you know it, you go all out with PHP and MySQL. Finally, you say, "MySQL sucks, SQLite is much better and easier" (see also the other comment about SQLite).
In the end you realize that nothing matters. We all die alone in the end.
I'm not just looking for static includes, but dynamic, real-time, editable includes built in to a framework that uses a single syntax to describe a full web app. I'm tired of using full programming languages for describing app data — and how it can be edited — when so much of what a web app can do has already been implemented a billion times.
PHP is great for that, but, in my opinion, is 500% more powerful in areas that don't count (low-level language constructs that make it Turing complete, but not ideal for building real-time, editable web apps) and 10% as powerful as it should be in areas that do count (i.e. performing higher level tasks automatically, like structuring data, syncing data between pages, moving data around, rendering data to the page easily, etc.).
Could you point me to any resources on XSL that would make a good starting point? Or any XSL libraries that help you produce dynamic web applications?
Or if you are old-school, PHP templating, you can do a simple: `<div><?php include('about.html'); ?></div>`
This is how I did most of my static files website 10+ years ago. I had an `index.php` file that based on URL will load the content of an article. This is what PHP was created for.
Any good resources you'd recommend on that? I've been looking around and it seems like a lot of projects are still in the early phases.
Also, yes, PHP is awesome. Just not built for the modern web. Still is a really impressive language, however. I just wish there was a PHP equivalent built specifically for building dynamic, real-time web applications.
Using HTML alone ended up being too cumbersome. I needed a single source of truth that I could serialize the data into and JSON ended up being perfect.
I'm still holding out hope for a single XML-like language that can describe web apps in full, however. The tools we use now are way too broad and powerful compared to what you end up implementing with them 99% of the time.
File-based config made scripting the generation of the configs pretty easy and updating for changes by just overwriting the files and reloading the daemon.
IIRC, similarly TWiki also uses individual files for the pages and configs with RCS (Revision Control System) per-file to track changes.
Apply the "web server" class to a node and there is nothing to forget as the relevant config templates are applied both to the monitoring system, the backup runner, and anything else.
Configurations that live in a database somewhere is much harder to manage as they have to be set by a config running which needs to be written and maintained.
Aside from questions of ACID, I get the idea that a lot of people jump to databases because they're uncomfortable with file operations, frankly. But obviously they make sense for other use cases - what is the decision matrix? Just a gut feeling?
I wouldnt build ecommerce site with flat-file because there is lot of tabular repeated data like orders, customers, products.
But for content sites its perfect. Simpler and flexible. Its awesome for site builders with different blocks of structured content.
Worth noting that with flatfile you can use sqlite for those repeated records and other way around many sql dbs support json columns that you could use similarly to flatfile/nosql.
- dynamic wiki backed by a folder of markdown files
- dynamic CMS backed by single SQlite file
- classic dynamic CMS which dumps pages as files while editing, effectively making them static on reading
If you want just markdown > website with some administration to edit you can use pretty much any flat file CMS. Kirby CMS is highend but you need buy license. Grav is ok open-source option but i don't like the admin part too much but its atleast active. You can find many more https://github.com/ahadb/flat-file-cms but flatfile cms often becomes pet project that people stop maintain so watch out for activity.
outdated article/spammy