Friday, March 28, 2008

PHP Vs Ruby

Ajax: Rails and Symfony both use Scriptaculous and Prototype. CakePHP
does, but you have to download and install it separately, which, to
me, calls into question how well they're integrated.

Authentcation: CakePHP has a built-in system, but that system won't
fit all needs, so you'll end up writing custom code anyway.

Caching: CakePHP only has view caching.

Database versioning: None in CakePHP or Symfony, though Symfony has an
XML file for each db table, and, I suppose, you could svn them and
have versioning that way. Migrations in Rails are superior.

Environments: No real separation of environments (prod/dev/test) in

Console: None in CakePHP. Symfony and Rails, yes. If you want to use
Rails and you think you won't use the console, you're wrong. Once you
understand the power, you'll never want to debug without it.

Testing: Little integrated testing. It produces some stubs when you
"bake" a project, but I prefer how Rails puts those stubs there when
you're creating models and controllers, right from the get-go. (More
on this below.)

Join models: None in CakePHP. Rails has HABTM and has_many :through.
All tables are models in Symfony, so that's almost the same. More
like HABTM with extra info in the table. Propel, Symfony's ORM
engine, is actually quite interesting. (Though, I prefer

Form validation: Good in all frameworks, but there are some extra
steps involved in dealing with invalid form data in CakePHP.

No comments: