The OO in Rails continues to leave PHP for dead, and OO brings many advantages to a thriving development community. There are real advantages to being able to share code between both the must-be-real-time web front-end and the non-real time backends, and to be able to easily reuse whatever external open-source libraries save you time and effort.
Now, I have no idea about the first part. I am not an OOP guy. But, what I have issue with is the idea that for code to be reusable, it has to be OOP. So, if I am a college kid or young PHP developer, I would read this and think "Oh, so, to reuse code or share it, I have to be using OOP". Man, this is just so dead wrong and irresponsible. Can someone tell me why only OOP can be reused? Why can't people write sane functions that can be reused? I do it every day. They do it in C all the time. Our front end web servers run the same code base as the cron jobs that do a wide variety of things. They use the same libraries. They use the same objects (yeah, i use them when they are a good idea).
Please, someone explain this to me.
(I have a half written post about how you can write good, maintainable, reusable code without OOP. I have not finished it yet, but I guess I need to. It seems the world is going to OOP hell otherwise.)
Sebs Says:
Just writing
class {
}
isnt oop ;). No matter what useless discussion takes place above: its different and the last 10 years should be enough time for everybody to learn about oop and .... stop ... this is a php discussion .. yeah ;)
The solution is: THIS IS intended behaviour, we already know everything, the others are wrong AND
THE CAKE IS A LIE !!!!