Code Like It's 1999 With Dolphin CMS
Published: 12/02/2009
Brain Dump, Programming, Rant
It’s interesting how life can throw you a little too much coincidence. For example, I was having a nice conversation (with a pretty smart dude) where it was mentioned how much more painful development on large projects used to be back in the confused days of early PHP. Then life decided to highlight this little message with a project using Dolphin 6.1 from Boonex.
The work came from a client that had a straight-forward install of Dolphin. She wanted to customize it a bit to make it a little more user friendly; nothing too difficult. Before the project came to me the client had gone the usual route of hiring someone on the cheap who ended up not being up to the task and was, subsequently, left high and dry. This left me with a project that had some of the work started, but not finished, which added to the pain a little but Dolphin sure has it’s own ways of ruining a mood.
In case anyone else has the misfortune of having to work on a Dolphin CMS project I thought I’d highlight just what you’re in for.
The Good
To be fair, for as bad of a nightmare Dolphin CMS is as a project (compared to coding standards in today’s landscape), it does have one or two(ish) redeeming qualities.
For one thing Dolphin CMS has a pretty logical directory structure. Looking for the language file? Why it’s in the “lang” directory of course. Looking for a class? Just check out the “inc/classes” directory. Admittedly, this is a small thing if you’re using a modern IDE but I still appreciate it (so many programs I’ve ran into lately don’t even include this level of logic).
Dolphin CMS also has what can only be called an advanced admin panel. This thing allows you to customize all sorts of areas including the content of pages as well as the layout of the pages. I had a lot of fun playing with that thing. This is double edged though because it serves no practical purpose if you want something unique and cool. For newbies though I think this is a nice feature to learn about the possibilities for a website.
The Bad
Right off, Dolphin CMS is PHP 4 compatible. This is just silly; it’s fucking 2009 already and Dolphin CMS using PHP 4 as a baseline is probably more to blame for the rest of this list than anything else. If you’re going to use old technology why not use old coding standards? In that situation I imagine complacency and laziness would come naturally.
Then there’s the use of short tags in Dolphin CMS. I admit to having a problem myself with maintaining this standard (it’s still natural for me in a template file) but it’s irritating if you have short tags disabled in your ini file.
Another offense: inline HTML and PHP together ALL OVER THE PLACE. You can’t hardly open any file, seriously, any file, without wanting to tear your eyes out of your skull from the cluster fuck in front of you. Add to that the confusion in that the system has a template system (see below) Dolphin CMS just doesn’t use it for the parts you’d actually want to change. Gave me a headache when I would think about it.
As mentioned above there is a template system (of sorts) but it doesn’t actually templatize anything. I guess it’s more of a layout system but considering the majority of templates only had header, footer and content references it’s a poorly utilized one. To make it even worse though Dolphin CMS uses a hard-coded, numerically indexed, naming convention. Want to know what template file you’re file is using? Just open up that file and look for a variable called “$_page” and use the value as a reference. Seriously, why would you use a number instead of something meaningful like the name of the file (or similar)?
Back Pedaling
I just got done working with Dolphin CMS so, yes, I’m a little raw. Wah; I know. Still, the fact remains that Dolphin CMS is one of the biggest pains in the ass to work with that I’ve run into in quite some time. It’s not too complicated to work on, it’s structure should be familiar to anyone who’s worked with PHP ten years ago, which is it’s biggest issue. You have to dumb yourself down to work with. And for the love of god don’t try and abstract anything.
The most heinous thing though is that Boonex actually charges for this filth. Real money too. Crap can be excused if it’s free but there’s nothing worse than paying for a box full of horse shit.