RoR, Judge Judy, and little old ladies
Robby
robby.lansaw at gmail.com
Mon Feb 12 10:24:48 PST 2007
Bruno Medeiros wrote:
snipped
> Hum, in the context of the previous discussion of 1.005 features, I too
> have been trying to understand what makes Rails so special. After
> reading that article, it is my understanding that most of the goodness
> of Rails comes from the ability to generate Ruby code from the
> database's SQL schema, where that Ruby code handles all or most of the
> ORM logic. Is that correct? If so, is there anything special about Ruby
> about the language of Rails? Couldn't a similar framework be made for
> other languages, like Java for example, with similar results as Rails?
>
In this context, yes. Matter in fact there is several implementations of
active record (the ORM logic) coming in from other languages. Keep in
mind that Rails is a MVC stack for the web, written in Ruby. The ORM is
just one contribution.
> Also, from the article, I've identified two DSLs: SQL and rhtml (the
> equivalent of Java's JSPs).
In the interest of accuracy there's also yaml (an xml like language,
without the cruft), rjs (javascript templating etc). SQL isn't directly
used as a DSL, the metadata via database apis is used to generate code.
In both cases, Ruby code is generated from
> code in these two DSLs, but that code generation is performed not by the
> Ruby compiler during compile-time, but by an external tool (similar to
> parser generators for example).
No, it's done with Ruby during run time, using Ruby's dynamic and
reflective abilities.
If so, that would be mean that the D
> 1.005 features are not necessarily required or useful for the "enabling
> of such applications", which I think was the point kris was making in
> the Derailed DSL thread ago. Good interoping with DSLs is decisive, but
> that doesn't mean the interoping needs to be done at compile-time, by
> the compiler.
> Is this correct?
>
Yes
More information about the Digitalmars-d
mailing list