How to make OO code not bloated in PHP?
Quoting Selkirk in another thread:
One of the main concepts of OO programming is the coupling of the data with its procedures.
My working definition for bloated in PHP is:
Loads code that does not get used, loads data that does not get accessed, or performs calculations that do not contribute to the final product while servicing common or simple requests.
The question is how can we be able to create OO applications in PHP without them being bloated (comments are a secondary problem imo)?
I see two options:
1) Use some persistency layer (ala SRM). Which introduces further problems as can be seen in http://php.weblogs.com/discuss/msgReader$2677
2) Invent some crazy way of converting classes and methods into procedural code during deployment
Any other way?