SitePoint Sponsor

User Tag List

Page 1 of 3 123 LastLast
Results 1 to 25 of 51
  1. #1
    SitePoint Guru
    Join Date
    Oct 2006
    Location
    Queensland, Australia
    Posts
    852
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Why Isn't Ruby More Popular than PHP?

    Does anyone have a simple answer? I'm only just beginning to learn Ruby after being a PHP developer for about 4 years, and it seems clear that Ruby is the better language by some margin (not necessarily a better platform; I don't have enough experience to draw that conclusion). Ruby just makes so much more sense than PHP. The syntax just seems so well polished. In fact, it's probably the nicest language I'm yet to see (and I've spent time with at least 8 different modern programming languages). So far there's not a single bit of syntax or idiom that I'm not happy with.

    Why isn't the take up as aggressive as it probably should be?

  2. #2
    Follow: @AlexDawsonUK silver trophybronze trophy AlexDawson's Avatar
    Join Date
    Feb 2009
    Location
    England, UK
    Posts
    8,111
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    I would say it's down to the user-base. So many scripts and apps exist for the platform it's become heavily ubiquitous (both in host adoption and standardisation).

    Also, there is a far larger existing user-base for PHP, which means it's easier to find support for the language and people obviously get attracted to that aspect.

    PS: I like Ruby too, though not nearly as much as Python

  3. #3
    SitePoint Member
    Join Date
    Jun 2010
    Location
    San Jose California
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ruby came into popularity with the advent of Rails framework, which came into existence just 4-5 years ago. But ruby on rails is expanding really fast in the web development scenario today and it is expected to become the top 3 languages in the next few years.

  4. #4
    SitePoint Zealot ChrisWiegman's Avatar
    Join Date
    Sep 2010
    Location
    Austin, Texas, United States
    Posts
    177
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I would say it's 2 things. First, its younger and does not have the user support of PHP. Second, many servers don't come with Ruby preinstalled. Just like people use IE because it is there, many developers stick with PHP because it is just there.

  5. #5
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,597
    Mentioned
    24 Post(s)
    Tagged
    1 Thread(s)
    Popularity has nothing much to do with how good or bad something is. It has far more to do with how well each is marketed. Often just because something is popular means that it gets well marketed by those using it so that it remains popular.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  6. #6
    SitePoint Member
    Join Date
    Sep 2010
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP is just old stuff. Like many people use FORTRAN now.

  7. #7
    SitePoint Evangelist Jhorra's Avatar
    Join Date
    Sep 2004
    Location
    Phoenix, Az
    Posts
    551
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There are thousands of PHP hosting sites out there. It's a lot easier to deploy them. You don't have to have custom configurations. I think the big reason is it's just easier.

  8. #8
    SitePoint Member
    Join Date
    Oct 2010
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think a major problem with Ruby not being as popular as it should be is its poor support for Windows. This is not a good thing for a language that's supposed to be cross-platform.

    You have to jump through all sorts of hoops to get it installed and even then not all Ruby scripts are compatible with Windows. For instance if you do a simple call in a command line program to clear the screen System("clear") it won't work for Windows which requires System("cls"). You have to look at the OS version and send the appropriate call.

    There are other little gotachas like that all through out the system. Like some ruby gems require compilation and they are not written for Windows. Most Ruby programmer seem to be Unix/OS X people (I am) so they don't bother making their stuff work with an operating system they loath.

    I know I don't write in Windows support because I'm sick of having to support substandard systems like IE. I have to spend so much time at work fixing Microsoft's buggy browser I'm not spending 80% of my time in Ruby writing fixes for Windows when I can have the app up and running in a fraction of the time.

    Hence Windows based programmers look at Ruby as a "Mac elitist thing [they] don't want to waste time on." (An actual quote from a work buddy). And refuse to even look at it. I can't tell you how many Windows programmers I've spoken to over the 'net or at work that say they hate it and list all these reasons that don't even make sense. When I ask them if they have every used it the reply is usually either "I tried to install it and it was too much of a pain," "I tried it for a day but nothing worked right.", or just plain "No."

    I personally think it's silly to hate an OS or computer or language but then again I've never been the fanboi type. I want to use what I like best and what does the job best for me. Right now that's Apples and OS X.
    Last edited by descarte; Sep 14, 2011 at 23:05.

  9. #9
    SitePoint Guru downtroden's Avatar
    Join Date
    Dec 2004
    Location
    illinois
    Posts
    970
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think another thing that is slowing the adoption rate is the file setup. Yes, Rails is the 'leader' when it comes to ruby on the web, but with php (never bothered learning it because the syntax is ugly) you can upload a single file and you're good to go.

    With rails getting something running is a little more complex.
    your brain reacts in the same way whether you are
    looking at something or thinking about it...

  10. #10
    SitePoint Member jplancaster's Avatar
    Join Date
    Aug 2006
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have been out of the programming loop for a while. PHP and Perl is where I left off and it works for me so far. But with all of the RoR talk, - is it something I should look into and why?

  11. #11
    SitePoint Zealot HenriIV's Avatar
    Join Date
    Jun 2004
    Location
    France
    Posts
    129
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by picklepumpers View Post
    I think a major problem with Ruby not being as popular as it should be is its poor support for Windows. This is not a good thing for a language that's supposed to be cross-platform.
    I don't agree with you, Luis Lavena and some guys made a huge work on the Ruby installer for Windows and Devkit allows you to compile native gems. Of course, it's not perfect but they usually help you quickly on the mailinglist when something goes wrong

  12. #12
    SitePoint Member
    Join Date
    Oct 2010
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by HenriIV View Post
    I don't agree with you, Luis Lavena and some guys made a huge work on the Ruby installer for Windows and Devkit allows you to compile native gems. Of course, it's not perfect but they usually help you quickly on the mailinglist when something goes wrong
    You can disagree all you want but that doesn't change the facts. In fact I just tried installing Ruby in my Windows boot camp partition and it was a huge pain.

  13. #13
    SitePoint Zealot HenriIV's Avatar
    Join Date
    Jun 2004
    Location
    France
    Posts
    129
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by picklepumpers View Post
    You can disagree all you want but that doesn't change the facts. In fact I just tried installing Ruby in my Windows boot camp partition and it was a huge pain.
    What was the showstopper?

    Why Isn't Ruby More Popular than PHP?
    To me, the main reasons are quite simple:
    no affordable shared hosting like php
    no major open source apps like Drupal/Wordpress/phpBB that could bring people to learn/use Ruby

  14. #14
    SitePoint Evangelist
    Join Date
    Apr 2006
    Posts
    443
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Wardrop View Post
    Does anyone have a simple answer? I'm only just beginning to learn Ruby after being a PHP developer for about 4 years, and it seems clear that Ruby is the better language by some margin (not necessarily a better platform; I don't have enough experience to draw that conclusion). Ruby just makes so much more sense than PHP. The syntax just seems so well polished. In fact, it's probably the nicest language I'm yet to see (and I've spent time with at least 8 different modern programming languages). So far there's not a single bit of syntax or idiom that I'm not happy with.

    Why isn't the take up as aggressive as it probably should be?

    Why do you want to switch to Ruby? As I know PHP is faster, not faster do develop but faster to render! or what do you think?

  15. #15
    SitePoint Zealot vassilevsky's Avatar
    Join Date
    Dec 2009
    Location
    Ulyanovsk, Russia
    Posts
    126
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wikipedia says Ruby interpreter is one of the slowest.
    Usus magister est optimus.

  16. #16
    SitePoint Addict ruby-lang's Avatar
    Join Date
    Aug 2007
    Posts
    389
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I did some work with PHP 3, back at the turn of the century. Basically, it showed up at the right time with the right set of trade-offs. On one hand, it was a mess. On the other hand, it had an incredibly low barrier of entry. All people needed were the same text editor and FTP client they were already using to create and upload websites with animated GIFs to GeoCities.

    Ruby is an entirely different beast. It was created as a Perl derivative with a solid object oriented core inspired by Smalltalk. Since it had very little documentation, most of it in Japanese, it only caught on when the Pragmatic Programmers wrote a very good book about it, which became the de facto language and standard library documentation.

  17. #17
    SitePoint Zealot
    Join Date
    Sep 2010
    Location
    Brighton, UK
    Posts
    136
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wordpress, Joomla, Drupal, Moodle, PHPBB, plus it's ubiquitous and runs on a 5 per month server.

    To a developer Ruby is nicer but to the majority of people who don't want to, or care about code, PHP fits the bill.

  18. #18
    SitePoint Member
    Join Date
    Nov 2010
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by picklepumpers View Post
    I think a major problem with Ruby not being as popular as it should be is its poor support for Windows. This is not a good thing for a language that's supposed to be cross-platform.

    You have to jump through all sorts of hoops to get it installed and even then not all Ruby scripts are compatible with Windows. For instance if you do a simple call in a command line program to clear the screen System("clear") it won't work for Windows which requires System("cls"). You have to look at the OS version and send the appropriate call.
    <snip/> You're actually complaining that a windows command prompt has different syntax for "clear screen"? I've never had an issue with Ruby or Rails on windows (not one). It's more popular on Macs mainly because long ago Apple started including it with their OS builds. Installation on windows is simply:

    1. Run Ruby setup.exe
    2. Run Gems setup.rb
    3. In a command prompt, type "gem install rails -v x.x.x"
    (that's it, except right after that I'd do "gem install mongrel" as mongrel is a much better server to use for local development)

    The #1 thing about Rails is you can program any site faster than with any other language/framework. And, once that site is built you can maintain it much easier. Programmer time is the biggest cost in application development and deployment (two servers are cheaper than two programmers, etc.).

    Rails development houses like Hashrocket (http://www.hashrocket.com/) have a chance at really flipping Rails and PHP usage figures. They easily have (or can have) a delivery speed and pricing advantage.

    It's rare that someone learns Rails and then goes back to PHP.

    My old standard language vs laguage answer: "The BEST language is the one you're getting paid to use."
    Last edited by Mittineague; Nov 13, 2010 at 17:28. Reason: thread crapping removed

  19. #19
    SitePoint Member
    Join Date
    Nov 2010
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    actually I think Ruby is pretty popular atm,

    I have been a PHP developer for years now,
    what I'd like to know is what are Ruby advantages / disadvantages compared to php ?

  20. #20
    SitePoint Zealot
    Join Date
    Sep 2010
    Location
    Brighton, UK
    Posts
    136
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ruby is nicer in so many ways, most of which you don't fully appreciate until you've used them.

    Syntactically it's lovely, statements such as date.today + 1.month just rock. It has excellent support for blocks (anonymous functions) and you use them all the time eg.

    people.each { |person| puts person.name }

    would iterate over an array of people writing out their names.

    Everything is an object, including classes and methods. Even numbers are objects and can be extended, hence 1.week. Operators are all methods so you can for example define the = method on any object you create.

    You also get access to Rails which is a super super rapid application development framework. You can tackle impossibly big projects in weeks rather than months without any of the limitations that a RAD normally imposes. I like it. I use it for any large project.

  21. #21
    SitePoint Member
    Join Date
    Nov 2010
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    sounds cool,
    seems like Ruby is fully object oriented

    I'll probably give it a try some day

  22. #22
    John 8:24 JREAM's Avatar
    Join Date
    Sep 2007
    Location
    Florida
    Posts
    1,508
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I did not know you could make Ruby pages, I thought it had to be inside a Ruby-Framework?

    If you are comparing RoR to PHP, then I think you have to compare it to an actual PHP framework, unless you are only comparing basic stuff. I've been toying with Python (Similar to Ruby I hear) and it's a lot less code and somewhat cleaner than PHP in my opinion, so I can see why you like it!

    Everything in Python and Java are objects too, and in JavaScript too I think. I won't stop PHP anytime soon but exploring a few other languages has got my taste-buds tingling!

  23. #23
    SitePoint Zealot
    Join Date
    Sep 2010
    Location
    Brighton, UK
    Posts
    136
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by JREAM View Post
    I did not know you could make Ruby pages, I thought it had to be inside a Ruby-Framework?
    You could make Ruby output html directly, just like you could with Python or Java, but you probably wouldn't want to.

    Quote Originally Posted by JREAM View Post
    If you are comparing RoR to PHP, then I think you have to compare it to an actual PHP framework, unless you are only comparing basic stuff. I've been toying with Python (Similar to Ruby I hear) and it's a lot less code and somewhat cleaner than PHP in my opinion, so I can see why you like it!
    That's true, I'm not comparing like with like. I've quite enjoyed codeigniter and building on top of wordpress is good if you need a certain result. Python is very nice, Django is cool.
    Quote Originally Posted by JREAM View Post
    Everything in Python and Java are objects too, and in JavaScript too I think. I won't stop PHP anytime soon but exploring a few other languages has got my taste-buds tingling!
    Java is not fully object oriented. Primitives such as integers are not objects. Also, because it's compiled, objects are not open, you can't create methods dynamically for example. The only way you can extend an existing class is through inheritance which can rapidly get a little crazy if you don't have someone good in charge of the team. There's no multiple inheritance, no mixins, no monkeypatching, it's great if you need something that's locked down tight for developing in a large team of mixed ability programmers.

    Python is great and a worthy rival for Ruby imo.

    Javascript is really interesting but a little bit different. The object model is based on prototypes and the syntax is fussy and awkward compared to Ruby or Python. It's still cool though and I still like it.

  24. #24
    SitePoint Guru
    Join Date
    Oct 2006
    Location
    Queensland, Australia
    Posts
    852
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by m3gadeth View Post
    I have been a PHP developer for years now,
    what I'd like to know is what are Ruby advantages / disadvantages compared to php?
    I'd been a PHP for years also, but after using Ruby, it's impossible to go back; I only use PHP when I have to, such as to add features to existing PHP applications.

    Ruby makes PHP look like a scrap heap. Everything in Ruby seems so well though out. The syntax, language constructs, API, methodologies, etc, where as PHP is more like play-do/clay/plasticine, with bits and pieces awkwardly pushed into place.

    The only thing that makes PHP simpler to new comers, is because it has a basic web API built into it, where as Ruby doesn't. By web API, I'm talking about the means to access request variables, set and get cookies, manage sessions, etc. PHP includes a lot of that stuff out of the box (it's not very nice, but it's there). Ruby however isn't a language for the web per-say, so it doesn't include such web-specific API's or tools. This isn't a con by any means, but it makes Ruby a little less accessible to complete noobs (which is probably a good thing). It just means Ruby depends on some kind of platform to be used for the web, whether it be a Ruby-based web server such as WEBrick or Mongrel, or a complete framework.

    PHP also has really good documentation. The well-written online PHP manual with it's comments facility makes it an extremely helpful resource.

    Ruby beats PHP in practically every other area though

  25. #25
    SitePoint Member
    Join Date
    Feb 2011
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by HenriIV View Post
    What was the showstopper?



    To me, the main reasons are quite simple:
    no affordable shared hosting like php
    no major open source apps like Drupal/Wordpress/phpBB that could bring people to learn/use Ruby
    Heroku has absolutely changed the face of Ruby and Rails deployment. We will be seeing a lot of developers using ruby and rails in the coming years thanks to easier deployment.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •