[Nitro] Interesting web framework article

Kirk Haines wyhaines at gmail.com
Wed Feb 21 11:58:49 EST 2007

On 2/21/07, Lars Olsson <lasso at lassoweb.se> wrote:

> The dynamic nature of ruby makes it extremely easy (perhaps too easy) to
> extend the core of the language. Both rails and nitro extends things like
> String, Array and even Object. That makes it quite difficult to get some
> libs to get along.
> I sometimes wonder why inheritance/namespaces isn't used in ruby more
> often to avoid these kinds of clashes. Even though the syntax gets a
> little ugly, you don't 'taint' the core classes with you super extra cool
> functionality.

It's a design choice.

If you are Rails, you have made the decision that you own the world,
and you don't want it to be easy for non-rails things to play in that
world.  So, messing with the core of the language makes perfect sense,
and as you point out, there is some simplicity and elegance of code
gained by this decision.

If you are Nitro, you want to leverage Facets because it dramatically
reduces the amount of code in Nitro itself to do so.  Facets, however,
by definition, extends the core classes as well because that IS
elegant so long as it doesn't walk all over something else.  It's a
perfectly reasonable design decision, but there are consequences.

The end result is that without a major change in design choices, some
frameworks, like Nitro and Rails, are going to continue to have
interoperability problems.  Whether that's a significant issue or not,
though, is open for argument.  I think it probably reduces the number
of users of Og, but I am less certain that the inability to use AR
with Nitro affects Nitro's adoption overmuch.

Kirk Haines

More information about the Nitro-general mailing list