Creating a Custom Blogging Platform
Thinking about creating a custom blogging platform.
- Part 1: I Am Never Satisfied With This Site
- Part 2: Talkin’ It Through – Supabase or Appwrite
- Part 3: Blogging with Rich Text
- Part 4: Using Astro for Display
This is going to be a real niche post, so I won’t be offended if you need to avert your eyes if your vision becomes blurry while reading.
One thing to know about me is that often times when I say “I might” I really mean “I will”. Normally this pertains to purchasing (“I might buy a totally unneeded peripheral for my computer”) but in this case it pertains to trying my hand at writing my own blogging platform. By saying “I might” I am off the hook should I start a project but not finish, which I suppose might be some kind of psychological hobbling I might look into later (that’s a hard “might”, not a soft “will”, BTW).
It quickly dawned on me that to write a blogging platform, I do not need to reinvent the wheel because there’s a whole industry of wheel-reinventors already out there. I might have talked about Google’s Firebase before (I know I have, but I’m not sure I’ve done so recently). This is a suite of services that includes authentication and authorization integrations, database, and file storage — three things that a modern blogging platform requires. I had been using Firebase in another project that is still in limbo, but I managed to get it working just fine except for the fact that I was only using the authentication and authorization part because Firebase is not free and I didn’t want to end up paying Google to use their database setup as well.
Later, during a completely unrelated spin around the Development Web, I saw someone mention Supabase, and while reading about Supabase I saw someone mention Appwrite. Both services do the same things that Firebase does, but each a little differently, but between the two of them they seem to do things more or less the same way. Both offer cloud-based hosting but both can also be self-hosted, albeit with some noticeably missing features no doubt intended to push users to pay for the cloud versions. Supabase uses Postgres as its database, which I have never used and which I’ve been having a hell of a time finding engaging information on; its SQL and conventions are just a bit off-center from what I’m used to using and when a product is that close to what I am familiar with, the gravity throws off my ability to absorb the information. Appwrite uses a NoSQL-style data store which I generally abhor, coming from a relational database background where “DRY” is the name of the game. Since both platforms have some parts that I am disappointed in, there is some mathematical law which allows me to disregard those parts, as in “I guess I’ll have to figure it out no matter which one I choose”.
Do I shoot straight and roll my own everything, retaining complete control over the implementations and choose which back-end platforms I want to use? Or do I go with one of these all-in-one solutions? If the latter, which do I choose? Should I learn Postgres, or suck it up and work with a NoSQL system?
If I’m being honest, I do not want to write my own everything, because that way lies madness; these products fulfill a painful niche, and knowing they exist it would be bonkers to set them aside and go it alone, potentially extending the development time and generating unnecessary frustration. Supabase seems to have wide support, and as I know SQL and relational database paradigms I know I can come to grips with Postgres, but that makes my code potentially Postgres specific unless I bake in a level of cleverness that would allow me to swap to another back-end. Same with Appwrite, but being NoSQL the entire database can be managed through code as opposed to dashboard which I feel would allow for a quicker and easier transition to a cloud-hosting version should I require it.
3 Comments
Nimgimli
August 15, 2024 - 7:16 amI don’t really understand NoSQL systems. Are they just plain text files or is it a database that just doen’t use SQL or is it something else entirely? My first thought was, how is search going to work? I’m not sure anyone uses local search these days anyway, though.
Scopique
August 15, 2024 - 7:36 amYes, NoSQL are basically text files. The benefit is that you don’t need to define a table schema ahead of time, and you can have a variable number of columns. If you find later that you need to add another field, you can just include it in the code and saving a record will add that field, but only for records going forward. So there’s also the case where you would need to account for columns that might not be in all records.
Because NoSQL uses files (and some light database tropes to make it work LIKE a database), there’s no real good concept of relationships between those collections of files. Some platforms CAN handle it, but they all say that it degrades performance. Querying the data is standard, though: no database would be any good if a user had to manually cycle through all records to find what they were looking for!
Nimgimli
August 15, 2024 - 8:07 amFunny how things come full circle, eh? I remember running an online forum way way back when and every message was a text file sitting in one of a bunch of nested folders. That was before mysql became so ubiquitous. Now we’re back to text files!
Comments are closed.