« Return to Thread: Is the rails 2.0 scaffold system philosophically ( not technically? ) broken?

Re: Is the rails 2.0 scaffold system philosophically ( not t

by paron :: Rate this Message:

Reply to Author | View in Thread


Baz,

You don't have to read very far into this thread to realize that most
of the responders, and most of the developers making decisions about
Rail's long term direction, are consultants or independent software
houses working on de novo apps, just like 37Signals. So, you may not
get many replies to your question:

> But seriously, how does one "import" and already existing database design
> into a Rails Project? I'm talking about 100+ tables, with (on average) 20+
> fields.

because that's not a problem for them. Obviously, the old
introspecting scaffold that responded to existing tables is of little
interest for them; in their world, the tables don't exist until they
are designing their app, or they are just tweaking an app they've
already written.

So, anyone who questions the elimination of the old-school scaffolding
is assumed to be a newbie trying to avoid learning the framework.

Enterprise developers, who don't have the luxury of designing from the
ground up, are just a tiny minority in the Rails world. I'm afraid
that decisions like this one will be the pattern for some time to
come. If they had made the "introspecting scaffolding" a plug-in, I
might have thought the needs of enterprise developers were at least
considered, but they completely eliminated it so it dies without a
whimper. Maybe the framework will be strong enough to find use in the
enterprise anyway, and maybe not.

>For me, web development is about getting stuff done.

Yeah, me, too. I've been using the RoR framework for nearly two years;
I'm not a newbie; I'm perfectly comfortable writing controllers. Like
you, I've inherited some tables with a jillion columns, and it is far
faster to delete some auto-generated code than to type in all those
column names/types.

So, here's a thread that actually addresses your concern:
http://groups.google.com/group/rubyonrails-talk/browse_frm/thread/6b745a5475b29231/15335cc35b8e90ad?hl=en&lnk=gst&q=scaffolding#
Brian Hogan has a gem that will scaffold the forms, at least.
http://scaffoldform.rubyforge.org/

I modified his scaffoldform to make a generator that does something
similar for the show and index pages as well. It's not quite ready for
prime time, but it works for what I need.

It is called scaffold_reflect: you put it where Rails expects to find
generators and then use scaffold_reflect TableName and it makes index,
show, edit form, and new form pages for the table, with every field
(except _id fields) represented by a reasonable  HTML entity. Similar
to the old-school scaffolding, except that every field is spelled out
there ready to modify or delete. No need to type in the structure of a
table that already exists, right?

If you're interested, send me an email and I'll package it up for you
and send it on. Even with its little peculiarities, it is a lot faster
than the new scaffolding for an existing table.

Ron
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@...
To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

 « Return to Thread: Is the rails 2.0 scaffold system philosophically ( not technically? ) broken?