Jump to content
  • Advertisement
Sign in to follow this  
nomadph

[web] ruby on rails

This topic is 4367 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

i haven't tried this, but how come it's not that popular as compared to php? just curious. anyone knows what are advantages/disadvantages of ruby on rails and php-mvc framework? thanks!

Share this post


Link to post
Share on other sites
Advertisement
I don't know much about them, but I think that Ruby-on-Rails is much more oriented towards MVC than PHP. And it's not as popular because it has only recently begun getting attention. It went from something I had never heard of a year ago, to something that has many books in Barnes and Noble now, so I think it's gaining steam (from an "outsiders" perspective).

Here are lot of pages that appear to address the question, though. It seems to be asked a lot, which is further evidence that Ruby-on-Rails will become even more widely used.

Share this post


Link to post
Share on other sites
Ruby on Rails is much, much quicker and easier to use than any PHP framework. The language is more powerful, the querying of objects is easier, the layout is typically cleaner, and overall your speed of development will be much faster.

However PHP can be deployed almost anywhere, so finding hosting will never be a problem, unlike with RoR. And you can get into PHP far more quickly, given that it can be embedded directly into your HTML. The learning curve is negligible. However you start to lose both those 'benefits' when you move to using an MVC framework with it. It also lends itself to those who come from a C, C++, or Java background as the syntax is similar, although many would argue that such a syntax is a poor choice for high-level applications. PHP has a larger community than RoR so finding help is easy. The docs are thorough too.

Share this post


Link to post
Share on other sites
Well, standardization seldomly is an effect of how good a product really is. I guess Ruby just didn't receive as much publicity and was not seen as a language suitable for driving web applications in the beginning.

Also, PHP is more mass-compatible in its feature set, which has, granted, caused most of the PHP community to remain in the procedural programming stone-age. Ruby, on the other side, enforces modern OO design and only attracts a selected few knowledgeable web developers.

At least imho that are the causes why we every other web application is written in PHP instead of Ruby.

--

I think Ruby on Rails provides a great great productivity gain and is a fantastic framework that's probably way over the head of most PHP MVC frameworks.

However, there also are comparable PHP frameworks, Mojavi and its fork, Symfony, for example, that make excellent use of PHP5's capabilities. Combine that with Propel and Creole for database abstraction and PHP can almost stand up to Ruby/RoR.

-Markus-

[Edited by - Cygon on September 7, 2006 1:11:58 PM]

Share this post


Link to post
Share on other sites
Quote:
Original post by Cygon
I guess Ruby just didn't receive as much publicity and was not seen as a language suitable for driving web applications in the beginning.

If anything, RoR has driven an increase in the popularity of Ruby. Ruby is not a bad language; I just don't like some of the philosophical approaches taken by the language designers - a certain laxness and willingness to break existing code in order to fix anything seen as a mistake without a deprecation mechanism, for instance.

As for Ruby on Rails specifically, it's great if you're doing one of the things it was designed for - common web application tasks like building a forum, blog, image gallery, etc. It crumbles into an incomprehensible mess (like all frameworks, so this is not a knock on RoR in particular) when you're doing something irregular, unexpected or new.

Share this post


Link to post
Share on other sites
Whereas PHP starts out as an incomprehensible mess in the first place, so it scales to unusual tasks perfectly ;)

Share this post


Link to post
Share on other sites
Well, I do have experience with Ruby, as well as Ruby on Rails. I have written entire websites that utilize a MySQL database in a weekend. The prototyping speed is amazing, as well as the built in unit testing capabilities. As well, the whole system is modelled around MVC, so it is very easy to understand what is going on.

Personally, to me PHP is a mess of spaghetti. I picked up RoR in a month or so, and have never looked back. I definitely recommend you check it out.

To be realistic though, hosting is sort of an issue -- so if you don't want to host yourself or want a lot of choices, don't choose RoR.

[Edited by - visage on September 7, 2006 12:44:25 PM]

Share this post


Link to post
Share on other sites
Quote:
anyone knows what are advantages/disadvantages of ruby on rails and php-mvc framework?

Ruby on Rails is clean. It might not do everything you want, but it's well thought out and organized. It fits the language.

Beware of Rails clones for PHP. Rails does not translate very well to PHP. They are two very different languages. So if you were to use a framework for PHP, make sure it is really designed with PHP in mind.

Quote:
Personally, to my PHP is a mess of spaghetti

PHP is only as messy as you make it. The actual PHP language is very simple and straightforward. Yes, it does suffer needlessly from inconsistent APIs, but that's not very important in the grand scheme of things. Ideally with PHP, you build your own mini-framework that abstracts those calls. Working directly with any first level API is not good practice.

However, I would agree with you if you had said that most PHP applications are a mess of spaghetti. There's a major lack of self discipline among PHP coders. I don't really blame PHP. It's just so simple, it attracts the worst programmers. And that's why I think it is more popular than Rails. Not because it's better, but because it's just more simple. The Rails framework isn't really that hard either, but it only takes hours to get PHP up and running. It can take weeks or months before you are really comfortable with Rails.

I don't believe that PHP is as suitable for MVC as Ruby. PHP 5's OOP is good, but only in the traditional C++ sense. It's poor OOP for a scripting language, while Ruby's OOP is great. I think PHP will eventually lose out to more graceful languages, especially as they become more optimized (opcode caching, etc) and more widely supported.

Share this post


Link to post
Share on other sites
Quote:
Original post by Oluseyi
As for Ruby on Rails specifically, it's great if you're doing one of the things it was designed for - common web application tasks like building a forum, blog, image gallery, etc. It crumbles into an incomprehensible mess (like all frameworks, so this is not a knock on RoR in particular) when you're doing something irregular, unexpected or new.


I can't quite understand how you come to this conclusion. As I see it, RoR is not comparable to a CMS that breaks down as soon as you need something exotic. It just helps you interpret and react to http requests, validate inputs, access a possibly database driven backend and generate the resulting pages.

-Markus-

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!