Posts Tagged ‘ruby on rails’

PostHeaderIcon UML and Rails

Tools for UML and Rails

In March, 2007, we posted one message on UML & Rails, it became popular. We still rank #1 when Google ‘UML Rails’. And got at least a few hits every day. So people are using UML or trying to use UML for Rails.

Something we can use for UML on Rails:

  • Ruby UML Diagrammer is a tool that leverages the RDoc to generate diagrams from a list of ruby files. One of the key features of the diagrammer is that you specify which files you want to look at, and rumld will generate a diagram for only those files: where you can see a nice Diagram of some Rails files. Project created on 2007-08-18 17:52, and updated until January 15, 2008 only… may someone carry on?
  • ruby-uml is intended to provide support for refactorisations by generating UML-graphs, trying to trace different aspects of an existing application.

    Gem dependencies:
    diff-lcs: >= 1.1.2
    Other dependencies: ruby: ruby-uml is tested with 1.8.5

  • Disappointing? Visual Paradigm came to rescue from its VP-UML 6.1: Instant generator allows you to generate source codes from class diagrams for many popular programming languages with minimal effort. Now, Ruby has been added to the list of supported languages. This feature is supported in VP-UML and SDE in Standard or higher editions.

    Visual Paradigm for UML supports generating 15 programming languages from UML class diagram. Supported programming languages include Java, C#, VB.NET, PHP, ODL, Action Script, IDL, C++, Delphi, Perl, XML Schema, Python, Objective-C, Ada 95 and Ruby. Check out their Instant code generation video. Cool! Isn’t it?

Using UML for RoR projects

I found one interesting discussion at

Posted by Roderick van Domburg (roderickvd)
on 20.11.2006 21:34

Jonathan Telfer 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

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



I love the concept of TDD (test-driven development), but I also agree with Roderick on this point.

PostHeaderIcon Best PHP, Ruby On Rails, WordPress Web Hosting

I’ve been enjoying all the benefits of one of the best and affordable web hosting services that support PHP, Ruby on Rails, MySQL, Postgres Databases, Automatic WordPress, Moodle, CubeCart, OS Commerce,Zen Cart, Joomla (and much more) installation (via Fantastico included free).

It’s Lunarpages Web Hosting service ( click this link for more details and if you sign up from my link, you may get a free application setup from me and a free ebook on how to make money online at home. Just drop me a line here after you sign up ).

Stay tuned, I’ll post some tutorials here on how to use Ruby on Rails with this wonderful hosting services. Hurry up! Now only $4.95/month with unlimited space and bandwidth, plus free software

Bookmark and Share
Follow on Buzz
Scan with your mobile phone!
InspectorWordpress has prevented 78 attacks.