3 ms·
When I was first learning Ruby on Rails as a proficient PHP programmer, the company I worked for landed a largish (for us at the time, given there were only two
by adriand 17y ago
When I was first learning Ruby on Rails as a proficient PHP programmer, the company I worked for landed a largish (for us at the time, given there were only two programmers in the place back then) contract for a web application. Since I was just learning Rails, and I needed to be highly productive on the project, I recommended that we use CakePHP so I could use my PHP skills. I figured my co-programmer, who loved Rails, would acquiesce due to the presence (at least) of an MVC framework, and I was right.
I've regretted that decision many times. Not all MVC frameworks are created equal, and I can say from painful experience that Rails is far superior to CakePHP. We got the job done, and I may have been right that I was more productive in PHP back then than I was in Ruby. But three years later, it is far more difficult to get things done on this web app than if it were built on Rails.
I'm not one to engage in language wars, and I still enjoy coding in PHP. But if you want a great framework, I'm still not sure you can beat Rails, and I really don't think there's anything in the PHP world that can.
- trevelyan 17y agoJust out of curiosity, what problems did you run into specifically? I adopted CakePHP for similar reasons and haven't run into any issues that have made me regret it, although I did leave standard development practice for a few reasons that have made caching a bit more difficult than otherwise.
- adriand 17y agoSorry, I tend not to notice when people respond to my comments, it'd be great if this site had an easier way of letting you know when people do (maybe I'm just not aware of it?) Anyway, the main issues I ran into were all related to database queries. This application was not a standard CRUD-style app at all, it has a lot of pretty complex queries for building reports. I found the way that CakePHP deals with joins and associations really clunky and hard to use compared to Rails' ActiveRecord. I'd often have to write the raw queries and try to shoehorn them into CakePHP's ORM objects. I just found myself frequently frustrated with the way it was working. It's been too long since I really worked on it for me to be able to give much more detail than that (also, it probably has improved a lot since then too). That said, using it as a web framework still made coding the app a heck of a lot easier than it would have been without it. Also, I found that it really improved my PHP skills, I picked up a ton of good stuff from using it.