Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is CakePHP modeled after Ruby on Rails?

I haven't used Rails, but I'm somewhat familiar with it. I'm more familiar with CakePHP. I get the idea that CakePHP is modeled after Rails, and they seem to have a lot in common.

But, basically, I'd like to know if patterning itself after Rails is, or has ever been, one of the goals of CakePHP? I understand it's not a port, but is Rails the...inspiration, so to speak?

And while I'm sure the answer is probably a qualified "yes", I haven't been able to find anything on the CakePHP site(s) to support that. So...citation needed :)

like image 780
Matthew Groves Avatar asked Sep 16 '09 12:09

Matthew Groves


2 Answers

Asking for a link is very appropriate, so here one is: https://svn.cakephp.org/repo/whiteboard/misc/dev_meeting/Log-2005-09-09.txt (url no longer valid - anybody have a link to a backup?). The most relevant portions are from [17:57] to [18:10]. In summary, it would seem that Cake was indeed inspired by the concepts introduced in Ruby on Rails (cf. [18:04] psychic), and has taken a more general trend towards general PHP and MVC best practices since.

Though I do not for certain know the complete answer to your question (lacking older chat logs, etc), I would guess from the comment at [18:04] pjholden that it was indeed initially modeled or patterned after RoR as you ask. The best answer could be obtained from somebody that was around since the beginning (the devs often hang out on #cakephp @ freenode.net).

like image 191
Iiridayn Avatar answered Nov 04 '22 07:11

Iiridayn


At it's beginning, CakePHP was very similar to rails yes. But they now both grow their own way.

It mean they have their basis in common :

The way their routing is managed as long as you don't include the rails resources.

The ActiveRecord-like for models in CakePHP even though Cake requires to define a list of loaded models.

The way they manage plugins even though with the limiations of PHP, you can't do as much things as you can do in Ruby (for example redefine a class method).

That's only a few examples among a lot of differences. But the idea is that yes they have a lot in common. But no CakePHP is not modeled after Rails.

like image 4
Damien MATHIEU Avatar answered Nov 04 '22 06:11

Damien MATHIEU