How difficult is it to switch from CakePHP to Ruby on Rails?

Over the past 2 years, we have been building a web application using CakePHP. So far, we are very pleased with CakePHP and consider it great. We appreciated Ruby on Rails before launch, but decided on CakePHP because our team was more experienced with PHP / MySQL and it was harder / more expensive to hire RoR developers.

We’ve been thinking about RoR lately because:

  • Many successful new web applications are built on RoR and most look beautiful and easy to use.
  • The user base, documentation, and ability to find answers for RoR seem to be more than CakePHP.
  • PHP comes with so many flavors that developers often come close they know CakePHP, but they are actually PHP programs and do not adhere to CakePHP convention.
  • Ruby on Rails was created thanks to a successful business that relies on a code base. Therefore, we believe RoR will improve faster than CakePHP.
  • Package management allows us to think that plugins are easier to install on RoR than CakePHP.

Given this. Our questions:

  • How hard is it for an experienced CakePHP programmer to switch from CakePHP to RoR?
  • How big is the task: to rewrite the moderate size CakePHP (strictly enforced) web application in RoR
+4
source share
3 answers

PHP is a completely different beast than Ruby. PHP is not close to being object oriented like Ruby, and this is a pretty big brain curve at first. However, I think that a reliable programmer with a good understanding of the general syntax should be able to learn a new type of syntax quite easily.

$a = new A(); 

not much different from

 a = A.new 

As for Cake, vs Rails is another monster. Development with rails is fast. Very fast. But when you convert the whole application on the fly, you need someone who can really break its components, quickly enter the nuts and bolts. This way you can put together a skeleton for everyone to “fill in”. At least, this is probably the way I will access it (although usually I will wait for the “planned” rewriting of the application to switch to a completely new language).

Having experienced RoR developers on the team (at least in the interim) is likely to significantly speed up the process and help your team work as quickly as possible. It may cost you a little more to speed up, but it will greatly increase productivity. And although I can’t talk about the experience that Duddle had (another answer), I know from experience that as soon as you start writing in Ruby and get the gist of Rails, it takes much less time to get executable material than in PHP (YMMV). Although some of the methods that are done in Rails fly before conventional development methods (for example, ActiveRecords completely change the way most people interact with databases).

Finally, the RoR community is massive compared to any other platform-based community. This is quite simple and in itself, and allows you to actually use many different bits and parts that simply do not exist in the PHP community.

Hope this helps!

+4
source

You might want to attract someone who is a Rails developer. This would be an important step to facilitate the transition process.

A good programmer will quickly grasp Ruby, at least after reading important sections of Learning Ruby . However, Rails development is very important for best practices. Reading in the Rails Guides will allow you to get much more, but it would be much easier to get started with someone who has experience in the Rails project.

After teaching / developing Rails part time for 3 months, I lead a project with 5 students who did not know Ruby or Rails at all. Within 1 week, I could teach the developer the basic work of Rails, and within 1-2 additional weeks, each could develop independently. Within 3 months, we created a mid-sized floor-ready application. This is not too complicated.

+2
source

This is a little argued, but this is what I think:

  • You make the right choice by switching to Rails. I am sure you will like it.
  • I will not lie. Rails has a steep learning curve. This is complicated and requires a lot of research.
  • Once you know how to do things with Rails, there is no faster way to develop web applications.
  • Ruby helps the programmer; Rails helps the programmer. Great fact.
  • I rewrote a browser game from PHP to Rails. After 2 weeks, about 60% of the work is done.
+1
source

Source: https://habr.com/ru/post/1345901/


All Articles