SitePoint Sponsor

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 25 of 46
  1. #1
    SitePoint Guru
    Join Date
    Sep 2003
    Location
    Northern California
    Posts
    605
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Freelance PHP developer - 3 reasons to learn Ruby/Rails?

    I recently read about the virtues of Ruby and Rails and what a "dream" it is for the conscious programmer. More online coverage sparks more curiosity so, I am asking as a freelance web designer/developer can someone provide 3 (practical) reasons why I should learn this language? I can do database abstraction in PHP and there are OTS CMS that can be customized for larger client projects that need that kind of capability/features/functions.

    I'm not opposed to broadening my skills/knowledge if the reasons are compelling. I prefer to master what I already know vs know a little of this or that.

  2. #2
    SitePoint Wizard samsm's Avatar
    Join Date
    Nov 2001
    Location
    Atlanta, GA, USA
    Posts
    5,011
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Using your unpaid time to add free content to SitePoint Pty Ltd's portfolio?

  3. #3
    SitePoint Enthusiast
    Join Date
    May 2001
    Location
    Kaysville, UT
    Posts
    68
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I really feel like I can create applications faster with RoR than I can with PHP - and keep in mind, I've been using PHP since around 1998 and RoR only for about a year.

    Learning a new platform will also potentially open you up to more work.

    Lastly, I've found that learning new languages, platforms, and frameworks can be helpful even if you don't end up using them much. Why? They can give you new insight to problems and tasks you face. Generally, learning new languages will make you a more proficient programmer.
    Spencer Uresk
    Rails App Hosting
    Cheap Hosting - Directory of hosting plans under $10/month!
    My blog: Tech and Java Articles

  4. #4
    SitePoint Guru
    Join Date
    Sep 2003
    Location
    Northern California
    Posts
    605
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks for the thread link...

    and thanks for the comments, suresk. What you say is compelling so I will consider taking a closer look at RoR. If you can recommend a particular book or resource, pls advise or PM me if you prefer. Thank you.

  5. #5
    SitePoint Guru
    Join Date
    Aug 2005
    Posts
    986
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    First learn Ruby (the programming language) then Rails. It wouldn't make sense to learn Zend or some other framework before learning PHP either. There are many good links in the resources topic.

  6. #6
    SitePoint Wizard samsm's Avatar
    Join Date
    Nov 2001
    Location
    Atlanta, GA, USA
    Posts
    5,011
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Fenrir2 View Post
    First learn Ruby (the programming language) then Rails. It wouldn't make sense to learn Zend or some other framework before learning PHP either.
    I disagree with this, pretty much along these lines:
    http://hackety.org/2007/08/15/oneLinersAreCrucial.html

    Quote Originally Posted by A Small Matter of Programming: Perspectives on End User Computing
    It is very important from a motivational standpoint that users attain early success with the system they are using. It is not enough to say that users need systems that are “easy to use”; end user programming systems should allow users to solve simple problems within their domain of interest within a few hours of use.
    So, let's say you are a PHP user and decide to try Rails. If you take the approach that the language core comes first, you can be learning for days before you actually reach something near a useful website. Unless you are a particular breed of person, you won't make it to that stage, you'll dismiss Ruby as more trouble than it's worth and go back to tried and true.

    This is unnecessary. A novice with some focus can baby step through a Rails tutorial and actually have something useful at the end. They will be encouraged, empowered, have a clearer vision of what Rails can do for them, and they'll have picked up a little Ruby through osmosis.
    Using your unpaid time to add free content to SitePoint Pty Ltd's portfolio?

  7. #7
    SitePoint Guru
    Join Date
    Aug 2005
    Posts
    986
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Maybe. Ruby the language is impressive on its own. The problem with learning Rails first it that you probably won't learn Ruby after that (many examples of this phenomenon in this forum). You can use Rails library calls, but you can't do anything non-trivial.

  8. #8
    SitePoint Wizard samsm's Avatar
    Join Date
    Nov 2001
    Location
    Atlanta, GA, USA
    Posts
    5,011
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You learn what you need. If someone is using Rails and not learning any more Ruby than that, then the Rails library and plugins are probably serving their needs.

    I think Rails creates the illusion that people are never learning Ruby. While someone using PHP without a framework might be asking, "why doesn't 'hello world' show up on this test page?", a Ruby novice might be asking, "why doesn't 'hello world' show up on my database-backed, AJAX-ified social networking site?".

    If a person is serious about Rails, I don't think that is possible not to learn Ruby. It would be like living in France and not learning French. After a few months you might not be writing bestselling French novels, but you aren't going into the wrong bathroom or accidentally ordering cow brain either.
    Using your unpaid time to add free content to SitePoint Pty Ltd's portfolio?

  9. #9
    SitePoint Guru
    Join Date
    Aug 2005
    Posts
    986
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    These people only use the features of Ruby that PHP has too. It's a turing complete subset, but they don't use the good stuff.

  10. #10
    SitePoint Wizard samsm's Avatar
    Join Date
    Nov 2001
    Location
    Atlanta, GA, USA
    Posts
    5,011
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I guess I'm thinking that the person who wouldn't learn the "good stuff" after being exposed to Rails (which puts you in contact with "good stuff") is never going to learn the "good stuff" under any circumstance.
    Using your unpaid time to add free content to SitePoint Pty Ltd's portfolio?

  11. #11
    SitePoint Guru
    Join Date
    Aug 2005
    Posts
    986
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah, I think you're right

  12. #12
    SitePoint Enthusiast
    Join Date
    May 2001
    Location
    Kaysville, UT
    Posts
    68
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    For me, at least, this seems like the best way to learn:

    1. Use a book like 'Agile Web Development with Rails' to get started. It teaches you about the framework and you'll learn a bunch of Ruby along the way. The good thing with this is, you'll get instant (or near-instant) satisfaction and won't become bored.

    2. You'll pretty soon find yourself wanting to go beyond what is in the books. Pick up the cookbook books (for Rails and Ruby) or just find sites with lots of patterns to look at.

    3. Start getting into the core of the language with the Ruby pickaxe book.

    The purist in me would argue that this order is 100% opposite - you start with the fundamentals and work your way up. But I think you probably learn better and stay more engaged going the other way. I mean, I can learn about lambda now and not really care, or I can read about it in a few months and say "hmm... I know where this could have come in handy!".
    Spencer Uresk
    Rails App Hosting
    Cheap Hosting - Directory of hosting plans under $10/month!
    My blog: Tech and Java Articles

  13. #13
    Beer drinker Srirangan's Avatar
    Join Date
    Jan 2005
    Location
    Beerland!
    Posts
    776
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by suresk View Post
    I really feel like I can create applications faster with RoR than I can with PHP - and keep in mind, I've been using PHP since around 1998 and RoR only for about a year.

    Learning a new platform will also potentially open you up to more work.

    Lastly, I've found that learning new languages, platforms, and frameworks can be helpful even if you don't end up using them much. Why? They can give you new insight to problems and tasks you face. Generally, learning new languages will make you a more proficient programmer.
    How can you even compare the two? Rails is a framework PHP is a programming language. Its like comparing a ship with an ocean.

    Have you tried development with PHP based MVC frameworks? Can you elaborate on the time take for similar web app on Rails and a PHP based framework?

    Now if you say that you like the Ruby syntax, then its altogether a different matter. In that case every Ruby based Web Framework would hold an edge over every PHP Based Framework.
    Online Startups Insight for new entrepreneurs

  14. #14
    Beer drinker Srirangan's Avatar
    Join Date
    Jan 2005
    Location
    Beerland!
    Posts
    776
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you are a programmer, and you start out to only code Rails, you still would probably end up learning Ruby. Ruby is, after all, all about being developer friendly. The learning the core of Ruby is something that'll just automatically happen (imho).
    Online Startups Insight for new entrepreneurs

  15. #15
    SitePoint Enthusiast
    Join Date
    May 2001
    Location
    Kaysville, UT
    Posts
    68
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Srirangan View Post
    How can you even compare the two? Rails is a framework PHP is a programming language. Its like comparing a ship with an ocean.
    Not even close. Regardless of *what* they are, they are both frequently used to accomplish the exact same tasks. Ie:

    1. It is very rare to see someone using Ruby to develop a web application who isn't using Rails.
    2. It is rare to see someone using PHP for something other than a web application, and even now, it is also rare to see someone using frameworks like php on trax or Symfony.

    Have you tried development with PHP based MVC frameworks? Can you elaborate on the time take for similar web app on Rails and a PHP based framework?
    I haven't, although I admittedly need to. Most of PHP's web frameworks, from what I've seen, tend to be more verbose and require more configuration that Rails still though.

    I am going to take some time this week and try to build some sites with both Symfony and PHP on Trax. Even though I like the underlying language of Rails (Ruby) better, PHP does have some potential advantages in the area of deployment.
    Spencer Uresk
    Rails App Hosting
    Cheap Hosting - Directory of hosting plans under $10/month!
    My blog: Tech and Java Articles

  16. #16
    Beer drinker Srirangan's Avatar
    Join Date
    Jan 2005
    Location
    Beerland!
    Posts
    776
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    1. It is very rare to see someone using Ruby to develop a web application who isn't using Rails.
    Is it? Please see: http://www.nitroproject.org/ and http://code.whytheluckystiff.net/camping

    So there are at least two non Rails yet Ruby based Web Frameworks, this is what a quick Google got me. When it comes to frameworks on Ruby, I doubt that any single project would hold sway. After all, for good or for bad Ruby is not ASP and Rails is not .Net.

    2. It is rare to see someone using PHP for something other than a web application, and even now, it is also rare to see someone using frameworks like php on trax or Symfony.
    Maybe it is, but still this won't validate your comparison. You can't compare Office Suites and then say MS Office is better than Ubuntu Linux. It just doesn't make sense as there isn't any real common denominator. There is just so much more PHP can do that the Rails framework can't (but Ruby can). So the comparison is just not fair, it wouldn't be.

    You can either compare Frameworks (ASP.NET, Cake, Symphony) with other Frameworks (Rails), or Languages (PHP, Java) with Languages (Ruby).

    --

    I agree with you, the syntax of Ruby is more developer friendly than that of PHP, but again not that PHP is necessarily hard.
    Online Startups Insight for new entrepreneurs

  17. #17
    SitePoint Guru
    Join Date
    Aug 2005
    Posts
    986
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There is no difference between a language and a library.

    "You cannot compare apples and oranges" -- I can
    Last edited by Fenrir2; Aug 28, 2007 at 06:47. Reason: removed unfriendly remark

  18. #18
    Beer drinker Srirangan's Avatar
    Join Date
    Jan 2005
    Location
    Beerland!
    Posts
    776
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Fenrir2 View Post
    You don't understand programming. There is no difference between a language and a library.
    I guess you could argue PHP is just a C Library. But tell me, how do you compare a subset of a larger set with the original set? Is it fair?

    The only way you can compare Rails with PHP is if you set a very limited and rigid set of parameters against for which it is to be compared. And I don't believe it was done here.
    Online Startups Insight for new entrepreneurs

  19. #19
    SitePoint Enthusiast
    Join Date
    May 2001
    Location
    Kaysville, UT
    Posts
    68
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Srirangan View Post
    Maybe it is, but still this won't validate your comparison. You can't compare Office Suites and then say MS Office is better than Ubuntu Linux. It just doesn't make sense as there isn't any real common denominator. There is just so much more PHP can do that the Rails framework can't (but Ruby can). So the comparison is just not fair, it wouldn't be.

    You can either compare Frameworks (ASP.NET, Cake, Symphony) with other Frameworks (Rails), or Languages (PHP, Java) with Languages (Ruby).

    --

    I agree with you, the syntax of Ruby is more developer friendly than that of PHP, but again not that PHP is necessarily hard.
    Again, you are splitting hairs. Yes, Rails and PHP are different in nature. But, along functional lines (ie, what you actually accomplish with them), they are quite similar. Both PHP and Rails are directly used to create web applications. Your analogy of comparing an office application to an OS is simply absurd - they are not typically used to do the same task, as Rails and PHP are.

    Perhaps it would be better to compare Ruby on Rails to say, PHP on Trax. But that isn't what the OP asked, and in the context of web development, comparing two tools (PHP and Ruby on Rails) is completely valid, even if they have a different overall scope.
    Spencer Uresk
    Rails App Hosting
    Cheap Hosting - Directory of hosting plans under $10/month!
    My blog: Tech and Java Articles

  20. #20
    SitePoint Guru
    Join Date
    Aug 2005
    Posts
    986
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Srirangan View Post
    But tell me, how do you compare a subset of a larger set with the original set? Is it fair?
    Certainly. Do you think that it's unethical to compare making a website with Rails to making a website with Ruby?

    If some function foo() is built-in, and bar() is from a library, can you compare them?

  21. #21
    SitePoint Wizard samsm's Avatar
    Join Date
    Nov 2001
    Location
    Atlanta, GA, USA
    Posts
    5,011
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I see the point of saying that PHP folks generally don't use frameworks, and Ruby people are almost always using Rails, that is likely a valid point.

    However, it seems to me like comparing Rails to PHP frameworks (Symphony et al) would be a more productive debate, and one that is (at least potentially) more challenging to Rails.
    Using your unpaid time to add free content to SitePoint Pty Ltd's portfolio?

  22. #22
    Beer drinker Srirangan's Avatar
    Join Date
    Jan 2005
    Location
    Beerland!
    Posts
    776
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by suresk View Post
    Again, you are splitting hairs. Yes, Rails and PHP are different in nature. But, along functional lines (ie, what you actually accomplish with them), they are quite similar. Both PHP and Rails are directly used to create web applications. Your analogy of comparing an office application to an OS is simply absurd - they are not typically used to do the same task, as Rails and PHP are.

    Perhaps it would be better to compare Ruby on Rails to say, PHP on Trax. But that isn't what the OP asked, and in the context of web development, comparing two tools (PHP and Ruby on Rails) is completely valid, even if they have a different overall scope.
    Well, it wouldn't be like splitting hairs in every case. Take the following example, say I have to write an IRC bot which serves as a helper in an IRC channel. I'm not really confident Rails can handle such a case whereas PHP (and Ruby) can, but would it be fair to compare the two (PHP & Rails) in such a case? I think not. Note this is just one example.

    You are making an underlying assumption that all PHP will ever do is serve as a Web Application framework; that is itself not correct. As Sam said, it would be better to compare a Web Application framework with another. Even if (as Fenrir2 suggested) we assume PHP to be a framework in C, it still is far more powerful and versatile than Rails (though not Ruby).

    Do you think that it's unethical to compare making a website with Rails to making a website with Ruby?
    Not a question of ethics. See, the constraint you have here is "making a website". What if I want to make a web application (not necessarily a website) whose scope is that beyond the Rails Framework. Won't it be unfair to expect Rails to serve beyond its purpose? It would lead to unnecessary criticism of Rails.

    and one that is (at least potentially) more challenging to Rails.
    Hmm.. what do you mean by challenging? The scope of solutions in PHP is far beyond what can be achieved with Rails.
    Online Startups Insight for new entrepreneurs

  23. #23
    SitePoint Wizard samsm's Avatar
    Join Date
    Nov 2001
    Location
    Atlanta, GA, USA
    Posts
    5,011
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Srirangan View Post
    Hmm.. what do you mean by challenging? The scope of solutions in PHP is far beyond what can be achieved with Rails.
    Please. The scope of solutions is identical, it is a matter of easier vs. harder.

    For the general, common problem of making a dynamic website, a battle-worn, well tested MVC framework is waaaay easier than starting from scratch. That goes for PHP and Ruby so we may as well compare the frameworks where we might want to actually start working.

    Comparing Rails to using PHP without a framework may reflect actual use, but I think it is more interesting to compare the best development scenarios that PHP has to offer with the best Ruby has to offer. Makes the most sense to me.
    Using your unpaid time to add free content to SitePoint Pty Ltd's portfolio?

  24. #24
    Beer drinker Srirangan's Avatar
    Join Date
    Jan 2005
    Location
    Beerland!
    Posts
    776
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The scope of solutions are identical
    That's incorrect.

    it is a matter of easier vs. harder.
    That is personal preference, it can vary for each individual.

    For the general, common problem of making a dynamic website, a battle-worn, well tested MVC framework is waaaay easier than starting from scratch.
    Depends. What if MVC doesn't suit my requirements? Don't tell me MVC is perfect for all types of web applications.
    Online Startups Insight for new entrepreneurs

  25. #25
    SitePoint Guru
    Join Date
    Aug 2005
    Posts
    986
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You are making an underlying assumption that all PHP will ever do is serve as a Web Application framework; that is itself not correct.
    This is not all PHP does, but it is intended for web applications. It's stupid to make an IRC bot using Rails (ditto for PHP).

    What if I want to make a web application (not necessarily a website) whose scope is that beyond the Rails Framework.
    A website such as? It wouldn't be unfair at all.

    Comparing bicycles to cars, unfair? Cars faster, bicycles more energy efficient .

    PHP faster deployment, Rails faster development.


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
  •