The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

I personally see Ruby having different aim’s to PHP. PHP falls more under the category of standard serverside scripting (alongside ASP, ColdFusion, JSP and Perl) where as ruby falls more under the category of rich internet application scripting services (alongside python and seaside). Whereas PHP is usually used for small dynamic services, Ruby is more aptly suited towards powerful applications in the cloud. Even though you do not want to use PHP, I don’t see why you just don’t use another product in preference, most web hosts support a wide variety of languages and isn’t like you require the client to have anything installed on their end to make use of them.

Chances are very slim that any language would surpass the usage of PHP as it's more catered toward novices and non-programmers, and as long as it hits more of the demographic then it will be as popular as it is.

Though personally I favor Python as it's a bit more mature and I like the language rules a bit more, Ruby isn't bad compared to PHP.

That being said, why are you stuck with php? Are you in a work force that mostly uses PHP? Or does your web host not support Ruby?

Ruby's even older than PHP and never took off in any major way. It was not designed for "the cloud" or even web scripting; heck, until just the past few years, there was no stable web stack to deploy any kind of production Ruby web app *at all*. It's an extremely object-oriented dynamic language, and I think it will eventually share the fate of its cousin Smalltalk, relegated to hobbyists and with little use in the commercial world.

Ruby's even older than PHP and never took off in any major way. It was not designed for "the cloud" or even web scripting; heck, until just the past few years, there was no stable web stack to deploy any kind of production Ruby web app *at all*. It's an extremely object-oriented dynamic language, and I think it will eventually share the fate of its cousin Smalltalk, relegated to hobbyists and with little use in the commercial world.

(The ancient programmer coughs and shuffles forward to the podium.)

Well, when you're as old as either one of those languages, there's nothing significant about a couple of months age difference. (PHP and Ruby both made their public debuts in 1995, though Ruby had been in development since 1993.) While it might have had a slight head start, Ruby had to cross a language barrier, as it didn't get a non-japanese web site to promote it until PHP was just shy of version 3. It started gaining traction first with IBM, then the Pickaxe book, both in 2001.

The major difference between the two languages is that Ruby was designed from day one as an object-oriented language, while PHP is slowly but surely having OO features grafted onto it.

The "Killer app" for Ruby is obviously Rails, but there's more to the language than that. It's short and elegant syntax is making it almost ideal for developing DSL's in, for one thing.

The PHP community reacted to the success of Rails, playing catch-up with frameworks like Cake, and the competition continues, with all us of benefitting from every step forward either makes.

As for whether Ruby is *the* future, well it's certainly *a* future. Personally, I think no single language is *the* future. I think the future is multi-lingual; I think we'll be using many different languages in the same project. For web projects today we're already using two (C#/PHP/Python/Ruby and Javascript) we'll soon be adding a couple more.

Between Sun's Java Platform (not be confused with the Java Language, the Java platform supports many languages) Microsoft's CLR -- both of which support Ruby, BTW -- and other similar projects I think we're going to more and more often see projects combining the strengths of several languages to get the job done.

Currently, one of PHP's biggest weaknesses is in the building of large complex projects. The addition of namespaces will help with that, and I'm sure more changes will come along. Just as Rails and Merb provided the help Ruby needed in creating small simple sites, arguably the weakest point in Ruby and the weakness that held it back for so long. Now with Passenger and other projects, low-end Ruby projects are far more feasible than they were.

If the main purpose of the question is "In what basket should I place all my eggs?" the answer is "none or all." I think the days of the single-language, even single-platform, developer are drawing to a close. The future lies with Ruby and Rails/Merb, as well as with PHP, as well as with .NET, etc. Developers are going to need to branch out to more than one language and platform.

If the purpose is "With what language can I make the most money?" Well, there you have a horse race. The average Ruby developer will make significantly more money than the average PHP developer (I've heard two different companies declare in public they selected PHP for their projects because PHP developers were cheaper and easier to find; I can't fault the business logic there). There are fewer openings for Ruby developers, but fewer developers to compete for them, so the wages don't get driven down by supply vs demand. You pick your poison; each one has tradeoffs.

I can tell you it is the future. I am a pretty advanced PHP user and have recently been using Rails for all my own personal projects. I have used CakePHP (with Cake's Rails like features), built my own PHP framework, used custom built frameworks, and have used the Zend framework. I have used other languages like VB.NET for use with ASP.NET applications and have found nothing as simple as Ruby on Rails or the Ruby language. Its very logical in its naming conventions and thats what I really like. I also like that fact that its basically perfect for making web apps, because thats what it was created for. I like the fact the Ruby language intertwines with the Rails framework to the point where they both use the same Gems package installer. A Ruby on Rails programmer could simply take their Ruby knowledge and go create a PC program. I think a lot of people scoff at it because there is 2 types of programmers.

1. Everything is fine, I don't need to open up to any more languages or technologies.

or

2. Everything is fine, however I'll still keep an open mind on new stuff, adapting when required.

You get the 1st version especially from agile PHP programmers who want to close their mind off because of their attitude.

Ruby on Rails is still immature but the scaling issues are being fixed as the framework progresses.