Spring Cleaning
Spring is in the air and for many people that means it’s time to give the apartment or the house a good cleaning. I’ll probably do that one day before next Christmas as well, but I decided to start with cleaning the backend of this site. There has not been many updates lately, and I would like to be able to say that I’ve been working on the site’s backend, but I can’t. Because I haven’t. What have I been doing? I don’t know for sure.
I’ve been thinking about implementing a Twitter-like social awareness feature. Of course I could just use Twitter, but I don’t wanna. At least I’d use their APIs instead of the HTML widget they provide. I also want to merge the Moblog and the rest of the entries, since moblog entries are basically just like all the other entries, they’re just smaller and with a picture attached to them.
The main challenge with all this is the current database structure and the PHP code the builds the site you see. Everything’s a real mess because the codebase and the database have just been extended and patched as I’ve had the need to implement more features. Just the merging of the Moblog entries with the rest of the entries is going to be a huge pain in the ass to accomplish as it is today.
So I guess it’s time for me to look at other ways to do this. A new backend is needed, but it’s very unlikely that I will ever find the time or motivation to build everything from scratch one more time, so instead I’ll use an implementation that already exist. The number one choice of the blogsphere these days is WordPress. With its recent 2.5 release, I see no reason why it shouldn’t be my choice either. I’ve considered the WordPress move before, but my conclusion back then was that it would be too much work. As you probably understand, I’ve now realised I’m digging a hole that I will be able to climb out of if I continue using my own custom built system.
A quick search on Google reveals that there are a lot of open source content management and blogging platforms available, but the sheer user mass of WordPress means that some clever coder probably already has made the features I need that are not part of the standard installation. And if that’s not the case, there is a fair change I can manage to build it myself, since everything is PHP.
Wish me luck. And buy my stuff!
Feedback
Do you have any thoughts you want to share? A question, maybe? Or is something in this post just plainly wrong? Then please send an e-mail to vegard at vegard dot net
with your input. You can also use any of the other points of contact listed on the About page.
I can warmly recommend WordPress. It’s a rather old codebase, and written in PHP, so much of it is pretty bad. Not at all as horrible as 99% of the other open source PHP systems out there though, like phpBB which shines as one of the most outstanding and shining examples of a codified mix of FUBAR, sewer, hell and nail-pulling.
Some of the newer code in WordPress is actually pretty decent. I still wish they could break with the PHP4 requirement so we could get proper classes all around, but you get accustomed to the "wp_" prefixes rather quickly.
What’s WP’s strength, the way I see it, is that it’s so easy to extend. It’s got events (or so-called "hooks") for just about anything which you, through plugins, can hook into. On top of that you’ve got a very solid theme system where you can start out by just replacing the CSS file, then moving on to replacing the index.php template (which is just a straight PHP file with no fuzz) and from there replacing just about every file that will ever be presented to a user of your blog.
This way you can alter just about anything and everything from looks to administration functions in WordPress, and it’s all completely separated from the core WordPress files which can be securely overwritten whenever a new version comes out and you want to upgrade. No need to bring out your favorite diff tool to see what’s changed since the last version, because your modified files stays untouched.
Pretty neat. And as you mention, "everybody" uses WordPress, so the community is large. The guys running it are also very helpful and not elitist like many other FOSS communities can suffer from. An initial move is always PITA, but the data model is extremely simple and almost all database operations have corresponding PHP functions you can use to simplify the transition. the "wp-include" folder contains a lot of files yet containing tons of functions you can have fun with. Good luck and don’t hesitate to poke me on messenger if you get into trouble! I can also recommend irc://irc.freenode.net/wordpress :-)
PS: Sorry for the spamming, but I really detest your 1000 character comment restriction and do everything within my power to ignore it! ;-)
Thanks for the info. Now all I need is for someone to write an importer for my current database structure and I’m all good to go.
Unless your current database structure is absurdly complicated or so simple you’ve denormalized it to a two-column, one-tabled layout, I think it shouldn’t be much work. With the MySQL Query Browser tool I even think you can connect to the two different databases simultaneously and do selects and inserts in the same session. Not 100% sure about that, though. If that’s not possible, you can always just install the WordPress tables inside your existing database, migrate your data, export them, set up the new database and do an import. Easy as pie. :-)
Knock Knock… Anybody Home??? The silence is beginning to turn eerie with each passing day…