Slashdot Mirror


Apple Publishes Ruby On Rails Tutorial

bonch writes "Apple has noticed the high amount of Mac usage in the Ruby on Rails community and has posted an illustrated Ruby on Rails tutorial. The document goes into more concise detail in getting new users up to speed, from database schema to moving beyond scaffolding, all done with the favored Rails editor, Textmate."

8 of 228 comments (clear)

  1. Re:Ruby Is Groovy by Anonymous Coward · · Score: 2, Insightful

    .NET's ORM system is nowhere near as complete or useful as the one in Rails... You're kidding yourself if you think otherwise (and yes, I have tried development in both systems and Rails beats .NET hands down)

  2. Re:Ruby Is Groovy by k2r · · Score: 2, Insightful

    > Ruby is a free spirit. It grows in like, the sunshine. It doesn't obey your rules!

    It's more like "Ruby doesn't get in your way!" as Rails dosn't do (most of the time) and OSX avoids to do quite successfully , too.

    Chunky. Bacon.
    k2r

  3. Re:Ruby Is Groovy by LarsWestergren · · Score: 2, Insightful

    Something like ruby is what apple needs to compete with .net.

    It is not like there is only room for a single programming language on a platform...

    Besides, Apple already uses Java, for instance it built the highly successful WebObjects around it. If, against all odds, .Net would completely wipe out Java there is always Mono.

    --

    Being bitter is drinking poison and hoping someone else will die

  4. Another great tutorial, but.... by MrByte420 · · Score: 3, Insightful

    The authors of rails books need to stop writing tutorials and write some comprehensive documentation. Even the page is quite lacking.

    For example, suppose you have a time field, not a date field, no year, just time. And you want to create that element in your webform.

    If it were date, you'd use date_select, pass it the name of the object and the name of the field, and your done, you get a nice input box. Suppose you want the same thing for time, its still date select with a series of discard attributes, e.g.

    date_select('meeting','starttime', :discard_year => true)

    However, you as the person looking for the documentation for this are led on somewhat of a goose chase becuase your time input box information is not even close to what you'd expect (time_select perhaps?) and you should be looking under "date" for "time".

    (Incidentally, Rails 1.0 has a bug where it seems to ignore :discard_year so the whole exercise is quite fustrating when you do find the docs, but i can live with bugs that will be fixed)

    --
    If religous zealots don't believe in Evolution, then why are they so worried about bird flu?
  5. Usual omission... by Anonymous Coward · · Score: 1, Insightful

    "In version 2 of my generic Ruby On Rails tutorial, I'll show you how to add some security to your site, so that not everyone can delete your todos/add expenses/edit your photos".

      Nooo! You've got to get security right from the start! Start with minimal privilege and add only that that is required. Otherwise you'll end up with an unholy holey mess.

      If your web-based framework lets you write something that lets you modify anything on the server without either logging in or explicitly telling the code its okay, then choose another framework ASAP.

      Yes you can add-on security to RoR, but it'll always be an add-on...

    1. Re:Usual omission... by An+Onerous+Coward · · Score: 2, Insightful

      I'm in the middle of writing a fairly substantial website in Rails. The first iteration of the site, everyone could do everything to every bit of data. The second version? I added one line of code to the parent of my controllers:

      before_filter :authorized? :except => ['show', 'list', 'index']

      The authorized? function redirects users to the login page if they're not already logged in. So the result is, it's trivial to add validation code before every single action that makes changes to the database. If I want to add a function that validates that the person making changes is the person who owns the object being changed, that's one more function and one more line of code. I haven't done it, because it's supposed to be a collaboration tool where people are encouraged to edit each others' work.

      You can do similar things to the models, defining actions and checks that have to happen before a database entry can be changed.

      I'm really not seeing the point of your rant. If you want security on Rails, it's easy to go from zero security to total lockdown, then back off until the app is functional.

      --

      You want the truthiness? You can't handle the truthiness!

  6. Re:Wish they'd spend this time patching bugs by 99BottlesOfBeerInMyF · · Score: 2, Insightful

    Umm, the guys who write Web development tutorials for Apple are probably not the same guys that code the OS and applications. This tutorial wasn't actually written by Apple, they are just distributing it. You know the guys in finance are still working on accounts and haven't stopped to try to fix bugs in code either. I've been annoyed by Apple's weird handling of metadata versus extensions since they announced it but you are way off base in complaining about this as if it had some relation to security issues.

  7. Re:Looks interesting by kbob88 · · Score: 2, Insightful

    I use it extensively (every day) to develop large, internally-focused applications. Our production environment is Linux Debian, while our development environment is (ugh) Windows.

    We use Eclipse with the RDT plug-in for Ruby. It's quite nice. Not as great an IDE as IntelliJ IDEA, but pretty good. There's not much Ruby-specific functionality in Eclipse yet that I can see, but it's certainly better than a basic Windows editor.

    We also use PostgreSQL, which has been very nice, stable, and fast. We've never had any problems with it and ROR. We use phpPgAdmin to administer it on production and pgAdmin III to administer it on development, both of which are fairly good database browser/query tools.

    So far the experience has been great. More worrying than the tools is ActiveRecord, which has a lot of nice features, but a few really glaring holes.