On Sep 18, 2007, at 11:55 PM, Flinn Mueller wrote:
I find that PHP users don't understand Rails because much of it depends on understanding the Active Record design pattern, ORM and object persistence. Some of you know I recently took a position as a PHP developer ( I hate even saying that). As a Rubyist for the last 2 years I've been running into some issues trying to apply Railsish concepts (aka best practices) in a PHP environment.
I find that since PHP isn't purely object oriented there is a tendency to use classes just to group like-functions. Also rather than passing around objects there's a tendency to pass primitives using classes only to scope methods to a particular domain...
So the question I find myself consistently running into is, if you are using PHP and you find the value in using ActiveRecord why try to break your back forcing PHP to do something it can't? Just use Ruby. If you don't see any value in the pattern or how it's implemented in Ruby, then go on using PHP, see you again soon ;-)
Yeah, that's more-or-less what I was getting at. Maybe our experiences have just been different. Most of the people I associated with as a PHP developer were essentially already doing their own ORM, just not nearly as cleanly. There was also something of a boom in ORM stuff around the time the PDO was introduced (Propel and EasyPDO come to mind). Granted, I'm sure there's a fair contingent of those who just don't "get it". I just don't tend to meet those people.
Anyway, chin up and relax about the PHP development. It could be worse. You could be programming in .... (left as an exercise for the reader).