SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    Barefoot on the Moon! silver trophy Force Flow's Avatar
    Join Date
    Jul 2003
    Location
    Northeastern USA
    Posts
    4,606
    Mentioned
    56 Post(s)
    Tagged
    1 Thread(s)

    Ruby on Rails - what is it good for?

    I've been trying to understand what exactly ruby on rails is. At a glance, it doesn't seem like a fully-fledged language for website backends like J2EE or PHP. Then again, maybe I'm not looking at it correctly.

    I've seen it described as a "web application framework"...but what exactly is that and how does it differ from using J2EE or PHP? Or does it incorporate J2EE/PHP?

    I'm quite confused about this and was wondering if someone could explain what it is and if its worth it to invest my time in learning it (ie, is it a passing fad, or is it here to stay)?

    Thanks

  2. #2
    SitePoint Addict
    Join Date
    Mar 2004
    Location
    Grand Junction, CO
    Posts
    292
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's for building web applications. It's an alternative to J2EE and PHP.

  3. #3
    SitePoint Guru
    Join Date
    Aug 2005
    Posts
    986
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rails is a web application framework for the programming language Ruby. Try it out, if you've been programming with PHP or J2EE you'll be amazed.

  4. #4
    SitePoint Evangelist
    Join Date
    Apr 2005
    Posts
    485
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Force Flow
    I've been trying to understand what exactly ruby on rails is. At a glance, it doesn't seem like a fully-fledged language for website backends like J2EE or PHP. Then again, maybe I'm not looking at it correctly.

    I've seen it described as a "web application framework"...but what exactly is that and how does it differ from using J2EE or PHP? Or does it incorporate J2EE/PHP?

    I'm quite confused about this and was wondering if someone could explain what it is and if its worth it to invest my time in learning it (ie, is it a passing fad, or is it here to stay)?

    Thanks
    FF, i come from a php background and i look at RoR like this... Ruby is a more powerful and flexible language (try creating an executable with php - maybe you can, but i'm not awar eof it) and rails is what i would do if i were smarter and started programming earlier. ;-)

    my advice is to get the 2nd edition of agile web development with rails - it is an excellent book and it improved my php programming b/c i got to see best programming practices in play for the first time (for me, anyway).

    i have the 1st edition, too, but as i'm going through the 2nd edition, i'm seeign they added db migrations which is too cool.

    RoR isn't for everything, but if you are developing a database backed web application, it deserves a very strong look (and at least a read of the agile web development with rails to get an idea what rails is about and how experienced programmers do their business). if you already are experienced at programming, you'll still learn some ruby and some rails.

    the downside is that it isn't as fast as some other languages, but this issue is blown way out of proportion for 98% of applications. it just isn't reasonable nor rational to ask, "but can it support the next myspace if you develop it?"

    as we recently found out, even amazon can come grinding to a halt for a half hour under the right load.

  5. #5
    SitePoint Guru
    Join Date
    Aug 2005
    Posts
    986
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you need super-performance (but you don't) you shouldn't use PHP or Java + framework either (Rails is not slower).

  6. #6
    Barefoot on the Moon! silver trophy Force Flow's Avatar
    Join Date
    Jul 2003
    Location
    Northeastern USA
    Posts
    4,606
    Mentioned
    56 Post(s)
    Tagged
    1 Thread(s)
    I'm not too concerned about speed unless it is a *serious* issue.

    How is it that coders are able to claim that they are able to build a web app in RoR faster than in J2EE (or PHP)? Is there less coding involved? At this point, it seems like (to me, anyway), that RoR is "magic".

    (for the record, I'm quite comfortable working in J2EE, so I'm wondering how RoR would compare)

  7. #7
    SitePoint Addict
    Join Date
    Mar 2004
    Location
    Grand Junction, CO
    Posts
    292
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Install it and build a basic application. It's quick and you'll see for yourself.

  8. #8
    SitePoint Guru
    Join Date
    Aug 2005
    Posts
    986
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It probably won't take more than an hour to install Ruby + RoR and to build a basic application (blog for example).

  9. #9
    SitePoint Evangelist
    Join Date
    Apr 2005
    Posts
    485
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Force Flow
    I'm not too concerned about speed unless it is a *serious* issue.

    How is it that coders are able to claim that they are able to build a web app in RoR faster than in J2EE (or PHP)? Is there less coding involved? At this point, it seems like (to me, anyway), that RoR is "magic".

    (for the record, I'm quite comfortable working in J2EE, so I'm wondering how RoR would compare)
    FF, coming from PHP, there are two secrets.

    1. the Rails developers are skilled programmers and they've organized and automated much of the development process.
    2. RoR supports convention over configuration. If you play by their rules, which I have found to be very rational, btw, you get lots of automation for absolutely free.
    3. the OO nature of ruby is nice - so the code tends to be cleaner and more efficient.

    regarding the speed issues, i'm not an expert, but some experts do agree RoR is slower. having said that, they still say it is fast enough and it can be scaled and the benefit of unused developer cycles far outweight unused cpu cycles. also, even if it takes an extra server to scale rales to similar performance, is that an acceptable cost if it saves you $50k in development or if it gets you to market 6 months before your competition?

    I recommend getting ahold of the beta PDF of Agile Web Development with Rails if you are evaluating RoR. it is an excellent book and I'm workign through it now. I've learned a lot and have even updated the structure of my PHP code based on what I've learned from that book.

    i listened to a podcast where a j2ee developer said he and a group of 2 or 3 other guys were working on an app for 3-4 months. he said he then learned some RoR and got the same functionality in like 5 days. he did admit that he had a good head start the second time around due to all the lessons learned the first time around, but compared it to saying, "yeah, it's hot in arizona during the summer, but its a dry heat."

    it is still hot and RoR is still more efficient if the application matches the RoR framework.


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
  •