posted by owen on 2015-Apr-1.
â€ŽI am still hacking at code. Â I finished the admin screens thankfully, so now posts can be submitted, edited, approved and edited again if needs be. Â Also other registered users will be able to access the admin screens.
Now I am editing the layout templates, all 50 of themâ€Ž. Over the period of time that this site has been up I have improved the template engine a little in other projects but did not port them back which makes this a painstaking process of find and replace. The templates used to contain print() statements but that messed with the control flow so later I changed to having the template parts "return" their data instead of pushing it to the output buffer. Â Â So I am replacing strings, going through file by file, breaking and updating code as I go along. In some places I wish I had just used a common/shared template but alas I donot want to be implementing new features while I am refactoring lots of little files.
I should probably switch the entire codebase to wordpress or laravel but I would end up messing with dynamic routes which I already have in a bullshit free sitemap table from 12 years ago. Trying to hack them in to OOP space would certainly drive me up the wall and my productivity down the toilet. Even back then I was of the view that a web "page" is a child Â â€Žof a "website", why would I abstract the page into something else? A page has server side code, and a html template - 2 files.
Â The entire website has roughly 50 independent pages. The only thing they share are the common functions, database layer, template engine, and the current user. Â On the flip side in other systems a page is a subset of an entire system of controllers and parts and plugins and crap. So any page you touch is like reaching into a bag of scorpions.
Anyway I don't want to rant on and on about technical details and software architecture. I will probably write an article about it later. Sooner or later I had to get down into the old code. Â â€Ž