Open Source UML Tool for Ruby on Rails?


#1

I am new to web development, Ruby on Rails, and UML as well. I was
wondering if there were any free tools available for UML design.
There is a list of free tools on wikipedia under UML tools, but I don’t
understand if I need a tool that supports the ruby language. If anyone
uses a free UML tool for designing Ruby on Rails apps, please let me
know what you use.


#2

lambo4jos wrote:

I am new to web development, Ruby on Rails, and UML as well. I was
wondering if there were any free tools available for UML design.
There is a list of free tools on wikipedia under UML tools, but I don’t
understand if I need a tool that supports the ruby language. If anyone
uses a free UML tool for designing Ruby on Rails apps, please let me
know what you use.

I’m going to take a guess that UML probably isn’t heavily used by most
RoR developers apart from perhaps some early stage sketching. I’d
recommend reading “Use Case Driven Object Modeling with UML: A Practical
Approach” as that’s based on the ICONIX process which is agile.

There’s a good open source diagramming tool called Dia, but virtually
any reasonable drawing package would do unless you’re going to get into
automatic code generation.

I’ve not heard of any tool for doing UML diagrams and converting them
automagically into Rails apps, but that’s not to say one doesn’t exist.
Dia’s diagrams are saved as (documented) XML, so it’s probably possible
to rustle up some code to take a diagram and generate the initial
application files from it.


#3

Late last night I have come to realize that UML is probably not used by
most Rails developers.

Remember I am new to web development, but just out of curiosity: I
want to build an application that has very strict business rules such
as the strictness of a site like ebay. I know rails is meant to be
agile, through iterative development, but the business rules I have are
very exact and I feel the modeling must be done prior to development.
I have created some rough ideas of the rules on paper, but I know I am
missing somethings. I was thinking the UML would be a good way to
cover everything, and I did come across the ICONIX process.

What I am asking: Rails follows the MVC architecture. How would the
UML apply to MVC and rails development?

If anyone has suggestions of methods they use to model strict rules
prior to coding, please let me know what works for you.

Regards


#4

On 9/19/06, lambo4jos removed_email_address@domain.invalid wrote:

missing somethings. I was thinking the UML would be a good way to
cover everything, and I did come across the ICONIX process.

I’m not getting you here - unless your business rules specify an
architecture (or whatever it is you’re hoping to model with UML), then
the 2 concerns are orthogonal.


If the code and the comments disagree, then both are probably wrong.
–Norm Schryer


#5

he means they are perpendicular +

On 9/20/06, lambo4jos removed_email_address@domain.invalid wrote:

Well yes, my business rules specify an architecture. Can you elaborate
on what you mean by “the 2 concerns are orthogonal.”

www.blogsaic.com
search, post, blog


#6

I understand that he means perpendicular. So are you suggesting to
only do things in parallel, and because my business rules specify an
architecture, does that mean you are suggesting that I do use the UML
in parallel? The point made has been unclear and confusing.


#7

Well yes, my business rules specify an architecture. Can you elaborate
on what you mean by “the 2 concerns are orthogonal.”


#8

On 9/20/06, lambo4jos removed_email_address@domain.invalid wrote:

I understand that he means perpendicular. So are you suggesting to
only do things in parallel, and because my business rules specify an
architecture, does that mean you are suggesting that I do use the UML
in parallel? The point made has been unclear and confusing.

Orthogonality in this context means that they are independent. Your
architecture should not have to change if the business rules change,
and vice versa - they are othogonal. If they are not, changes in your
business rules (which will invariable happen, on every project) will
require refactoring and architectural changes, which is not a good
thing. If business rules change, some redevelopment or additional
development can be expected, but this should not have to occur at the
architectural level.

As you haven’t given any examples of the kind of business rules you
are dealing with, it’s impossible to advise on whether parts of UML
could be appropriate to model the rules.

I find it hard to unambiguously express complex business processes in
UML, but some of the useful things you can do is to design a rich
domain model and support that with sequence diagrams for the main
interactions between your model classes.

BTW, a nice (free as in beer) modelling tool is the community edition
of Poseidon (www.gentleware.com).

You should not expect to find any UML modelling tools that can
generate or reverse engineer ruby code though.

Cheers,
Max


#9

Has anyone used rSpec here?

I don’t know if rSpec adds more than just renaming test to specification
and making it explicit to
test behaviour instead of methods.

Has anyone used Zentest? Does anyone have any links for beginners? I
have already read the Linux
journal article. I am looking for something that covers all features of
Zentest. TIA.


#10

