Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should I rewrite my Codeigniter/PHP app in Ruby on Rails? Why?

I already have v1 of my webapp written in Codeigniter/PHP. I'm now working on v2, which will have some significant changes to all MVC components.

I'm pretty comfortable with CI and I like it. Very intuitive for a C coder like me. But I am wondering if it is worth it to rewrite the app in Rails? Will the productivity gains be worth the cost of learning another framework from scratch? I want to be practical and not chase something just because it's cooler or more fun.

Here are some productivity criteria:

  • HTML and CSS generation is fairly labor intensive. Does Rails have anything distinctive to help with this?

  • I'd like to reuse other people's code for commonly implemented functionality (e.g. interfacing with FB, Twitter, and other social sites). How much more 3rd party code reuse would I get with Rails?

  • How much more benefit would I get from the Rails community vs. CI community?

  • Make automated testing easier. I test manually today, which is labor-intensive.

I'd appreciate specific benefits vs. idealistic/religious arguments. Thanks!

like image 699
JMan Avatar asked Dec 03 '10 19:12

JMan


2 Answers

Codeigniter is obviously a framework built on PHP. While there are fundamental differences between PHP and Ruby, all of your criteria can be met with either of the two languages. Migrating to Ruby would seem to be a waste of time considering your requirements. There are plenty of ways to automate HTML/CSS in PHP and there are numerous open source Facebook/Twitter integrations (just check FB and Twitter developer sections). There are also plenty of open source PHP testing options available. Google is your friend! IMO it would be a big waste of time to rewrite your entire application for the sake of your criteria when there are plenty of PHP solutions to your problem.

like image 68
Jack Avatar answered Oct 04 '22 01:10

Jack


I think the better comparison here would be CI to Symfony. Symfony 1.4 is a PHP framework pretty much on par with Rails functionality - as far as I can tell through my research, anyway (I'm not a Ruby programmer).

If you were to switch to to Symfony, you would gain a lot of productivity tools. Symfony 1.4 + Doctrine has the ability to generate a lot of your code/interface for you. Symfony/Doctrine likes to keep you away from repetitive tasks such as building models and data validation.

If you want to do your research ahead of time, I suggest reading through Symfony's free e-book Piratical Symfony to give you an idea of how things work in Symfony.

Now, with all that said I feel obliged to mention that the Symfony team is working on Symfony 2.0 which will not be backwards compatible with Symfony 1.4. The expected release date is March of 2011. I expect that maintenance on Symfony 1.4 will continue in the future.

-- Edit --

I also think that sticking with your native language would allow you to develop with the least amount of overhead. Changing to a new language means having to learn it's up's and downs in order to be truly productive.

IE to be at a point where you're not coming back in 6 months to fix a bug that an experienced Ruby developer would have known to avoid.

like image 33
Craige Avatar answered Oct 04 '22 02:10

Craige