1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

PHP vs Ruby on Rails

Discussion in 'Ruby' started by linkweb, Mar 26, 2007.

  1. #1
    Hi,

    I want to know what language is better. Particularly for online text-based games. Is there any language witch is better to use for this kind of projects?

    I am not an expert in PHP, but i can PHP (very) well. I have no experience with RoR now.
     
    linkweb, Mar 26, 2007 IP
  2. maonnie

    maonnie Member

    Messages:
    71
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    43
    #2
    I use Rails for bigger projects, Camping for smaller stuff & PHP for one page things that I don't want to worry about deploying.

    Bear in-mind that Rails deployment can be quite a pain for newbies, especially on shared hosts using fastcgi - if you need to get the project done quickly the choice is obvious.

    I can't say what's better for your project, but if you've got some spare time I'd recommend giving Rails a shot - Ruby really is a joy to work with.
     
    maonnie, Mar 26, 2007 IP
  3. linkweb

    linkweb Peon

    Messages:
    78
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks for your answer. I have read that RoR is slower than PHP for bigger websites, is that true?
     
    linkweb, Mar 26, 2007 IP
  4. maonnie

    maonnie Member

    Messages:
    71
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    43
    #4
    Yes, Ruby is slower than PHP. This isn't really an issue until you're getting lots and lots of traffic, i.e., hundreds of requests per-second - providing your code doesn't suck ;) if you are getting that kind-of traffic, until a better ruby implementation comes around the plan is to throw more hardware at the problem.

    There's quite a few people working on faster VMs and Rails performance so hopefully this will change in the future, until then, I wouldn't worry about it too much unless you're rewriting eBay.
     
    maonnie, Mar 26, 2007 IP
  5. linkweb

    linkweb Peon

    Messages:
    78
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    That's OK. The hardware isn't really an issue for me.

    Does Ruby has the same functions like rand() and calculations etc.?
     
    linkweb, Mar 27, 2007 IP
  6. maonnie

    maonnie Member

    Messages:
    71
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    43
    #6
    maonnie, Mar 27, 2007 IP
  7. linkweb

    linkweb Peon

    Messages:
    78
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Thanks for the links, maonnie!
     
    linkweb, Mar 28, 2007 IP
  8. intoex

    intoex Peon

    Messages:
    414
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Ruby is SLOW solution, it's good for first stage development, but not for use in production mode!
     
    intoex, Mar 29, 2007 IP
  9. maonnie

    maonnie Member

    Messages:
    71
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    43
    #9
    What do you use for production? also, how many requests per second are you dealing with?
     
    maonnie, Mar 29, 2007 IP
  10. greatlogix

    greatlogix Active Member

    Messages:
    664
    Likes Received:
    13
    Best Answers:
    1
    Trophy Points:
    85
    #10
    greatlogix, Mar 29, 2007 IP
  11. baker101

    baker101 Peon

    Messages:
    119
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #11
    by the time a ruby and rails app needs to worry about being slow, congrats your site is already worth plenty of money.

    ive read twitter.com uses ruby and at its heaviest time, is having rough time handling 11k requests a second. that is a boatload of hits.




    http://www.radicalbehavior.com/5-question-interview-with-twitter-developer-alex-payne/



     
    baker101, Apr 20, 2007 IP
  12. jimrthy

    jimrthy Guest

    Messages:
    283
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #12
    I know a lot of people who swear by ruby. I have to say that, just comparing the languages, it seems to me that ruby is a lot more powerful (and better designed) than PHP. That's not counting the rails part at all.

    Someday I really need to play with RoR to see what all the fuss is about. Every time I start, I get distracted by Ruby's (IMO) ugly syntax and go back to a language I find more aesthetically pleasing. I'm terribly ashamed to admit that.

    Then again, I have the same problem (just to a much greater degree) with perl, and I never feel bad about admitting that.

    It's almost definitely worth taking some time to familiarize yourself with both Ruby and Rails.
     
    jimrthy, Apr 21, 2007 IP
  13. Meth_

    Meth_ Well-Known Member

    Messages:
    1,063
    Likes Received:
    72
    Best Answers:
    0
    Trophy Points:
    140
    #13
    If you want a scalable application, go with PHP
    if you're not planning on your site going large (you don't know what the future holds, though) then go with RoR


    a lot of big sites are coded in php:-

    yahoo
    youtube
    buddypic
    vampirefreaks
    facebook

    ect.

    Another god language is asp.net, but it's costly..
     
    Meth_, Apr 21, 2007 IP
  14. baker101

    baker101 Peon

    Messages:
    119
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #14
    scalable problems are problems that we all want.

    yahoo, youtube, facebook, myspace...are all billion dollar sites.

    the main advantage of RoR is that you need functionality quick, clean, and simple to implement.

    but at 11k hits a second, i am sure maybe 99.9 percent of websites out there only worry about this problem.
     
    baker101, Apr 23, 2007 IP
  15. butterfingers

    butterfingers Well-Known Member

    Messages:
    1,142
    Likes Received:
    54
    Best Answers:
    0
    Trophy Points:
    128
    #15
    I knew that website like twitter and 43things based on RoR. How can we define the scalability between this website and Youtube etc (coded in PHP?)
     
    butterfingers, Apr 29, 2007 IP