Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[ANN] Zero to Rails

0 views
Skip to first unread message

Ryan Davis

unread,
Sep 15, 2005, 6:05:58 AM9/15/05
to
From absolutely nothing to a running rails app in under two minutes.
SQL not required.

http://blog.zenspider.com/

Demo movie online. Release forthcoming.

Gavin Kistner

unread,
Sep 15, 2005, 9:41:58 AM9/15/05
to
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

unread,
Sep 15, 2005, 9:53:57 AM9/15/05
to
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?


Piergiuliano Bossi

unread,
Sep 15, 2005, 10:28:55 AM9/15/05
to

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

Aemca

unread,
Sep 15, 2005, 11:03:37 AM9/15/05
to
Nice !!!

Any details on what shortcuts you used ?
Or is that to be found at the blog ?


Sam Mayes

unread,
Sep 15, 2005, 11:32:50 AM9/15/05
to
Oh please release these scripts.

Sam

On 9/15/05, Piergiuliano Bossi <p_bossi_AG...@tiscali.it> wrote:
>
> 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... :-)

Piergiuliano Bossi

unread,
Sep 15, 2005, 12:20:57 PM9/15/05
to

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

Ryan Davis

unread,
Sep 15, 2005, 12:43:48 PM9/15/05
to

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

unread,
Sep 15, 2005, 12:57:06 PM9/15/05
to

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.

Piergiuliano Bossi

unread,
Sep 15, 2005, 1:04:16 PM9/15/05
to
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.

Ryan Davis

unread,
Sep 15, 2005, 8:32:41 PM9/15/05
to

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

> Any details on what shortcuts you used ?

Sorry? What do you mean by shortcuts?


0 new messages