Look into selenium. The ruby integration is significant, and it works
very
much like FIT.

Apple MacBook. Black. It’s the new White!

Peter F.


#11

lambo4jos wrote:

Late last night I have come to realize that UML is probably not used by
most Rails developers.

Most RoR developers (may I have a show of hands?) use Developer Centric
Testing, leading up to TDD.

Remember I am new to web development, but just out of curiosity: I
want to build an application that has very strict business rules such
as the strictness of a site like ebay.

So you need zillions of unit tests that test the snot out of your Model
and Controller classes - in isolation from the GUI. Then the Views will
know any data they get is clean, and any inputs they send to the Model
are guarded.

I know rails is meant to be
agile, through iterative development, but the business rules I have are
very exact and I feel the modeling must be done prior to development.

The great thing about a good design is you can add anything after you
start coding, including a better design.

The great thing about unit tests is you can change the design without
afflicting the existing behavior. So TDD makes your first design less
important. You have more than just one chance to get it right.

I have created some rough ideas of the rules on paper, but I know I am
missing somethings. I was thinking the UML would be a good way to
cover everything, and I did come across the ICONIX process.

Another feature you should try is literate acceptance tests, like those
at http://fitnesse.org .

I have a question for anyone with the stamina to read my post this far:
What’s the closest FitNesse can get to Rails? I currently am trying
FitNesse -> RubyFit -> Longboard (an example of integration) -> Watir
-> the RoR site, end-to-end.

If I try for another test suite, with FitNesse -> RubyFit -> the RoR
test folder stuff, is there a module or sample out there to make this
easy? (Or, as usual for RoR, just freaking instant?)

Has anyone used rSpec here?

http://rspec.rubyforge.org/tools/rails.html

Is there a benefit to going FitNesse -> Something -> rSpec -> Rails?
Would that make things more literate?

What I am asking: Rails follows the MVC architecture. How would the
UML apply to MVC and rails development?

That part appears to be finished for you! :wink:


#12

Well it’s not UML, but you could try RAV - http://rav.rubyforge.org/

Tom

Jacquie wrote:

I am trying to find a tool to describe the correlation of
models,controllers and views in my program.

But according to Max, there is no such tool in RoR. so I guess I need to
use a draw tool and describe them by myself?

any comments?

BTW, a nice (free as in beer) modelling tool is the community edition
of Poseidon (www.gentleware.com).

You should not expect to find any UML modelling tools that can
generate or reverse engineer ruby code though.

Cheers,
Max


#13

I am trying to find a tool to describe the correlation of
models,controllers and views in my program.

But according to Max, there is no such tool in RoR. so I guess I need to
use a draw tool and describe them by myself?

any comments?

BTW, a nice (free as in beer) modelling tool is the community edition
of Poseidon (www.gentleware.com).

You should not expect to find any UML modelling tools that can
generate or reverse engineer ruby code though.

Cheers,
Max


#14

Roderick van Domburg wrote:

Indeed a lot of attention is drawn to TDD, but usually, I digress. Tests
aren’t what drives my own business or that of my client, and so I feel
the very name of the approach doesn’t fit my intents. Personally I favor
Feature Driven Development (FDD) with doing as much as I can to ensure
quality.
…[snipped]

You’re comparing apple and oranges here :slight_smile: Can TDD/BDD be used in
the build phase of FDD? If you’re not already, then you should :slight_smile:


#15

removed_email_address@domain.invalid wrote:

You’re comparing apple and oranges here :slight_smile: Can TDD/BDD be used in
the build phase of FDD? If you’re not already, then you should :slight_smile:

Could you explain? The way I see it, you either approach coding from a
feature perspective (and continue with testing) or alternatively from a
testing perspective (and then continue with implementation).

If you’re referring to integration testing of whatever sorts, I wasn’t
saying that is partial to either TDD and FDD and do believe that both
methodologies should adopt that sort of testing.

Cheers,

Roderick


#16

Jonathan T. wrote:

I’m going to take a guess that UML probably isn’t heavily used by most
RoR developers apart from perhaps some early stage sketching. I’d
recommend reading “Use Case Driven Object Modeling with UML: A Practical
Approach” as that’s based on the ICONIX process which is agile.

I have no idea what the RoR development community at large does or does
not use, but would like to point out that UML by itself describes no
design methodology. In fact, I would say that UML is as great as a tool
to do RoR modeling in as it is standards-based and generally accepted.

It seems a common misconception that UML and model driven engineering
lead are automatically coupled to waterfall-types of design processes.
But beauty is in the eye of the beholder. As is agile development, which
may be considered as developer joyriding when done improperly – same
thing that happens with XP all too often. If you sketch anyway, why not
use UML?

