Forum: Ruby on Rails Bottom Up ORM / scaffolding

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
ElKlaaso (Guest)
on 2007-06-22 05:16
(Received via mailing list)
Hi,
I am a total newbie to ruby on rails, but have been investigating it
and ruby and ruby on rails seem to have a LOT of things i really like
about a programming language.. liked most of it.. except 1 thing..

And that is ruby on rails scaffolding, it build up ur basic model view
controller from the database! I really dont like that..

I am the kind of developer that likes to design his application object
oriented (UML), and base the application on that.. not on the database
that i derive from the object model..

By building ruby objects bottom up from the database i loose all kinds
of things, like generalization, association classes, interfaces...

Probably this can all be re-adjusted after scaffolding, but im looking
for the perfect language to sink my head in.. with everything i like..
possibly build my career on it.

Can somebody tell me if i am right about what im saying about ruby on
rails scaffolding or not?

Regards,
Klaas
Jeff P. (Guest)
on 2007-06-22 06:54
ElKlaaso wrote:
> Hi,
>>
> Can somebody tell me if i am right about what im saying about ruby on
> rails scaffolding or not?
>
> Regards,
> Klaas

The scaffolding is completely optional.  I only use that for things like
admin screens and such.  For the "real stuff", I build it myself.  I
think many others do this too.

jp
Richard C. (Guest)
on 2007-06-22 17:32
(Received via mailing list)
On 6/22/07, ElKlaaso <removed_email_address@domain.invalid> wrote:
>
> Hi,
> I am a total newbie to ruby on rails, but have been investigating it
> and ruby and ruby on rails seem to have a LOT of things i really like
> about a programming language.. liked most of it.. except 1 thing..
>
> And that is ruby on rails scaffolding, it build up ur basic model view
> controller from the database! I really dont like that..

Rails expects you to be building your system on top of a database.
Its not just Rails scaffolding (auto generation of Rails code).

Rails doesn't put a gun to your head - you could easily add object only
relationships (no Joins) into your models. Your performance would be
crippled however.

You could also look into Nitro/Og, a competing Ruby Web MVC framework
to Rails but it has a different philosophy: You design your model
objects
first, and it figures out your best-fit database.

I wouldn't be the strongest fan of UML-generated code approaches in
any language, and spitting out Ruby code from Rational Rose or
whatever just seems wrong really - UML implies static which just
defeats the point of using Ruby in most cases.

You should really at least try to come to terms with Rails way of
thinking
however.
ElKlaaso (Guest)
on 2007-06-23 14:39
(Received via mailing list)
Hi richard,
Thank you very much for your help!

What do you mean with UML implies static? You mean that the model
cannot change? You mean that ruby on rails adjusts the model if the
database changes right... aha.. never thought of it in that way. It is
only that UML is just more powerful than relational, and what i have
read about the MVC framework, is that it is build that way because
model changes least, then controller, and view changes most..

I sometimes wonder what the big deal is with anticipating a
dynamically changing model, especially when you are already working
with an MVC framework that will prevent you getting into to much
trouble when your model changes..
If your model changes a lot, u have not designed the right model for
your application, because i do this daily i know that it takes a lot
to setup a model that takes everything into consideration. I also now
that it is almost impossible to get everything right the first time,
but thats why there is prototyping ..

I would like to hear what people have to say to this..

greets,
klaas-jan
This topic is locked and can not be replied to.