Do go overboard on OOP. I used to have the attitude of "why should I instantiate all these objects for a script that will run for less than a millisecond?" and now I know why. It helps my programs practically write themselves.
The thing you need to ditch is MySQL, not OOP. If you want to persist objects, use serialize() and unserialize() with flatfiles. I've been doing stuff like this for a year now, and my scripts are blazing fast:
PHP Code:
class AnObject {
var $unique_id;
function AnObject($unique_id) {
$this->unique_id = $unique_id;
$this->save();
}
function save() {
$fp = fopen($this->unique_id . '.dat','w');
$data = serialize($this);
fwrite($fp,$data);
fclose($fp);
}
}
// The following assumes $unique_id is provided
// and that it refers to a specific persisted object.
$filename = $unique_id . ".dat";
if (file_exists($filename)) {
$my_obj = unserialize(file_get_contents($filename));
}
else {
$my_obj = new AnObject($unique_id);
}