SitePoint Sponsor

User Tag List

Results 1 to 9 of 9

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Oct 2005
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Using the right language?

    Hi,

    I'm new to web development (I'm familiar with C++), and I'm deciding between learning Ruby and PHP. I mainly want to make mid-sized websites with basic forum and form support. I know my web vocabulary isn't up to par, so let me try to explain.

    I was recently advised to purchase the Agile Web Development on Rails book from this community. I started reading it, and then I looked over all the topics. All I see is how to develop complex applications such as a shopping cart (complex for what I'm trying to build). I'm not 100% sure that that's all that's in there, but it is what is definitely focused on.

    Am I using the right languages (Ruby/Rails), or should I be learning PHP? I heard that PHP is more of a linear language than Ruby which seems to be quite object-oriented.

    Perhaps I'm using the wrong book. I'd like to use Ruby/Rails, but it seems that it's not what I'm looking for. Maybe another book would fit my needs a little more adequately.

    Please advise. Any help is appreciated.

    TMK

  2. #2
    SitePoint Evangelist ghurtado's Avatar
    Join Date
    Sep 2003
    Location
    Wixom, Michigan
    Posts
    591
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try this to see if you like the way Ruby "feels" before you make your decision. (in fact, just try it regardless, it's a damn cool tool!)

    Also keep in mind that PHP has been a much more popular language than Ruby for a longer time, and as a beginner web programmer you are likely to find quite a lot more documentation and online tutorials for PHP. This balance is likely to shift in the medium term, though.
    Garcia

  3. #3
    SitePoint Member
    Join Date
    Oct 2005
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    Thanks for the reply. I tried it out, and it seems pretty fun and, perhaps most importantly, very intuitive. That's what drew me to Ruby in the beginning. So, which book would you guys recommend for the web side of Ruby? Pickaxe?

    TMK

  4. #4
    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 RiVeN
    Am I using the right languages (Ruby/Rails), or should I be learning PHP? I heard that PHP is more of a linear language than Ruby which seems to be quite object-oriented.

    Perhaps I'm using the wrong book. I'd like to use Ruby/Rails, but it seems that it's not what I'm looking for. Maybe another book would fit my needs a little more adequately.
    Why do you feel that Rails (or the Agile book) is wrong for you?

    Is it the object-oriented stuff? I will represent to you that once you get a handle on some of the object-oriented techniques you will likely find it much easier to use than strictly procedural code.

    Have you tried following along through the shopping cart tutorial? What is your ultimate goal?
    Using your unpaid time to add free content to SitePoint Pty Ltd's portfolio?

  5. #5
    SitePoint Guru
    Join Date
    Aug 2005
    Posts
    986
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You could create a rails application without learning Ruby, but it will be hard. The agile web development book is aimed at ruby programmers. Here is an online book to learn Ruby: http://poignantguide.net/ruby/

    The pickaxe is a really good book (especially if you already are a programmer).

  6. #6
    SitePoint Member
    Join Date
    Oct 2005
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    Maybe I'm getting this all wrong. Please excuse my noobishness.

    What I'm trying to say is that I (currently) don't see the point in learning how to make such structured things like a shopping cart. I've done some of it, but I feel that I won't retain any of it since I'm just copying code. I get the feeling that the book just tells you to do it instead of really telling you why or giving you the parameters for the methods, etc.

    But the whole thing seems too formal and almost extravagant to me. But maybe the shopping cart learning experience will cover everything I need as well.

    I was about to go take a shot at PHP, but I guess I'll try Ruby again. It is the language I wanted to learn, and after ghurtado's link, a language I really like.

    Thanks all.

    TMK

  7. #7
    SitePoint Guru
    Join Date
    Aug 2005
    Posts
    986
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The book starts with the shopping chart as an example but the rest of the book explains why you have to do these things (and introduces new things too). You'll want to read Part III. But the shopping chart example is actually easier than the forum you want to create unless it doesn't have authentication (login system).

    The shopping chart is 133 pages, the rails-framework expanation is 299 pages

  8. #8
    ********* Victim lastcraft's Avatar
    Join Date
    Apr 2003
    Location
    London
    Posts
    2,423
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Hi.

    If you are doing really simple sites, then PHP is really the way to go. You will find it performant, well integrated with Apache and very easy to get a "Hello world" out the box. For Ruby you have to assemble odds and ends, there are few tutorials when things go wrong and Rails (if you use it) forces you to do things the Rails way. You will also be more likely to find DHTML coders that can work around PHP code.

    Once you go beyond simple, it's a matter of choice. Ruby has a nice syntax, a more able community and fewer, but higher quality, libraries. To make use of the Ruby features, you need a high level of OO ability though. It's kind of expected that Ruby is your second programming language.

    I find PHP code written by others easier to follow (by the same programmer), but there is a lot of lousy PHP code out there. PHP is easy to host and is proven at high load. If you want to just plug in some component, like a forum or a blog, you will likely find it easier with PHP. Dont ever expect to integrate it with the rest of your code though .

    I'd lean to PHP for what you have described, but Ruby for a longer term view. That said, PHP is so easy to learn, why not try both?

    yours, Marcus
    Marcus Baker
    Testing: SimpleTest, Cgreen, Fakemail
    Other: Phemto dependency injector
    Books: PHP in Action, 97 things

  9. #9
    SitePoint Member
    Join Date
    Oct 2005
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks all. I think I'll learn PHP first; my roommate knows it and he can help me along. But I'm definitely not giving up on Ruby. I love Ruby's syntax: it seems so clean and so much like written English (for a language ).

    I'm very bad at making decisions, so expect me back here in a day or two asking again about Ruby

    Thanks again, all.


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
  •