Tuesday, March 1, 2011

Which PHP framework is most like Ruby on Rails?

Which PHP framework should I choose if I want to be able to develop in both PHP and Ruby and Rails without having to make too much of a mental jump when I move from one to the other? It does not have to be an exact copy, but should have most of the basic features of Rails.

That is, it should include similar routing (either /controller/action/id or RESTful); similar model method names (find, findBy); similar helper methods (linkTo etc..); similar validations and similar conventions with regards table names.

From stackoverflow
  • Akelos may be what you are looking for.

    : Maybe. I'd be interested in comments from anyone who is actually using Akelos (or other PHP copies of Ruby and Rails) and Rails itself - and whether they find it easy to switch between the two.
  • CakePHP is essentially a port of ROR to PHP.

    Caffeine : I agree, the names aren't all the same obviously but the concepts mostly are.
    CodeJoust : CakePHP is also... but not quite as good as rails because they (Still!) support php4, making for some odd necessary class syntax. I think that ruby is a much better language to base a platform on, and develop with, but is slightly harder to deploy (unless you use heroku). I also don't think it's quite as elegant... the command line generators, and the User Management takes awhile to understand.
  • There is also CodeIgniter. Tried it a few years back and I thought it was pretty nice. The documentation is great.

  • I would say CakePHP is more Rails-ish in its approach. CodeIgniter is another wonderful PHP framework, but not quite so Rails-ish.

  • I would say Cakephp, if u have to write an app and coming from Rails, it'll be a lot easier to adjust your development compared to other php frameworks.

  • Currently, the PHP framework that mimics Rails best must be Maintainable Framework. It is essentially a directly ported version of Rails and features a lot of the goodness from Rails (ActiveRecord, Migrations, generators, routing, view helpers etc.) using the same directory structure, so you should feel familiar. Don't think it is so widely used, though.

0 comments:

Post a Comment