Mat Schaffer on 18 Sep 2007 18:26:25 -0000 |
On Sep 18, 2007, at 11:59 AM, Colin A. Bartlett wrote: Randy Schmidt wrote:I wanted to try to emphasize things that would hit home with PHP developers...so if anybody has ideas, I'm all ears.Migrations RJS / other AJAX coolness
It's not a framework thing, but one item I often bring up when making the PHP/Ruby comparison is handling of static (or class) methods. PHP makes it basically impossible to implement an interface as seamless ActiveRecord. I expect this would be a hard topic to broach in a presentation, but consider it if you're hanging out after and someone tries to tell you rails could be written in PHP. Example: ==Ruby== class Papa def self.foo "I'm a " + self.to_s end end class Kiddo < Papa end Kiddo.foo # => I'm a Kiddo ==PHP== class Papa { public static function foo() { return "I'm a " . get_class(); } } class Kiddo extends Papa { } Kiddo::foo(); # => I'm a Papa _______________________________________________ To unsubscribe or change your settings, visit: http://lists.phillyonrails.org/mailman/listinfo/talk
|
|