Which PHP framework is closest to Ruby on Rails? CakePHP? CodeIgniter?

In my experience with both PHP (5+ yrs) and RoR (1+ yr), CakePHP is the closest MVC framework to Rails that I have found for PHP That being said, there will still be conventions to learn/unlearn and differences between the frameworks, but if I were taking on the task of bouncing back-and-forth, I'd use CakePHP.

In my experience with both PHP (5+ yrs) and RoR (1+ yr), CakePHP is the closest MVC framework to Rails that I have found for PHP. That being said, there will still be conventions to learn/unlearn and differences between the frameworks, but if I were taking on the task of bouncing back-and-forth, I'd use CakePHP.

Here's an old (April 2007) Ask Metafilter that had some folks contributing frameworks to look at: CakePHP, Symfony, Mojavi, Code Igniter are the PHP MVC frameworks recommended. They suggested CI and Symfony over Cake.

CakePHP has one major flaw that I think makes it dramatically less useful as a MVC framework: the Model layer does not use Objects to represent data (which is to say, it does not actually implement the active record pattern). Because of this, associations like HasMany are less robust, and it's much less obvious how to keep model-specific code from creeping to your Controller layer. Symfony, at least, does not have this problem-- they use a third-party active-record implementation called "Propel.

The lack of model objects in cakephp is a bummer. ORM results are arrays which cannot benefit from relations, lazy-loading, or anything else useful. – Xeoncross Aug 5 '10 at 22:56.

Actually someone is creating yet another Rails clone in PHP: A PHP framework that "tries" to live up to what the good guys did with Rails, without the brain damaged results that the Cake PHP guys did. Personally I'd go with Akelos: it's more mature and closer to Rails than its main competitors. CakePHP was inspired by Rails, as I pointed out in an old article of mine, but it's inherently very different.

CodeIgniter is simpler, but does the job.

I would argue "most like Ruby on Rails" is a silly reason to choose a framework. PHP is not Ruby, and while it sounds nice having a PHP framework that works "just like Ruby on Rails", because the two are different, it'll never be the same.. I would recommend CodeIgniter because I found it a far nicer framework to use (compared to the others I tried), but my point is, try a bunch of frameworks and see which one you like the most!

1 +1 I've developed a few applications in CodeIgniter and a few in RoR and found that I can make applications faster in PHP than I can in RoR. Guess it's just personal preference really – WarmWaffles Sep 7 '10 at 2:48.

Have a look at Akelos, it seems to be a strict port of Rails.

CakePHP is the closest. Your models/views/controllers directories will be the same. All of the concepts like routes, active record, plugins, and scaffolding are similar.

The active record implementation supports associated models (one-to-many, many-to-many, etc). This is something that is lacking in other php ORM implementations. I have coded projects in both CakePHP and Rails.

In my experience, CakePHP is most similar to RoR. However, I must point out that Ruby and PHP are very different languages; RoR wouldn't be the same if it were PoR. Each language has its strengths and weaknesses, and Rails plays on Ruby's strengths.

Trying to take advantage of those same aspects of a different language that may not, then, be strengths will result in a framework that leaves much to be desired. I think your question should be, "Which PHP framework is the easiest to use. " I'm sure your head won't explode if you have to learn two different ways of doing things.

Beside everything that is said one should consider that a php-framework will never act like RoR can. So, a good php-framework should not try to copy RoR but to do things the php-way while using most of the patterns that makes RoR sexy. I personally prefer cakePHP because it offers a lot of functionality while being user-friendly (read: developer-friendly) and therefore it should not be compared with CodeIgniter.CI is more like a basic-framework for MVC-Patterns missing a lot of features to build an application easily.

To compare CI and cakePHP a little bit, think of that: cakePHP is driven by a bunch of people doing nothing else but building cakephp (+ using it for some projects which makes it even more practically orientied). CI is just a by-product in the development of expression-engine.EE itself is a remarkable piece of software but I would not say that CI is.

If you are forced to use php, go with CodeIgniter. It's fast and easy to work with. It also has a wonderful and smart community of developers (codeigniter.com/forums).

If you are not being forced to use php, make the jump to ruby.It's a wonderful language with many wonderful frameworks.

You'll love our Sapphire framework, giving you contemporary object-oriented goodness, focused on building database-driven websites. It runs on PHP (5.2+) so it's easy to learn and to find webhosting. They just won the "most promising open source CMS award"!

I've got a few years experience in RoR and I have investigated most of the PHP frameworks for a PHP project I was working on and CakePHP came out the closest to Rails that I could find. The best part of Cake is that they've emulated most of the great designs and time savers Rails has.

You may look at yiiframework. Com it is a good framework. Yii inherits spirit of conventions over configurations of Ruby on Rails.

As a Rails developer with experiencie using CodeIgniter and CakePHP, I could tell that CI 2.0 does not have any of the magic that Rails have. CI deprecated the scaffolding or generate resources feature that could help you have your app up & running as fast as in Rails, and neither as much useful libraries as there are gems. I would not recommend you to use CodeIgniter if you're trying to feel the sturdiness of a web framework like Rails.

CakePHP has more restrictions and is slower than CI, just like Rails.

You might want to try FUEL - It's a relatively new framework but has reached 1.0 Final! Features look pretty awesome such as a CLI called OIL for RAD and performing routine tasks. You should definitely check it out and read through the docs.It's built by an amazing team which have been involved with CodeIgniter, Datamapper, PryoCMS, ExiteCMS.

I too would recommend Code Igniter. It has less restrictions than CakePHP and runs a little faster.

Beside everything that is said one should consider that a php-framework will never act like RoR can. So, a good php-framework should not try to copy RoR but to do things the php-way while using most of the patterns that makes RoR sexy. I personally prefer cakePHP because it offers a lot of functionality while being user-friendly (read: developer-friendly) and therefore it should not be compared with CodeIgniter.

CI is more like a basic-framework for MVC-Patterns missing a lot of features to build an application easily. To compare CI and cakePHP a little bit, think of that: cakePHP is driven by a bunch of people doing nothing else but building cakephp (+ using it for some projects which makes it even more practically orientied). CI is just a by-product in the development of expression-engine.

EE itself is a remarkable piece of software but I would not say that CI is.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions