{"id":81,"date":"2008-01-25T17:27:44","date_gmt":"2008-01-25T23:27:44","guid":{"rendered":"http:\/\/fefnet.com\/blog\/archives\/2008\/01\/25\/ruby-on-rails-and-cakephp\/"},"modified":"2008-01-25T17:42:25","modified_gmt":"2008-01-25T23:42:25","slug":"ruby-on-rails-and-cakephp","status":"publish","type":"post","link":"https:\/\/fefnet.com\/blog\/2008\/01\/ruby-on-rails-and-cakephp\/","title":{"rendered":"Ruby on Rails and CakePHP"},"content":{"rendered":"<p>This past week I&#8217;ve spent some time evaluating CakePHP and trying to compare it to the things I&#8217;ve learned in Ruby on Rails. I checked out CakePHP over a year ago, and I admit I didn&#8217;t get into it as much as I had hoped. Having dealt with Struts while using Java, I felt at home with both in terms of their MVC nature and I have no desire to go back to life without a framework. Because\u00c2\u00a0<a href=\"http:\/\/redhanded.hobix.com\/cult\/railsClonesBloodsuckersOrUsefulDrones.html\">CakePHP started out as a Rails Clone<\/a>, they share many advantages:<\/p>\n<ul>\n<li>Convention over Configuration &#8211; Each framework tries to follow a set of standards in filenames, controller names, and so on so on. When I work on a site someone else designed using a framework, I know where things go and I can familiarize myself with that application much more quickly.<\/li>\n<li>Don&#8217;t Repeat Yourself &#8211; Specifying code in one place means that you only have to change it once should it need updating.<\/li>\n<li>MVC and a focus on &#8220;<a href=\"http:\/\/weblog.jamisbuck.org\/2006\/10\/18\/skinny-controller-fat-model\">Fat Models<\/a>&#8221; &#8211; Separate models, views, and controllers make life easier down the road when it comes time to switch to a new system that has a new database or when you want to make a fancy interface for an iPhone or the next new thing.<\/li>\n<\/ul>\n<p>There are many other advantages to each, but let&#8217;s move on to the differences and disadvantages of these frameworks (keep in mind that this is from a somewhat unexperienced perspective, please let me know if these don&#8217;t convey the whole truth):<\/p>\n<ul>\n<li>CakePHP isn&#8217;t as mature as Ruby on Rails. Migrations aren&#8217;t fully integrated and the feature set seems to be a few steps behind Rails.<\/li>\n<li>CakePHP isn&#8217;t as easy to deploy as Ruby on Rails. This might matter more for larger applications, but I haven&#8217;t seen anything like\u00c2\u00a0<a href=\"http:\/\/www.capify.org\/\">Capistrano<\/a>\u00c2\u00a0in Rails.<\/li>\n<li>Documentation is somewhat lacking in both. I had a hard time getting going using only tutorials that I found online. Rails has some great books, but I haven&#8217;t found any for CakePHP (although the tutorials and my familiarity with PHP made things easier).<\/li>\n<li>Ruby is new to me. In my opinion, it has a higher learning curve than PHP (possibly because I already knew Java before learning PHP).<\/li>\n<li>There are far fewer hosting solutions that provide good Ruby on Rails support. Although it&#8217;s pretty easy to get both up and running (especially for the lucky users of Mac OS 10.5), good hosting is pricier for Rails applications.<\/li>\n<\/ul>\n<p>With all that said, there&#8217;s no way I&#8217;d like to go back to plain old PHP for developing a website. Things have come a long way even in just the past year for both of these frameworks, so I hope to keep learning them both. In the meantime, though, I&#8217;m devoting more of my time to Ruby on Rails, simply because I&#8217;m actually finding it fun to code in Ruby (and the\u00c2\u00a0<a href=\"http:\/\/www.rubyquiz.com\/\">Ruby Quiz<\/a>\u00c2\u00a0is something I wish my programming classes had been) while PHP never had me quite as excited.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This past week I&#8217;ve spent some time evaluating CakePHP and trying to compare it to the things I&#8217;ve learned in Ruby on Rails. I checked out CakePHP over a year ago, and I admit I didn&#8217;t get into it as much as I had hoped. Having dealt with Struts while using Java, I felt at [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-81","post","type-post","status-publish","format-standard","hentry","category-tech"],"_links":{"self":[{"href":"https:\/\/fefnet.com\/blog\/wp-json\/wp\/v2\/posts\/81","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fefnet.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fefnet.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fefnet.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fefnet.com\/blog\/wp-json\/wp\/v2\/comments?post=81"}],"version-history":[{"count":0,"href":"https:\/\/fefnet.com\/blog\/wp-json\/wp\/v2\/posts\/81\/revisions"}],"wp:attachment":[{"href":"https:\/\/fefnet.com\/blog\/wp-json\/wp\/v2\/media?parent=81"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fefnet.com\/blog\/wp-json\/wp\/v2\/categories?post=81"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fefnet.com\/blog\/wp-json\/wp\/v2\/tags?post=81"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}