So much for learning, really, I’m the type of person that prefers reading than practicing because I find it “useless” if I understand how it’s done and how does it work. Yet, it seems I’ve been going around in circles on how to implement some things. Not that it really affects me in any way, but it does make me wonder.
A few days ago, I started refactoring some classes in OpenType Threads, to make it more flexible when it comes to extending the class. I’m still on the planning phase, well, almost to end the planning phase. All this just to make the library flexible-many people might find it boring on how objects will depend to each other. The truth is, it’s fun.
Now, what do I mean about “the necessary evil”? I started creating a gallery web app (or script, I prefer “web app”), using Doctrine ORM and a few ideas I planned on using in OpenType Threads. Thing is, without planning, the whole script is just a bunch of disorganized classes with incoherent function names and descriptions. It certainly doesn’t have a Dispatcher because well, in the end I’m here to see the “truth”, or what I interpret as “truth”, what do I mean? Easy, as I go implementing my ideas there is a possibility that the way I thought of the implementation was erroneous.
Another implementation was the “MVC” wannabe method I created, it runs solely on “actions” and “views”, and quite messy too. I like it though, it does the job well, even for all the mess I did in the views object. It even has helpers! Although those helpers aren’t so helpful… (long story of a mess I created)
Once I start seeing the workflow, I sit down and reflect on what I just did and how to improve it (it’s important to always have a notebook with you, or notepad, seriously. I usually do this a week later so I can flush all biased thoughts). I’m still ignorant and inexperienced in many things, perhaps because of my stubborn attitude. That aside, grabbing a paper I start thinking of what I need and how will I process it.
Sorry if I’m not making much of a sense, I’m writing this quite slow and I get interrupted here a lot (I’m in a library).
It seems like an overkill having such a kick-ass ORM like Doctrine in a gallery script, of course not! The reason I used Doctrine ORM was to get familiar with it. After all I’m going to use it in OpenType Threads, and so far this ORM is…. made of pure awesomeness. The issue I’m now having is with autoloading classes and prefixing Doctrine ORM classes to avoid possible conflict.
I’ll say this though, I’m going to make amends for all the mistakes I’ve done. I just saw myself locking up the door of new possibilities and throwing away the key. Well, it’s not too late to caught up and become a decent php programmer. Well, it’s not like I’m going to care what other programmers will say, did that mistake once. Point is, I don’t want to create something that is going to become a mess in the future, better learn now than later, and refactoring is a pain in the ass sometimes. Releasing code to offer solutions to others or because you feel like is not bad, despise possible bugs which is always expected, it’s just trial and error.