Refactoring the weblog
I started to refactor the weblog a couple of days ago. The reason for doing this is to clean up the mess and switch to a clean OOP approach. The blog will still be written in PHP 4, but for my purposes, the OO capabilities of version 4 is sufficient.
What I've done (or plan to do) is this.
- Introduce an object hierarchy for the blog and pages.
- Move all pages into the database. The current system has some HTML files (e.g. the about section) that tends to get out of date. This means a whole new database structure which in turn means data migration, which in turn means headache..?
- Refactor everything to a MVC pattern that is more obvious than it is in today's system.
- Drop the support for markup in comments since no one uses it.
- Upgrade to vForm 2.0
- Improve the search capabilities on the site. I haven't decided whether to keep it simple or do something similar to NTK's search or the thesis blog.
- Rewrite the javascripts used on the site.
- Tweak and polish the interface. I plan to get rid of sIFR to speed things up, change some fonts (e.g. I plan to finally make some decent code blocks) and rearrange some minor things. However, I strive to change as little as possible cause I'm still quite happy with the clean look.
The way I write classes in PHP is similar to how I write them in Java. This means I am using easy-to-understand (i.e., long) function names, getters and setters and camel-case variables and functions. The approach is in turn based on the one I used when developing www.ntk.umu.se, but takes it one step further by introducing more real OOP. In NTK, I simply used static classes to have a namespace in which functions was group.
It still remains to see when the refactoring is completed. These kind of projects tend to grow and grow and grow...
Post your own comment
Pages linking to this entry
Pingback is enabled on all archived entries. Read more about pingback in the Pingback 1.0 Specification.
No pingbacks.
