[Rails] Re: UML
Brez! !!
jbresnik at gmail.com
Mon Aug 14 07:50:54 GMT 2006
Rails, specifically ActiveRecord [the 'Model' in MVC], serves the very
specific role of object-relational mapping and as a result the entire
framework [currently] is very database centric [as intended by its
author].. I came from an RSA [of course it was called rose back then]
world and a similar experience that it seems youre having when being
introduced to rails. What you need to look into is 'Migrations':
http://wiki.rubyonrails.org/rails/pages/UnderstandingMigrations
This essentially allows you to describe your database tables/handle the
management and migration of them in pure ruby [as opposed to SQL] - you
still have to describe their relationships in the Model classes that you
generate as a result of the table generation.
Unfortunatly RSA [and arguably UML] won't do you much good other than
perhaps a UML-esque diagram of your model [which could be invaluable if
things get complex] - the most popular UML concepts exist in database
design as well, c.f. aggregation and has_many, etc. As you'll find
modeling data is fundamentally similar regardless of what abstract lingo
you choose to author it in..
Theres also a difference of culture at play [I'm assuming] RSA, and all
the tools in the Rational Unified Process are very concerned with
process, documentation, etc. Rails is a framework geared toward Agile
development, which is generally not concerned with formal processes, nor
detailed documentation like a sequence diagram, et al. i.e. youre
mixing apples and oranges..
Jamie wrote:
> In Rolling with Ruby on Rails tutorial -
> http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html - I saw that to
> introduce a new element to my domain, I needed to define it in a table,
> generate a model element with a similar name and the class would
> autoamtically take the attributes from the table definition. Is it
> possible to do this in the other direction... i.e to take the class
> diagram and automatically generate the table definition. Would this be
> something build into Rails, or require a 3rd party tool?
>
> My intention is to use RSA to define my domain model, export the classes
> to Ruby and use this to drive the scaffolding set up in Rails.
>
> If you have any direct experince with this or can point me to other
> tutorials, it would be much appreciated!
>
> ---------> Jamie
--
Posted via http://www.ruby-forum.com/.
More information about the Rails
mailing list