Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

gizabo

macrumors regular
Original poster
Jul 20, 2008
124
0
What do you think is better... RoR or PHP?

And what do you think will be more dominant in the future?


I think RoR is much better... Much easier to use and does the boring work for you...

But, i think PHP will remain dominant in the market...
 

angelwatt

Moderator emeritus
Aug 16, 2005
7,852
9
USA
I think it depends on what you want to do with the languages. Ruby on Rails has a more specific area that it targets, whereas PHP is broader in functionality. It's not really about dominance, just the right tool for the right job. I mostly use PHP, but will still likely continue to play with Rails.
 

nborders

macrumors newbie
Nov 2, 2005
28
0
Not a big fan of RoR

I took 07 to study up on RoR. I'm happy I did, for the personal challenge. However, I rarely use it, and have lost most of my skills. That says about all of it for RoR for me. I honestly, wish I had spent that time learning other skills, like Flex (MXML/ActionScript3) or even more advanced PHP.

The advertising on RoR was not as easy as they make it sound.

That said, RoR can be powerful MVC application. I don't want to crap on it too much.

PHP will open up more of a world to you. If you build modules in Drupal, or tweak a plugin in WordPress you need PHP.

Then on top of it, PHPCake does most of the same as Rails.

So I would stick with PHP. Learn it. Know it. Live it.

Hope that helps.

~n
 

haravikk

macrumors 65816
May 1, 2005
1,499
21
I've not used Ruby on Rails for much serious work, but it is definitely a much cleaner language than PHP.

The thing I dislike most about PHP is the sheer mess that is its functions library; function names and parameter orders are inconsistent, and due to the fact that PHP is late to the scene with object-oriented constructs it is just generally horrible; for-example, in RoR you have "a string".split(/,/), whereas in PHP you have explode(',', "a string"), in RoR you have "a string".capitalize(), in PHP you'd have to do str_to_upper("a string"), you have to either memorise, or constantly look-up tons of different functions, rather than just calling appropriate functions as member-functions/methods, it's very messy!

Really I would have expected the PHP creators to have released a version that has proper object-oriented libraries etc. by now, with the same basic features, possibly with some way of distinguishing between current code and a new cleaner syntax/library while running them side-by-side.

PHP currently has the main advantage that it's been around for so long that it has a really-rich feature-set, which I believe Ruby on Rails is lacking; not say it's crippled in any-way, but PHP has many ways to solve different problems.

On the issue though, is there a preferred editor for use with Ruby On Rails? The thing that puts me off using it any more is the use of command-line to interact with it, really I'd rather use a tool that does that stuff for me; with PHP all you need is a text-editor :)
 

sbauer

macrumors member
Feb 7, 2009
70
0
Baltimore, MD
Basically everything haravikk said.

I just dislike some of the design decisions that were made. I don't like the special methods prefixed with __ . Naming conventions are non existent in some cases. I understand why they implemented namespaces the way they did, but it just isn't clean.

Ruby just makes sense to me.
 

Malfoy

macrumors 6502a
Nov 1, 2005
688
2
I considered getting into RoR but for the reason angelwatt described i opted to say with PHP. This year I plan to get into flex/as3 because I have some ideas and I like what they are doing with it.
 

nborders

macrumors newbie
Nov 2, 2005
28
0
On the issue though, is there a preferred editor for use with Ruby On Rails? The thing that puts me off using it any more is the use of command-line to interact with it, really I'd rather use a tool that does that stuff for me; with PHP all you need is a text-editor :)

Hands down. TextMate.

~n
 

davecuse

macrumors 6502
Feb 20, 2004
419
0
NYC
These two aren't really comparable. PHP is a language just as Ruby is, the real power of Ruby on Rails comes from the Rails framework. If you're sold on PHP you could use a framework like Cake.

To me the real value of Ruby on Rails is in the community, there are so many smart people posting their ideas and code that you'd have a tough time not being able to find a quick solution to whatever problem you're having with a quick Google search.

I've been developing professionally for Ruby on Rails for the past 5 years, and haven't once looked back and wished I'd spent more time learning PHP.
 

macDonalds

macrumors 6502
Jun 8, 2007
448
0
I see the future like this:

1.) PHP will continue to pull in newbs (I mean that in the nicest way possible) as its barrier to entry is extremely low.
2.) Ruby on Rails will continue to take devs from the cream of the crops of PHP and [insert framework here], and other web languages/platforms.

See the difference?

Both have pros and cons that we can go on for days about. The bottom line though is that PHP was released many, many, many moons ago and is playing catchup in areas such as OOP, MVC, TDD, etc. Granted, all of the PHP frameworks out there help to close the gap but Ruby on Rails is a MODERN language and framework, built from the ground up to support today's web needs.

With that being said - PHP and [insert framework here] is perfectly fine too... if you're coming from another language. I stress coming from another language, because I would say far away from PHP as a first language. You'll be better off learning something OOP first and even better if it's not a dynamically typed language. C#, VB.NET, or JAVA are good choices.
 

fivepoint

macrumors 65816
Sep 28, 2007
1,175
5
IOWA
This thread is so close to a project I'm working on... I'm currently in the process of deciding what language (and what company) to use to help me build a web 2.0 user-content generated website (forums, blogs, news, reviews, gallery) that I've been planning for quite some time. Unfortunately, it seems that no one where I live uses either one of these languages! They use things like Cold Fusion and .Net.

If you get a second, please read my thread below, and help me out if you can! I'm so excited to get started, but I need someone smart, informed, to help me better understand what I should do next!

Thanks so much!

https://forums.macrumors.com/threads/563757/
 

fab5freddy

macrumors 65816
Jan 21, 2007
1,206
7
Heaven or Hell
I'm in the same boat !
I am about to start learning a web scripting language,
and want to choose between Ruby on Rails and PHP .......

Which one is easier to start with ?

all i know now is HTML and a little CSS.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.