[ANN] Zero to Rails

Discussion in 'Ruby' started by Ryan Davis, Sep 15, 2005.

  1. Ryan Davis

    Ryan Davis Guest

    From absolutely nothing to a running rails app in under two minutes.
    SQL not required.

    http://blog.zenspider.com/

    Demo movie online. Release forthcoming.
    Ryan Davis, Sep 15, 2005
    #1
    1. Advertising

  2. On Sep 15, 2005, at 4:05 AM, Ryan Davis wrote:
    > Demo movie online. Release forthcoming.


    Demo movie mirrored at http://phrogz.net/RubyLibs/
    ZeroToRailsIn2Min.mov because the server seemed to be getting
    slaughtered.

    Ryan, simply give the word and I'll take it down, if you don't want
    the mirror.
    Gavin Kistner, Sep 15, 2005
    #2
    1. Advertising

  3. On Sep 15, 2005, at 4:05 AM, Ryan Davis wrote:
    > From absolutely nothing to a running rails app in under two
    > minutes. SQL not required.


    BTW, that's frickin' awesome. I've wanted OG->SQL for a very long time.

    How hard do you think it would be to modify your script to support
    tables that looked like this:
    http://phrogz.net/tmp/BoulderMenuTables-b.png

    Trickiest, I suppose, would be detecting the 'green' habtm tables and
    not creating models for them. And how would you or do you detect
    which nodes were FKs? Just the _id at the end?
    Gavin Kistner, Sep 15, 2005
    #3
  4. Ryan Davis wrote:
    > From absolutely nothing to a running rails app in under two minutes.
    > SQL not required.
    >
    > http://blog.zenspider.com/
    >
    > Demo movie online. Release forthcoming.
    >
    >
    >


    awesome, disarming, astonishing!

    ....we want more, we want more... :)

    G

    --
    If you want to send me an email address should be 'p', then a dot,
    followed by 'bossi' at 'quinary', another dot and 'com' at last
    Piergiuliano Bossi, Sep 15, 2005
    #4
  5. Ryan Davis

    Aemca Guest

    Nice !!!

    Any details on what shortcuts you used ?
    Or is that to be found at the blog ?
    Aemca, Sep 15, 2005
    #5
  6. Ryan Davis

    Sam Mayes Guest

    ------=_Part_29613_2905762.1126798368524
    Content-Type: text/plain; charset=ISO-8859-1
    Content-Transfer-Encoding: quoted-printable
    Content-Disposition: inline

    Oh please release these scripts.

    Sam

    On 9/15/05, Piergiuliano Bossi <> wrote:
    >=20
    > Ryan Davis wrote:
    > > From absolutely nothing to a running rails app in under two minutes.
    > > SQL not required.
    > >
    > > http://blog.zenspider.com/
    > >
    > > Demo movie online. Release forthcoming.
    > >
    > >
    > >

    >=20
    > awesome, disarming, astonishing!
    >=20
    > ....we want more, we want more... :)
    >=20
    > G
    >=20
    > --
    > If you want to send me an email address should be 'p', then a dot,
    > followed by 'bossi' at 'quinary', another dot and 'com' at last
    >=20
    >


    ------=_Part_29613_2905762.1126798368524--
    Sam Mayes, Sep 15, 2005
    #6
  7. Ryan Davis wrote:
    > From absolutely nothing to a running rails app in under two minutes.
    > SQL not required.
    >
    > http://blog.zenspider.com/
    >
    > Demo movie online. Release forthcoming.
    >
    >
    >


    Ryan, I have a few questions from a collegue (who in turns indicated
    rapidj as a comparable example in the java world, generating struts code
    with all the implied consequences, of course):
    *) how much time have you spent on developing your scripts?
    *) how big they are? (of course if you release I can answer myself)
    *) what do they do in the end?

    Thanks
    G

    --
    If you want to send me an email address should be 'p', then a dot,
    followed by 'bossi' at 'quinary', another dot and 'com' at last
    Piergiuliano Bossi, Sep 15, 2005
    #7
  8. Ryan Davis

    Ryan Davis Guest

    On Sep 15, 2005, at 6:53 AM, Gavin Kistner wrote:

    > On Sep 15, 2005, at 4:05 AM, Ryan Davis wrote:
    >
    >> From absolutely nothing to a running rails app in under two
    >> minutes. SQL not required.
    >>

    >
    > BTW, that's frickin' awesome. I've wanted OG->SQL for a very long
    > time.
    >
    > How hard do you think it would be to modify your script to support
    > tables that looked like this:
    > http://phrogz.net/tmp/BoulderMenuTables-b.png


    Well, it'd be easier to modify your data. 1) OG4 now has tables which
    will make your life a LOT easier. It wasn't obvious, but in the movie
    I was adding new cells (rects) to a table (group), not just adding a
    line to a text element.

    It looks like it supports almost all of your diagram already, with
    the exception of having your PK be something other than integer (I
    think the PK generation assumes int iirc).

    Oh, and we'd have to add "TABLE" to the first field.

    > Trickiest, I suppose, would be detecting the 'green' habtm tables
    > and not creating models for them. And how would you or do you
    > detect which nodes were FKs? Just the _id at the end?


    It'd do your HABTM's just fine.
    Ryan Davis, Sep 15, 2005
    #8
  9. Ryan Davis

    Ryan Davis Guest

    On Sep 15, 2005, at 9:21 AM, Piergiuliano Bossi wrote:

    > Ryan, I have a few questions from a collegue (who in turns
    > indicated rapidj as a comparable example in the java world,
    > generating struts code with all the implied consequences, of course):


    rapidj starts at $400US and does one thing only. Graffle starts at
    $80, might already be on your powerbook or powermac, and makes
    beautiful diagrams and charts of any kind. It is what visio wishes it
    could be.

    > *) how much time have you spent on developing your scripts?


    Hrm... Probably 3 hours or so for the applescript. About an hour or
    two for the ruby.

    > *) how big they are? (of course if you release I can answer myself)


    The SQL generator is approximately 140 lines of applescript.
    The model generator is approximately 130 lines of ruby.
    The movie is approximately 3 meg. :)

    > *) what do they do in the end?


    Generate SQL and the relationship fields in the model. The model
    generator also: runs your rails command (no biggie); modifies your
    database.yaml to connect to postgresql (because WHO in their right
    mind would use mysql, really?), changes the username and db names so
    it will immediately connect; tells you what commands you might like
    to run to get bootstrapped; and then finally generates the model.
    Ryan Davis, Sep 15, 2005
    #9
  10. Ryan Davis wrote:
    > rapidj starts at $400US and does one thing only. Graffle starts at $80,
    > might already be on your powerbook or powermac, and makes beautiful
    > diagrams and charts of any kind. It is what visio wishes it could be.


    Indeed he was more impressed by graffle than rapidj! :)

    [snip]
    > Generate SQL and the relationship fields in the model. The model
    > generator also: runs your rails command (no biggie); modifies your
    > database.yaml to connect to postgresql (because WHO in their right mind
    > would use mysql, really?), changes the username and db names so it will
    > immediately connect; tells you what commands you might like to run to
    > get bootstrapped; and then finally generates the model.


    Very nice, thanks. I think you understand that we all are willing to
    take a look... :)

    Well done.
    G

    --
    If you want to send me an email address should be 'p', then a dot,
    followed by 'bossi' at 'quinary', another dot and 'com' at last
    Piergiuliano Bossi, Sep 15, 2005
    #10
  11. Ryan Davis

    Ryan Davis Guest

    On Sep 15, 2005, at 8:06 AM, Aemca wrote:

    > Any details on what shortcuts you used ?


    Sorry? What do you mean by shortcuts?
    Ryan Davis, Sep 16, 2005
    #11
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Zhiqiang Ye
    Replies:
    53
    Views:
    10,193
    Dan Pop
    Jun 28, 2004
  2. Gerard Flanagan
    Replies:
    3
    Views:
    422
    Terry Hancock
    Nov 19, 2005
  3. Christopher Benson-Manica

    Doubles and zero/negative zero

    Christopher Benson-Manica, Jun 30, 2004, in forum: C Programming
    Replies:
    4
    Views:
    654
    Walter
    Jul 1, 2004
  4. Michael Schuerig
    Replies:
    3
    Views:
    209
    Carl Youngblood
    Jun 17, 2005
  5. sur
    Replies:
    0
    Views:
    182
Loading...

Share This Page