3 ms·
Active Record (http://en.wikipedia.org/wiki/Active_record_pattern http://en.wikipedia.org/wiki/Active_record_pattern) is an architectural pattern and not someth
by xd 16y ago
Active Record (http://en.wikipedia.org/wiki/Active_record_pattern http://en.wikipedia.org/wiki/Active_record_pattern) is an architectural pattern and not something born in RoR. The parent just happened to mention an implementation (for which there are many in PHP) copied from RoR.
I'm curious, what other RoR influenced PHP framework features have you heard of?
- damncabbage 16y agoThe pattern is good. It's the extras on top of what the pattern proscribes, though, that makes Rails' implementation great, eg. composition via behaviors, easy validation and relations, and scoping for bundling sets of common query criteria. PHP implementations run the gamut from basic low-hanging-fruit-grabbing attempts (like CodeIgniter's frankly, well, weird implementation) to fully-featured ones like Yii. I do agree that they goes as far as doing most of RoR's implementation and then just... stop. > ... what other RoR influenced PHP framework features have you heard of? RoR-like routing shows up frequently as well, and in Yii's case, Views templates have the same access to both directly-assigned template variables, and variables belonging to the controller instance itself.