Here’s my experience: static structure diagrams, activity diagrams,
sequence diagrams are all well worth their while when not overdone.
SSD’s easily map to Rails models. Activity diagrams can be useful in
determining action flows (single- or cross-controller). Sequence
diagrams are useful with webservices.

Do I consistently use every UML technique with every single project,
every single model and every single controller? No. I use it when my
mind begins to boggle, or when I know that a certain part of the system
will be sensitive to change. Evolution always plays a part, and
personally like to plan ahead instead of cleaning up later – I know
that’ll be way more costly.

That being said, use cases seldom do work out. The reason for that is
this: use cases do not elicit the abstract concepts necessary to build a
solid architecture. Your client may agree with that “puppet called an
actor” can do tasks X, Y and Z, but I ask you: where does that leave you
as a developer? Simple systems may not require explicit architectures,
but mistaking agile development with “sketches boring, coding good!”
will certainly impede the more complex systems.

Most RoR developers (may I have a show of hands?) use Developer Centric
Testing, leading up to TDD.

Indeed a lot of attention is drawn to TDD, but usually, I digress. Tests
aren’t what drives my own business or that of my client, and so I feel
the very name of the approach doesn’t fit my intents. Personally I favor
Feature Driven Development (FDD) with doing as much as I can to ensure
quality.

Tests, by their very nature, are created and executed in a controlled
environment. Providing full coverage (not just the 100% green rcov bars,
but actually having walked through all the input invariants) may be
possible as a project grows more complex, but its feasibility decreases
dramatically. And when I know that I’m going to have holes in my
coverage, I might just as well take another stance: FDD.

My approach of FDD differs in that I care about functionality, not
tests. After having thought about my architecture beforehand, I start
implementing. Mind you: no checkins without having proper and passing
tests. I do my best to write a number of tests that cover both proper
input and possible garbage, but I know I’m going to miss a spot. That’s
OK – in my critical code I’ll put in a couple of defensive measures
like validation (easily done with Rails) and proper error handling &
notifaction (likewise, easily done).

(Not being a TDD regular myself, I wonder how many developers dismiss
defensive coding. This is my curiosity speaking, not intended as a
statement below the belt.)

One might say that it’s a matter of opinion, and I’ll agree. But I will
not agree that either produces higher quality code than the other. You
can write broken tests, and may likewise mess up your application. TDD
is no excuse for not having an architecture. With an architecture in
place I say either TDD or FDD may miss just as many stitches, and that
being the case, my prime focus will be getting functional results any
day.

Cheers,

Roderick


#17

removed_email_address@domain.invalid wrote:

I’ve not personally utilized FDD so my understanding of it is mostly
textbook, but isn’t FDD more of a development process/methodology
(bigger) and TDD is more of a technique (smaller). I have a lot more
experience with TDD in an XP process so I’d say FDD is more comparable
to XP than TDD.

Check this out:
http://tesugen.com/archives/02/06/understanding-xpthrough-fdd

Thanks, that’s an interesting link.

I now understand why you thought that I was comparing apples to oranges
and the way I put it, perhaps I was. My bottom line is this: a lot of
Rails developers I’ve seen seem to be hiding terms of “agility” and TDD
when they indeed lack a sound architecture and development process. But
that’s not what TDD is about, nor is dismissing architectural design in
the face of agility.

Seeing UML dismissed just struck a note :slight_smile: Indeed, like you say, FDD is
not the opposite of TDD.
But enough evangelism for one day. :wink:

  • Roderick

#18

I’ve not personally utilized FDD so my understanding of it is mostly
textbook, but isn’t FDD more of a development process/methodology
(bigger) and TDD is more of a technique (smaller). I have a lot more
experience with TDD in an XP process so I’d say FDD is more comparable
to XP than TDD.

Check this out:
http://tesugen.com/archives/02/06/understanding-xpthrough-fdd


#19

lambo4jos wrote:

I am new to web development, Ruby on Rails, and UML as well. I was
wondering if there were any free tools available for UML design.
There is a list of free tools on wikipedia under UML tools, but I don’t
understand if I need a tool that supports the ruby language. If anyone
uses a free UML tool for designing Ruby on Rails apps, please let me
know what you use.

I think the best idea is a open soure and multi plaftorm CASE tools I
guess you work in linux or maybe mac… so try this:
http://case-tools.org/ I recommend you to take a simple tools for single
user, are easier to learn and more usable (generally)

regards,