1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

PHP vs Ruby (vs Python)

Discussion in 'General Programming Chat' started by Seven4, Apr 29, 2015.

  1. Seven4

    Seven4 Power Member

    Joined:
    Nov 28, 2013
    Messages:
    684
    Likes Received:
    92
    Hi guys!

    So, I think this can become an interesting discussion. What do you think: what is the best programming language for web development?

    PHP has been around for a while and most of the scripts are written in PHP (Wordpress, Joomla, phpBB, vBulletin, Invision Power Board)
    Ruby, especially Ruby On Rails, is very hip these days. A lot of popular services are built using RoR (Twitter, ProductHunt etc). Also, it is very popular among startup owners / founders / ctos
    Python, on the other hand, is more academic, but Google uses it.

    So, what do you think? Which is the best? Which will become the most popular in the future, etc?
     
  2. AutomationSorcerer

    AutomationSorcerer Registered Member

    Joined:
    Apr 25, 2015
    Messages:
    73
    Likes Received:
    66
    Occupation:
    Senior Software Engineer
    Location:
    Ethereal Plane
    PHP was the first language I learned, and I've always seen Ruby as a fad. Seen plenty of new languages pop up and die off over the years.

    Python is in it's own class though, due to being popular with academics and hobbyists. PHP isn't going anywhere, the P in LAMP isn't Python it's PHP. I don't believe Python is going anywhere either, because it's found a very good niche in who uses it and how.

    So excluding Ruby, asking PHP vs Python would be the equivalent of asking "which is better, a sword or a scalpel?". Depends on what you're trying to do...
     
  3. pxoxrxn

    pxoxrxn Supreme Member

    Joined:
    Dec 21, 2011
    Messages:
    1,398
    Likes Received:
    2,072
    I'm not sure if you've used Rails or not but it has true value. You can make some pretty good web apps in Rails and it will take you a quarter of the time. I think it has a long way to go as its still pretty new (10 years old) but it is defiantly going places. I've also seen a community building behind it as well which is really nice to see.

    As for PHP Vs. Rails, I think they both have a place. I can see PHP becoming obsolete in the distant future and something thats much nicer to code taking its place, weather that's Ruby or not, I don't know.
     
  4. AutomationSorcerer

    AutomationSorcerer Registered Member

    Joined:
    Apr 25, 2015
    Messages:
    73
    Likes Received:
    66
    Occupation:
    Senior Software Engineer
    Location:
    Ethereal Plane
    Same reason people justified Visual Basic.

    I have a strong aversion to any language that opts to use words instead of curly braces, or doesn't allow for multiple statements on a single line (semi-colon terminator allows for this). Makes code so freaking ugly...
     
  5. towelfox

    towelfox Junior Member

    Joined:
    Jan 11, 2012
    Messages:
    173
    Likes Received:
    55
    php for me with Laravel.
    I'm doing a lot with October CMS lately which is Laravel based and it's very easy to develop with. Genuine WordPress contender because the code is clean. I've seen some WordPress plugins that could be very early replicated in October, in fact that is what I'm doing now, for personal use
     
  6. xha44a

    xha44a Power Member

    Joined:
    Dec 2, 2012
    Messages:
    532
    Likes Received:
    450
    Rails all the way. Coming from someone who is comfortable with all 3 I will say this... the amount of time it takes to roll something out on rails is an order of magnitude smaller than PHP or Python. I don't think anyone would really consider rolling out something large scale on PHP anymore. Python is being driven by Google as much as I can see and popular in a certain niche, but I don't think it will have the broad support for a long time. That being said, knowing Ruby is a huge plus for learning rails. Seems like every major tech startup I've looked at in the last few years uses Rails.
     
  7. AutomationSorcerer

    AutomationSorcerer Registered Member

    Joined:
    Apr 25, 2015
    Messages:
    73
    Likes Received:
    66
    Occupation:
    Senior Software Engineer
    Location:
    Ethereal Plane
    If you don't code in Malbolge, you're doing it wrong.
     
  8. Seven4

    Seven4 Power Member

    Joined:
    Nov 28, 2013
    Messages:
    684
    Likes Received:
    92
    Yep, Rails is very popular among startup founders.

    I had to Google what Malbolge is. I always learn something new on BHW.
     
  9. cnick79

    cnick79 Jr. VIP Jr. VIP

    Joined:
    Jun 10, 2010
    Messages:
    686
    Likes Received:
    369
    Location:
    Google's SandBox
    RoR is something I would like to get into but haven't had the time. I hear (as others here posted) Ruby is very quick to build. I'm not sure how deployment of a Rails app is, but I do see ruby installers in cPanel. I deployed my first python website using django and I loved it since I'm already familiar with python. Python and Heroku make deployment super easy. Heroku and Rails is just as good I hear. I wouldn't use python for a standard website though.

    For web apps/services I would use Python or give RoR a try.
    For basic websites I would stick with PHP.
     
  10. pxoxrxn

    pxoxrxn Supreme Member

    Joined:
    Dec 21, 2011
    Messages:
    1,398
    Likes Received:
    2,072
    VB has its value as well, people just used it wrong. The London Ambulance service should have never used it for example, but for my little discount calculator its perfect. Rails has proven itself way past VB with websites like Github.
     
  11. AutomationSorcerer

    AutomationSorcerer Registered Member

    Joined:
    Apr 25, 2015
    Messages:
    73
    Likes Received:
    66
    Occupation:
    Senior Software Engineer
    Location:
    Ethereal Plane
    And what value would that be? C# is the .NET framework's primary language, and VB .NET (along with the now dead J#) were created/supported to convert developers. VB's only value is possibly it's easier to learn for beginners; but that's not relevant professionally.

    I was only pointing out that the argument "it's easier to create something quickly" is used to justify using VB (usually by beginners). Easier to create something quickly always comes at a cost, and that cost is either in performance, power, flexibility or a steep learning curve. Steep learning curve usually applies to things like Entity Framework. Freaking awesome and allows creating database / code simultaneously and functions as an ORM. However has performance costs (like every ORM) compared to ADO .NET, and takes a bit of time reading documentation to get up to speed. Where as LINQ to SQL I figured out in like 10 minutes on a job interview test.
     
  12. pxoxrxn

    pxoxrxn Supreme Member

    Joined:
    Dec 21, 2011
    Messages:
    1,398
    Likes Received:
    2,072
    I said it above, making little calculators or bots for personal use. I'm not condoning the use of VB for enterprise applications but for simple tasks its perfect.
     
  13. subster

    subster Elite Member

    Joined:
    Apr 5, 2008
    Messages:
    1,877
    Likes Received:
    1,453
    Location:
    Krauthausen
    I started to learn Ruby in the first place - to be able to use RoR effectively as a framework, you should have learned Ruby before at the end of the day.
    They say this is a very complex OO language, ans has therefore the highest payed coder jobs. But if you actually look for some freelance jobs, you won't find that much. Even less if you are looking for a fix job.
    At the beginning, I really thought Ruby along with RoR will be the next big thing right after PHP, but know I get the impression that PHP will evolve furthermore and stay the main language for interactive web applications / sites.
     
  14. AutomationSorcerer

    AutomationSorcerer Registered Member

    Joined:
    Apr 25, 2015
    Messages:
    73
    Likes Received:
    66
    Occupation:
    Senior Software Engineer
    Location:
    Ethereal Plane
    Then we agree actually. I just typically don't look at this subject from the perspective of casual or hobbyist development. From that perspective, it's a good choice.

    I'm just jaded I suppose, due to encountering too many "wtf"s involving people who primarily write VB code, and the misperceptions those who do have about their capabilities.

    Once, I had a person who learned VB6 tell me he was going to write an operating system with it....
     
  15. cnick79

    cnick79 Jr. VIP Jr. VIP

    Joined:
    Jun 10, 2010
    Messages:
    686
    Likes Received:
    369
    Location:
    Google's SandBox
    I don't get where all the ideas about RoR having high paying jobs. Maybe in bigger cities where startups are more common. There's one RoR job in my area and that pays $60-80k. If you're picking a language based on pay then go with Java.
     
    • Thanks Thanks x 1
  16. rootjazz

    rootjazz Jr. VIP Jr. VIP

    Joined:
    Dec 21, 2012
    Messages:
    684
    Likes Received:
    326
    Occupation:
    Developer
    Location:
    UK
    Home Page:
    Enterprise work: java / c#

    Web apps: Ruby / python (maybe even throw in node if you want to be hip)

    Web site work / plugin work: PHP

    Different tools, different problems.



    You don't hammer a nail with a screw driver and vice versa
     
    • Thanks Thanks x 3
  17. AutomationSorcerer

    AutomationSorcerer Registered Member

    Joined:
    Apr 25, 2015
    Messages:
    73
    Likes Received:
    66
    Occupation:
    Senior Software Engineer
    Location:
    Ethereal Plane
    Completely agree.

    Before ASP .NET MVC, I would only develop websites/apps in PHP. However MVC + WCF/Web API frameworks have made PHP kind of irrelevant.

    Only time I'll use PHP now, is when working with designers that are familiar with it enough to know what they can and can't touch. Razor templates, while very designer friendly, has a much steeper learning curve to "If you see <?, don't touch anything until the ?>".

    And IIS is still a freaking nightmare.... I miss the simplicity of Apache and PHP.

    Exactly.
     
  18. jazzc

    jazzc Moderator Staff Member Moderator Jr. VIP

    Joined:
    Jan 27, 2009
    Messages:
    2,566
    Likes Received:
    11,026
    Occupation:
    Pusillanimous Knitter
    Location:
    Buenos Aires
    Does not matter, pick one and build stuff. Usually people just "look for the best" and the do nothing.
     
  19. fun4uoc

    fun4uoc Supreme Member

    Joined:
    Dec 25, 2007
    Messages:
    1,200
    Likes Received:
    1,042
    Location:
    ☆ ♔ ☆ ♔ ☆ ♔ ☆
    Code:
    ('&%:9]!~}|z2Vxwv-,POqponl$Hjig%eB@@>}=<M:9wv6WsU2T|nm-,jcL(I&%$#"
    `CB]V?Tx<uVtT`Rpo3NlF.Jh++FdbCBA@?]!~|4XzyTT43Qsqq(Lnmkj"Fhg${z@>
     
  20. maecenas23

    maecenas23 Senior Member

    Joined:
    Oct 12, 2010
    Messages:
    1,076
    Likes Received:
    994
    Occupation:
    Full-time worker :D
    Location:
    #RIPCity
    Perfectly said. Unfortunately. Creativity and new things appear from having as many brains involved as possible.

     
    • Thanks Thanks x 1