SitePoint Sponsor

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 25 of 30
  1. #1
    SitePoint Zealot
    Join Date
    Sep 2007
    Posts
    128
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PHP vs Ruby on rails vs Perl

    I am currently fairly proficient in XHTML and CSS, and I would like to advance my web programming skills. I am trying to decide what database/application programming language I should learn, and it seems that the most popular are PHP, RoR and Perl. Which one should I pursue?
    Check out my blog at http://maxnorman.net
    Need advice? Go to http://askthekid.org

  2. #2
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Try them all?
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  3. #3
    phpLD Fanatic bronze trophy dvduval's Avatar
    Join Date
    Mar 2002
    Location
    Silicon Valley
    Posts
    3,627
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    If you are looking to offer services that many would need, PHP is clearly the most widely used language, and there are hundreds of web applications that run PHP. As you learn PHP, you might want to consider getting involved with a web application, and create a mod, or help people troubleshoot problems, and get some on the job training almost immediately.

  4. #4
    SitePoint Enthusiast zombat's Avatar
    Join Date
    Jun 2008
    Location
    Victoria, BC
    Posts
    63
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by dvduval View Post
    If you are looking to offer services that many would need, PHP is clearly the most widely used language
    Just out of curiousity, do you have or know of any statistics that back this up? I'd be interested to see them! Not that I think you're wrong, I'm just curious.
    PHP/MySQL programmer for hire!
    http://www.zombat.net

  5. #5
    SitePoint Wizard silver trophy kyberfabrikken's Avatar
    Join Date
    Jun 2004
    Location
    Copenhagen, Denmark
    Posts
    6,157
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP is probably the most popular and accessible of its kind. If you come from a HTML background, it has a tendency to be easy to get into gradually, because of its server page architecture. Eg. in its simplest form, a PHP page is just a plain HTML document with a different file extension. So for starting out, I would recommend PHP.

    Contrary to what you might expect, PHP has a fairly low level of abstraction, so you will get your hands "dirty" with low level stuff, such as the HTTP protocol, SQL and such. As a learning experience, I think this is quite healthy, and it's definitely something that you can take with you, if you later have to work in a different web technology.

  6. #6
    ✯✯✯ silver trophybronze trophy php_daemon's Avatar
    Join Date
    Mar 2006
    Posts
    5,284
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Isn't Perl dead?

    Quote Originally Posted by zombat View Post
    Just out of curiousity, do you have or know of any statistics that back this up? I'd be interested to see them! Not that I think you're wrong, I'm just curious.
    I'm sure you can find real statistics, but go to any freelance site and try to find any project other than php. That is of course a small business world, but that's what dvduval is talking about.
    Saul

  7. #7
    SitePoint Wizard TheRedDevil's Avatar
    Join Date
    Sep 2004
    Location
    Norway
    Posts
    1,190
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by php_daemon View Post
    Isn't Perl dead?
    Perl is not being used as much as a few years ago, but saying it is dead I would consider an exaggeration.

    We just had a file upload script made in perl, due to its much more efficient working with files than PHP (If only STDIN in php had worked the same way it does in perl...). The script works together with a php script, but the main upload is handled by perl.

    While perl is losing terrain it is still a nice and powerful language for the right projects. Every language has a weakness and strength, so its a good idea to base your application around several if that means you would not need to use any of the weaknesses (Though this is something that is not important on medium/small sites).

  8. #8
    SitePoint Zealot
    Join Date
    Sep 2007
    Posts
    128
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    so I'm guessing there isn't any definitive answer?

    I've heard that RoR is more logical, faster and generally easier to program than PHP. Is this true?

    I want to develop interactive web apps, a la shopping carts, forums, CMS's, maybe even a social network, once I get good enough. Is RoR capable of all of that?
    Check out my blog at http://maxnorman.net
    Need advice? Go to http://askthekid.org

  9. #9
    SitePoint Wizard silver trophy kyberfabrikken's Avatar
    Join Date
    Jun 2004
    Location
    Copenhagen, Denmark
    Posts
    6,157
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by maxiscool View Post
    so I'm guessing there isn't any definitive answer?
    Right on.

    Quote Originally Posted by maxiscool View Post
    I've heard that RoR is more logical, faster and generally easier to program than PHP. Is this true?
    Faster is a very loaded term. It can mean anything, so it generally means nothing. Whether RoR is easier and more logical than PHP, is a subjective matter. It depends a whole lot on your background and on what you're doing. Coming from a HTML background, as you are, I would claim that PHP is much easier to get started with.

    Quote Originally Posted by maxiscool View Post
    Is RoR capable of all of that?
    Sure. All the languages you mentioned, are capable of that. Programming is not an exact science; As long as a language is turing complete, you can build anything with it. Some languages just do it differently than others.

  10. #10
    SitePoint Zealot
    Join Date
    Sep 2007
    Posts
    128
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok. Thank you.

    I've tried PHP before, and, compared to RoR, it seems that you need to know more to do less. In the Sitepoint RoR book, they make a working social news site, which is more up my alley. I want to make 'web apps' like that.

    Now for the loaded question: which language is more future proof?
    Check out my blog at http://maxnorman.net
    Need advice? Go to http://askthekid.org

  11. #11
    SitePoint Zealot
    Join Date
    Sep 2007
    Posts
    128
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    have you guys seen this: http://media.rubyonrails.org/video/r...with_sound.mov ?

    You can create a blog in 15 minutes! Watch it, and see if that influences your opinion. It seems like RoR has so many intrinsic qualities that PHP doesn't.
    Check out my blog at http://maxnorman.net
    Need advice? Go to http://askthekid.org

  12. #12
    ✯✯✯ silver trophybronze trophy php_daemon's Avatar
    Join Date
    Mar 2006
    Posts
    5,284
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Take any of the popular PHP frameworks and I can challenge you that you can create a blog even faster.
    Saul

  13. #13
    SitePoint Zealot
    Join Date
    Sep 2007
    Posts
    128
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    but is it that easy and logical? RoR barely seems like code; it's almost just like writing out what you want!
    Check out my blog at http://maxnorman.net
    Need advice? Go to http://askthekid.org

  14. #14
    hi galen's Avatar
    Join Date
    Jan 2006
    Location
    New Haven, CT
    Posts
    1,228
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you want to advance your programming skills but you want to "barely write code". The way i see it, you're going to learn more about programming going the PHP route.

  15. #15
    SitePoint Zealot
    Join Date
    Sep 2007
    Posts
    128
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    have you seen this? A flickr search interface in 5 minutes, that looks pretty good.

    http://media.rubyonrails.org/video/f...rails-ajax.mov
    Check out my blog at http://maxnorman.net
    Need advice? Go to http://askthekid.org

  16. #16
    SitePoint Zealot
    Join Date
    Sep 2007
    Posts
    128
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by galen View Post
    you want to advance your programming skills but you want to "barely write code". The way i see it, you're going to learn more about programming going the PHP route.
    It's not that I barely want to write code, i just want to be productive and able to make cool stuff ASAP. From all of the things that I've been reading, RoR will help me do that, and will grow with me as the community grows.
    Check out my blog at http://maxnorman.net
    Need advice? Go to http://askthekid.org

  17. #17
    ✯✯✯ silver trophybronze trophy php_daemon's Avatar
    Join Date
    Mar 2006
    Posts
    5,284
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by maxiscool View Post
    but is it that easy and logical? RoR barely seems like code; it's almost just like writing out what you want!
    Rails is a framework, that's the purpose of any framework - to make it as easy and logical as possible.

    PHP alone is like Ruby would be with no rails. Nobody seems to talk about Ruby without rails, though.

    I agree that Rails is a great framework and if you're so excited, I'm sure you would not regret by choosing it. But check out the PHP frameworks, Zend Framework, Symfony, CakePHP, just to name a few. See, with PHP there are a lot of frameworks to choose from, with RoR you're stuck with Rails and you better like it, else there's just no choice.

    With all that said, as galen points out, you want to touch base with the fundamental programming, otherwise you can really be left with your jaw on the floor quite often as everything related to a higher level of programming that frameworks are assumes at least intermediate general programming knowledge.
    Saul

  18. #18
    SitePoint Zealot
    Join Date
    Sep 2007
    Posts
    128
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok. I think that I will try RoR, and a few PHP frameworks later.

    Do you have any good resources for RoR? Is the Sitepoint book any good?
    Check out my blog at http://maxnorman.net
    Need advice? Go to http://askthekid.org

  19. #19
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by maxiscool View Post
    ok. Thank you.

    I've tried PHP before, and, compared to RoR, it seems that you need to know more to do less. In the Sitepoint RoR book, they make a working social news site, which is more up my alley. I want to make 'web apps' like that.

    Now for the loaded question: which language is more future proof?
    Quote Originally Posted by maxiscool View Post
    have you seen this? A flickr search interface in 5 minutes, that looks pretty good.

    http://media.rubyonrails.org/video/f...rails-ajax.mov
    Now write all of those in pure Ruby with no framework attached doing most of the work. You will find PHP to be much faster then Ruby in terms of building a web application on fair ground (with no framework.)

    It doesn't matter which language you pick as long as you learn the basics of programming in general. Than its just a matter of learning syntax.
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  20. #20
    SitePoint Zealot
    Join Date
    Sep 2007
    Posts
    128
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by logic_earth View Post
    Now write all of those in pure Ruby with no framework attached doing most of the work. You will find PHP to be much faster then Ruby in terms of building a web application on fair ground (with no framework.)

    It doesn't matter which language you pick as long as you learn the basics of programming in general. Than its just a matter of learning syntax.
    So if I learn RoR now, it won't screw me over for the rest of my life? I won't need to un-learn anything?
    Check out my blog at http://maxnorman.net
    Need advice? Go to http://askthekid.org

  21. #21
    hi galen's Avatar
    Join Date
    Jan 2006
    Location
    New Haven, CT
    Posts
    1,228
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  22. #22
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by maxiscool View Post
    So if I learn RoR now, it won't screw me over for the rest of my life? I won't need to un-learn anything?
    I cannot say for sure, but learning a framework rather then the language is a short term interest IMO. Meaning whats the point of trying to pick a language when you don't want to learn the language itself?

    IMO, forget trying to make a web application right now and learn the language itself, Ruby, PHP, Perl, etc.
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  23. #23
    SitePoint Zealot Amenthes's Avatar
    Join Date
    Oct 2006
    Location
    Bucharest, Romania
    Posts
    143
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by maxiscool View Post
    ...i just want to be productive and able to make cool stuff ASAP.
    From what I see you don't seem to be the type who likes to get his hands dirty with the basics of web (and that's not a bad thing), so it would probably be better for you to choose a framework like RoR or even Django. I'm a little bit the opposite, I like all the HTTP headers and status code thing (although PHP automates some of these), I would even send a cookie with the header() function instead of setcookie() or even implement a different storage mechanisms for PHP sessions.

    PHP has it's own productive frameworks (CakePHP, Symfony, Zend Framework), most of them inspired by RoR (see CodeIgniter, they also have some video tutorials). The problem (or advantage?) with all this frameworks, as I see so far, is that they somehow force you to think inside their architecture. You must be aware of that, PHP is a language, in which you may build different type of architectures, while RoR is a framework written in Ruby, as Django in in Python. So their base is even more low-level than PHP is but it is heavily abstracted away from end-user programmers.

    There is also the issue with language design. From this point of view my personal opinion is that Ruby and Python are far better than PHP.

    By the way, I can do what you've seen in that Flickr video just about as easily with the help of Zend Framework and jQuery.

    Regarding your last question, any programming language, built from the beginning with concepts like "object oriented" and "functional" in mind will spoil you in regard to PHP, so you won't need to unlearn, but you may probably say PHP isn't mature enough.
    I'm under construction | http://igstan.ro/

  24. #24
    SitePoint Zealot
    Join Date
    Sep 2007
    Posts
    128
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Amenthes View Post
    From what I see you don't seem to be the type who likes to get his hands dirty with the basics of web (and that's not a bad thing), so it would probably be better for you to choose a framework like RoR or even Django. I'm a little bit the opposite, I like all the HTTP headers and status code thing (although PHP automates some of these), I would even send a cookie with the header() function instead of setcookie() or even implement a different storage mechanisms for PHP sessions.

    PHP has it's own productive frameworks (CakePHP, Symfony, Zend Framework), most of them inspired by RoR (see CodeIgniter, they also have some video tutorials). The problem (or advantage?) with all this frameworks, as I see so far, is that they somehow force you to think inside their architecture. You must be aware of that, PHP is a language, in which you may build different type of architectures, while RoR is a framework written in Ruby, as Django in in Python. So their base is even more low-level than PHP is but it is heavily abstracted away from end-user programmers.

    There is also the issue with language design. From this point of view my personal opinion is that Ruby and Python are far better than PHP.

    By the way, I can do what you've seen in that Flickr video just about as easily with the help of Zend Framework and jQuery.

    Regarding your last question, any programming language, built from the beginning with concepts like "object oriented" and "functional" in mind will spoil you in regard to PHP, so you won't need to unlearn, but you may probably say PHP isn't mature enough.
    You are correct. I do not want to get my hands terribly dirty because I am a full time student, and I have many time-consuming activities. I want to program, but I don't want to have to spend my life developing my knowledge of it. If it were my job, i would learn all of it.

    But, wouldn't you say that RoR is applicable in a professional world? It is being used by many developers today, who don't think it's necessarily 'less credible' or not as good of a language/framework.

    Also, all of these other frameworks are trying to copy Ruby on Rails, so doesn't that make it the standard?
    Check out my blog at http://maxnorman.net
    Need advice? Go to http://askthekid.org

  25. #25
    SitePoint Zealot Amenthes's Avatar
    Join Date
    Oct 2006
    Location
    Bucharest, Romania
    Posts
    143
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just a little article about Ruby, not RoR: http://www.joelonsoftware.com/items/2006/09/12.html
    Take a look at what David Heinemeier Hansson, the author of RoR, had to say.

    From my side you clearly want a framework so there are two things I would recommend you for sure. Try all of the frameworks that appeal you (check things like pre-production environment setup, production environment setup, deployment cycle...) and make a little survey, see whether or not you have the possibilities (hosting and customers) for developing in that framework, because you seem a pragmatic person.

    And don't forget, you may probably not leverage the framework enough if you don't know the language enough as well as some paradigms of programming. Pay attention to communities (I don't think there is a problem right here with whether RoR, PHP or Django), libraries and tools that could make your life easier, like editors.

    P.S: Just for fun: http://www.youtube.com/watch?v=n1NVfDlU6yQ
    I'm under construction | http://igstan.ro/


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
  •