[ANN] Zero to Rails

G

Gavin Kistner

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?
 
A

Aemca

Nice !!!

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

Sam Mayes

------=_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

=20

=20
awesome, disarming, astonishing!
=20
....we want more, we want more... :)
=20
G
=20

------=_Part_29613_2905762.1126798368524--
 
P

Piergiuliano Bossi

Ryan said:
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
 
R

Ryan Davis

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.
 
R

Ryan Davis

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.
 
P

Piergiuliano Bossi

Ryan said:
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top