SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Hybrid View

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

    Using Ruby as a PHP replacement?

    Hi,

    Does anyone know of any books or online tutorials that would detail the following in Ruby?

    1. Forms
    2. Files
    3. Sessions
    4. SQL Queries
    5. HTML integration

    I've googled quite a bit and started reading the Agile book, but I haven't really gotten a good grasp on the above topics. Any help is appreciated. It seems to me that there are a lot of PHP tutorials online but not many Ruby ones. Granted it is a newer language, I may still be missing some killer resource. Thanks.

    TMK

  2. #2
    SitePoint Evangelist
    Join Date
    Jun 2004
    Location
    California
    Posts
    440
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are you talking about ruby on rails? There are many tutorials out there describing what you want. But they are spread out among:

    1. Documentation page on the rails site
    2. API manual
    3. The Wiki

    And of course using google will pull up a few tutorial sites Just search and you will find. I never remember having a hard time finding good rails tutorials. But make sure you learn ruby first!

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

    Thanks. Hm, I never got that stuff on google. I gotta try harder. As for the API, I should have turned there first. Excuse my noobishness while I go look at it .

    TMK

  4. #4
    SitePoint Evangelist
    Join Date
    Jun 2004
    Location
    California
    Posts
    440
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    APIs are only good if you know exactly what youre looking for, like you, looking for sessions and validation. But this a great page:

    http://www.rubyonrails.com/docs

    Which lists documentation resources, but dont forget the wiki, I go to the wiki and API docs almost every day.

  5. #5
    SitePoint Wizard samsm's Avatar
    Join Date
    Nov 2001
    Location
    Atlanta, GA, USA
    Posts
    5,011
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here's some stuff that comes to mind that you might find useful.

    For forms, there are a number of helpers, read up on them in the api. Some of them work with Active Record to try to create a lot of the form with minimal input from you, others rely on you to say what is going on. Here are a few links:
    http://api.rubyonrails.com/classes/A...ormHelper.html
    http://api.rubyonrails.com/classes/A...onsHelper.html
    http://api.rubyonrails.com/classes/A...TagHelper.html

    Of course, you can also piece together forms using ERB templates just like you might with PHP.

    Sessions are similar to PHP. You save data to session['whatever'] it is available on the next page as session['whatever']. I'm not sure what else to say about that. It works on cookies and there isn't an auto-fake it in the url thing like in PHP.

    SQL Queries. Skip them as a beginner. You can do queries, but if Active Record has a good built-in model for what you need, you might not have to.
    Using your unpaid time to add free content to SitePoint Pty Ltd's portfolio?


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
  •