Be practical
By tushar
Sometimes it takes time and distance to realize that the pain you went through was worth it despite it being the wrong decision and solution.
In 2006 or 2007, or maybe it was later than that, I took a stab at building yet another CMS framework in PHP. I wanted the framework to be a bit more general than that and the CMS was simply an application that would run within a framework. The first actual application built on the framework was a process management system used by an electrical and utilities company. What I was most focused on in the framework was the template system and how to disconnect from the concept of one http request mapping to a single page output type. I also wanted to be able to cache the output to improve delivery speed.
At the time mobile sites started gaining significant importance and I wanted to build a template system that would handle arbitrary data to provide the best fit output. By best fit output I didn’t mean: if desktop show this page and if mobile show this page. Rather I meant that a particular request would generate a particular output that would then, based upon conditions, attach itself to a series of templates to produce some output. Actually, let me describe the full process…version 1:
- Insert full process
When I was developing it I felt I was onto something. It was also a rather complex system that didn’t function at all until it had been fully written. I spent several nights writing it and when I was done and it worked it felt like something fantastic. I was very excited about it even as I spent all of the extra time building the templates and creating the output triggers for a request.
If I recall correctly the first app used the Yahoo UI framework (YUI) and worked reasonably well. It was simple in how it generated content but it was brutal to debug as well as enhance. That didn’t deter me from version 2 in fact it encouraged me. The reason why I was encouraged was for a couple of reasons: I hired two computer scientists who loved the theoretical aspects despite the actual impracticality of development. Theoretically at some point we’d have all of the templates we’d need and the ones we didn’t would be trivial to write. At the very least after an initial development hump there would be diminishing returns as you could construct new pages from existing pieces.