Posts that have the tag "objects"
MySQL objects
I was working on my blog objects organization paper this morning and I suddenly came to the realization that I was passing MySQL objects from the database class to the other classes in the program. I've been working rather hard to keep my classes as separate from each other as possible, so this came as a shock when I realized that I had been working completely counter to my goal.
So, I think I'll work on taking MySQL objects and transferring the data from the arrays that are returned and placing the data into a newly instantiated object. When I return a collection of items, I'll transfer them into an array of instantiated objects. Though, I need to insure that the data maintains its integrity. I wouldn't worry about Java doing such a thing, but PHP doesn't seem nearly as reliable...
Posted on January 20, 2010 at 08:09 am. 0 comments. Tags: php mysql objects
Tags
The tags functionality appears to have been non-function for quite a while. A while ago I changed a bunch of my functions around to make the names clearer and follow certain programming conventions (such as the camel hump naming scheme). However, I neglected to change the function names in the tags file and because of this, the function wasn't working at all. The odd thing is that there were no errors to indicate WHY it wasn't working. After some judicious commenting of functions, I figured out which function was the culprit. This problem has highlighted my need to separate my functions and code into more manageable chunks with less disparities.
Posted on January 18, 2010 at 10:50 am. 0 comments. Tags: code php objects admin
No real updates
I've been slogging away at a description of objects for my blog. I anticipate it will be somewhere around 5-6 pages long and will take a bit of time to organize before I can finally start coding. The good thing is that I already have the logic figured out in my current code (which is mostly imperative). The hard part is figuring out how the objects should interact with each other. I'll try to enumerate everything a little later.
Posted on January 11, 2010 at 02:45 pm. 0 comments. Tags: admin php blog objects website
Objectifying my Code
I'm considering objectifying my PHP code on my website. Right now, my code is mostly procedural. I knew what I wanted to do with my code and I did it from beginning to end. For the most part, this has been just fine.
However, as of late, I've been tweaking a large chunk of my code to optimize the way it looks AND to minimize superfluous commands. The problem I ran into is that I was starting to create functions that were common to a LOT of my code. At first, I wanted to merely create a utilities file that I would include. But, now I'm thinking that creating a few objects and classes would go even further to helping me out with the output of my data.
