RoR, Judge Judy, and little old ladies

Sean Kelly sean at f4.ca
Fri Feb 16 08:22:53 PST 2007


Bruno Medeiros wrote:
> Sean Kelly wrote:
>> Bruno Medeiros wrote:
>>> Robby wrote:
>>>> Bruno Medeiros wrote:
>>>>> 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.
>>>
>>> Hum, I had understood scaffolding to be the process where it 
>>> generated Ruby code by looking at the DB schema. So if I change the 
>>> DB schema, I don't have to run scaffolding again? I only need to 
>>> restart the web app, since it can reflectively and dynamically create 
>>> its own ORM logic?
>>
>> Unless you actually want to do something with that data, I assume.
> 
> What do you mean? I am of course talking in the case where the web app 
> works with the data, otherwise the point of needing or not needing to 
> restart the app was moot.

So say you modify your schema and the application self-adapts.  Unless 
it is designed to merely pass all data through to the user (which may be 
common in web apps), the app will require some specialized code to 
operate on the data to achieve the desired result.  This obviously 
cannot be generated automatically because only the programmer knows what 
it should be.


Sean



More information about the Digitalmars-d mailing list