It's been such a long time since i wrote something here that it is embarrasing. But at long last here it is. I am going to be moving on to another company really soon as a flash developer. A slight variation on my Job Description at my current job but I love writing code and well it's a developer role so there you go.

I have also been doing a lot of pro-bono freelance work on www.mokocharlie.com. I really don't know what I did before OOP, the whole process has been a lot easier than i thought it would. I decided to build my framework loosely around MVC. Classes separate from views , separate from forms, and then handlers - my term for controllers i suppose. Take a look when you have the time. Although there is still work going on around it, it is largely very usable.

I just thought I should share this with people finding backward compatibility in PHP5 class definitions a problem. If you are using constructors in your classes in PHP5 i would assume the constructor would look like
function __construct(){
...
}
in PHP4 you would actually have to name the constructor after the class. so that it would look like
class myclass{
function myclass(){
...
}

and if you really want your class to work in both environments then you can define both so that it looks like this
class myclass{
function myclass(){// PHP4 constructor
// all the wonderful things you want to happen
// as soon as the class is instantiated
}
function __construct(){// PHP5 constructor
$this->myclass();
}

I found this out the hard way after moving a site to a PHP4 server after developing in a PHP5 environment. Luckily these were the only changes I had to make since OOP has become my friend now along with google.
Now that I have broken the silence i should be able to blog a bit more frequently now.

Tags: