Why I didn't switch to WordPress
Fri 9 Mar 07 14:38 | Tags: Blogging, Meta
As it says in the sidebar to the left there, the blog script that Ray Gun Robot uses is called Serendipity. Far more common in the blogging world among host-your-own scripts is WordPress. Though Serendipity is quite capable, it's occasionally buggy and doesn't quite have the momentum and community that the hugely popular WordPress has. I was considering switching to WordPress; for a while, I had a working WordPress installation on my computer and was in the process of converting posts over (WordPress can automatically import posts from some other blog scripts, but not Serendipity). In the end, though, I decided against it and will be continuing to use Serendipity for the foreseeable future. Here's why.
WordPress requires MySQL
Web applications typically use some sort of database to store and retrieve information. The most common database type is MySQL, for whatever reason; it's capable, but rather unspectacular. MySQL works via a client-server methodology; a MySQL server must always be running, and the clients, such as the blog software, connect to the server, manipulate the data, then disconnect. The data is stored by the MySQL server in a data directory containing several files which Thou Shalt Not Touch for risk of fouling things up (that is, corrupting the data) by your very presence. If the MySQL server should ever crash or otherwise go down, then clients cannot connect to it; the crash of a single MySQL server will break all applications that need to use it.
The database type I prefer is SQLite. SQLite stores all of its data in a single file; this file can be moved around, copied and deleted just like any other file on the disk; it makes backing-up the data much easier. Also, there's no clients or crashable servers involved; the SQLite software is all self-contained within the application or scripting language interpreter that needs to use it, so as long as the web application itself can run, it'll be able to access the database. It's also marginally faster than MySQL at some operations.
So needless to say, I think SQLite is a better choice in most situations. WordPress, however, requires MySQL; you aren't able to use any other database type with it. Serendipity, supports both SQLite and MySQL, as well as PosgreSQL, another client-server database type. WordPress breaks what is commonly considered good practice in web application design by allowing only one type of database.
WordPress does not have true templates
Both WordPress and Serendipity are written in PHP. PHP is a programming language which allows you to mix HTML with programming code. For example…
The square root of 64 is <strong><?php echo(sqrt(64)); ?></strong>.
This will output…
The square root of 64 is <strong>8</strong>.
However, it's considered bad form nowadays to write major PHP applications which mix HTML and PHP code like this. The "best practice" nowadays is to keep your HTML pages and your PHP code separate, and to use a templating system to connect the two. The templating system lets you take values from the PHP code and insert them into the HTML "template," without actually putting PHP code into the page. This avoids the visual messiness that occurs when you're essentially constantly switching back and forth between two coding languages; HTML and PHP. Also, in the case of someone who is, say, a web designer but doesn't know much about PHP, using templates will hide all the meaningless (to them) PHP code from them, as well as make it impossible for them to accidentally edit and break the PHP code; all that vital code will be in an entirely separate file.
So if we're using a templating system, the above example would instead be done with a PHP code file that looks something like this…
$template->answer=sqrt(64);
Then the template file would look something like this:
The square root of 64 is <strong>{$answer}</strong>.
This is a simplistic example, but I hope you get the concept.
Serendipity supports templates like this. It uses a powerful templating system called Smarty, which I personally like to use for my own projects. WordPress's "themes," however, use HTML files with PHP tags spread throughout. Why is anyone making a major web application in 2007 and still doing this? This, along with WordPress's immutable requirement for MySQL, is a fundamental breakage of good web application design, and makes me wonder if the people behind WordPress are perhaps more amateurish than one would think.
Serendipity has better image handling
I try to use a lot of images with Ray Gun Robot; I think I don't use enough most of the time. All the image handling is done via Serendipity. There's an "Add media" page in the "Administration Suite" which lets you upload images into the "media library." You can upload more than one image at once, and sort the images into various sub-directories. (Though the media library is ostensibly for images, it can handle other media as well.) When an image is uploaded, Serendipity will create a thumbnail by scaling the image down to a user-configurable size. Images are added to posts by clicking the "Media" button on the post editing page and selecting the desired image from the media library. You can select if you want to insert the thumbnail or the whole image; if you want the thumbnail to link to the larger image, to another address, or to nothing at all; whether you want the image to align to the left or right of the text; and whether you want the image to be in a box with a caption, as is shown to the right.
WordPress has a media library feature like this, but it doesn't work nearly as well. For one, thumbnail sizes are not user-configurable; it's hard-coded so that they cannot be wider or taller than 128 pixels. If you want larger thumbnails, you have to find the relevant function in WordPress' many PHP files and tweak it by hand. (You'll notice that thumbnails in more recent entries on RGR are larger than those in older ones; I've increased the thumbnail size through Serendipity's administration suite a couple times.) WordPress only lets you upload one image at a time, and does not support sub-directories. It does not let you select how the image should align with the text, and, most painfully, it does not let you add a caption box; those things have to be done by hand.
…But Serendipity isn't flawless
So those are the major reasons why I think Serendipity is still a better fit for me. That doesn't mean I don't want to see some improvement in Serendipity, however. As I mentioned above, Serendipity has some strange bugs sometimes; for example, the Dream Hosed article here was originally entitled "DreamHosed," as one word (like its subject matter, DreamHost). However, for whatever reason, when the title was one word like that, the text of the entry would not show up on its entry page. I also once had a strange server error occur whenever I tried to put two images in a particular entry. One image worked fine, and two images worked fine in other entries, but in one particular entry, I could only add one image or it would screw things up. It was frustrating.
Serendipity is also fairly poorly documented. The Documentation section of the site is a mess, making it hard to find the information you're looking for. (Will it be in the FAQ? In "User documentation?" In "Technical documentation?") Some information doesn't seem to be documented at all, such as template tags; you have to pick the meanings of the tags up by basically copying what other templates are doing. It can be frustrating. There's an official IRC channel for getting help, but it often seems to be just full of "lurkers" who never chat; I was there for about an hour and a half last night, occasionally asking for help, but although there were around fifteen people in the channel, I was talking to myself the whole time. So the support community could use some growth.
I also preferred the way WordPress handled categories/tags; with WordPress, you can create new tags directly from the post editing page, just by entering them in a text field, separated by commas. In Serendipity, you must go to a specific Categories page in Serendipity to create them, and you can only create one at a time. (RGR does not currently use tags, but I'm considering implementing them.)
I guess the best thing to do, if you are trying to choose a blog engine, is to install both Serendipity and WordPress (and whatever other scripts you wish), use them both for a while and see which one suits you best. But having done that myself, I've found that I'm not interested in following the WordPress herd; I'm sticking with Serendipity for now.
Get more great Ray Gun Robot content sent directly to your feed reader or email inbox! Subscribe today!
Articles & Links — Via Email
Articles Only — Via Email
11 Comments | 0 Trackbacks |
| ![]()
Trackbacks
Comments
You seem locked into Serendipity, but that's cool. Every software needs it's own users and developers base. I'm just a user of WordPress, not a coder, and I never touch that backend stuff. I tweaked some CSS, but when I want additional functionality, I search for a plugin. For me, that's the beauty of WordPress.
If you dont want to run with the WordPress herd, there is also Habari. It's being started by a pack of WordPress renegades, who were fed up with the upper dudes calling all the shots about what gets implemented in each release. It's fairly new and it looks like it supports your databases.
#3 | Masim "Vavai" Sugianto | 22 Mar 07 20:08
I'm S9y user. Wordpress is one of nice & great blog engine, but it doesn't fit to everyone. I used S9y for it's simplicity, complete plugins and until now, proud with quick response from Garvin Hicking, author of S9y.
Recently I heard my wordpress crashes my host's server.. that's why I'm thinking about changing to another blog platform. I agree with most of the things you said, except WordPress does not have true templates. PHP is a script language that was designed to be a template system for text files, it's PHP's main purpose. It's only now when PHP start to do lots of stuff unrelated to it's original purpose, but it is still the fastest template system because all other template system have a abstraction layer that will eventually turn themselves into PHP opcodes.
#5 | Anthony Campbell | 30 May 07 07:56
I used WP for about a year. Then it stopped recognizing my password and in spite of repeated attempts I could not resurrect it, although I could still access the data base.
I have had no proboems with Serendipity since Feb 2005 without problems.
> I also preferred the way WordPress handled categories/tags; with WordPress, you can create new tags directly from the post editing page, just by entering them in a text field, separated by commas. In Serendipity, you must go to a specific Categories page in Serendipity to create them
it is right, to add a category you need to do this on a special page. But this is good: categories can be hierarchically nested - so by typing it into a text-field you cannot configure it right.
But
> with WordPress, you can create new tags directly from the post editing page
tags can be created by this way in s9y, too. Of course!
#7 | Garrett Albright | 22 Aug 07 11:11
tags can be created by this way in s9y, too. Of course!
Really? How? Is this a new feature which maybe isn't in my version of s9y? (I really should upgrade one of these days…)
#8 | someone | 23 Jan 08 12:34
dude, i haven't read all of it, but come on, you actually like smarty? it's buggy, slow, and useless. for blogs, there's no need for such stuff, using php inside the template is perfectly fine.
#9 | nadav | 23 Jan 08 12:36
Oh. and try to handle >5K posts with SQLite. I dare you.
#10 | Garrett Albright | 23 Jan 08 15:06
Smarty is buggy: Really? Hmm. I've been using it for years and have never encountered any bugs I can recall.
Smarty is slow: No, it's not. Considering what it does, it's quite fast, actually; and when used right, it won't noticeably increase a page's load time at all. And if you use its caching feature, it is of course much faster than using no caching system at all.
Smarty is useless: It may seem redundant in that it does something PHP can already do on its own, but it does it better. Therefore, while it's ultimately unnecessary, it is by no means useless.
Using PHP inside the template is perfectly fine: Well, I guess it's a matter of opinion. But common best practice in programming is that the presentation aspect of a program should be well separated from the logic aspect of it. You'll be hard pressed to find proficient coders that argue otherwise. But then again, the unfortunate fact of the matter is that a relatively low percentile of PHP coders seem to be really proficient at it… resulting in crap like OSCommerce, which I'm currently struggling to design a template for at work.
Oh. and try to handle >5K posts with SQLite: I'm working on it. With the frequency I post, it might take a while. Are you implying it won't work? SQLite for some reason has garnered a reputation of not being a capable RDBMS, but even for that many posts, it will perform just fine. The upper limits of a database size where SQLite becomes impractical is several gigabytes. It takes a long time to write that many blog posts, even for someone as long-winded as me.
#11 | Jeremy | 29 May 08 07:15
I think serendipity is terrific. Without the Spartacus plugin system it would not be anywhere near as good as it is. It's easy to theme, you can addin plugins simply, static pages are simple to operate. Hopefully it will continue to constantly improve.


#2 | Garrett Albright | 9 Mar 07 23:58
Serendipity has its own plugins. There's the one that lets me (and commenters) format posts using Markdown, and I just finished setting up another one that handled static pages through the blog itself, so now the About & Contact page more closely matches the rest of the site and I won't have to change them "by hand" when I tweak the templates.
If WordPress works for you just fine, there's no need to switch.
I hadn't heard of Habari before. It looks like it hasn't yet had a public release, so it's probably not near ready for prime-time. But I'll keep an eye on it.