Do you think that Smarty, or Zend Framework, CakePHP and all these frameworks are just a "trend"? I know I've spoken to some people who said
they just come up with their own MVC......
Frameworks (smarty isn't one by the way) are not just a trend. For larger projects, if your not using one of the existing frameworks your going to end up pretty well writting your own anyway. May as well start with a good solid base.
Ok, one last question. Do you suggest any one over the other? The only 2 frameworks I'm aware of are Zend and CakePHP....
I'm still trying to understand the difference between a framework and a templating engine like Smarty...
A couple of general comments:
1. When dealing with performance you *MUST* have a tool that helps you profile. As you already indicated, somehow you are doing more *queries* which has nothing to do with OOP. But in general, you need to have some tool that lets you isolate things and do timings to know what is taking up time.
2. Is PHP OOP slower than not procedural code? Yes, although the overhead especially in PHP5 is marginal. Would the use of Oop vs. non-oop be noticeable on a human perception level? No.
For most developers the reason to use OOP is that it lets you write better more reliable and functional code. Often it would be near impossible to write and maintain a large non-oop system without global variables and spaghetti. Not that oop is a panacea, but it does offer things specifically designed to make code modular. I will make a comment on your use of autoload. Autoload does not come without a price. The price may be minimal, but if you don't absolutely need autoload, you are better off implicitly doing require() statements at the top of your scripts.
In regards to PHP/Mysql frameworks:
The big 3 right now in my opinion are:
-CakePHP
-Symfony
-Zend Framework
Each takes a different philosophy.
Symfony was designed to provide and compete with the benefits offered by Ruby on Rails. What it does it does really well. It offers the most holistic package of features in a framework. With that said, you really have to use it the way it was designed, and there's a lot of black magic in there. People either love or hate the yaml configuration stuff for example. We found there were some things that didn't work the way we wanted, and figuring out what to do when we hit the wall, involved just reading the code, and some of it wasn't very modular. You have to invest time in looking at all the seperate projects they used to cobble it together and understand those individually.
CakePHP is the oldest of the three, and has a great community. It does offer a lot of the same benefits as Zend Framework and symfony but it was originally developed in PHP4 whereas Symfony and Zend are PHP5 only. It is the only framework that I don't have direct experience with, so I don't want to discount it out right without having tried it personally.
Zend framework is the newest and is just starting to hit its stride. It is the only one that had the design goal of offering a library of components as much as a framework. Probably it's the one I would use right now, but it still is evolving. Expect a learning curve that includes reading code. The documentation is ok, but often will have an example that scratches the surface and really doesn't show you what you want to actually do with it. Despite the "Comes from Zend" (not really true, it comes from various people in the PHP community but was partially financed by Zend) it does represent the best practices of PHP and PEAR.