[Nitro] Generating scaffolding / stub codes?

S P Arif Sahari Wibowo arifsaha at yahoo.com
Wed Feb 22 12:08:39 EST 2006


On Tue, 21 Feb 2006, James Britt wrote:

> S P Arif Sahari Wibowo wrote:
>> I have a newbie questions: is there a way in Nitro to 
>> generate stub / scaffolding codes (like generate scaffold in 
>> Rails)?
>
> Yes and no.  The "no" part is that Nitro (gen, actually) only 
> knows one trick: "gen app"

Hmm, it seems that scaffolding code generation will be a bit 
different, since it is done after the application has been 
generated (it require a model / table structure as input). Can 
gen generate a structure on the top and based on existing 
application?

I found out that - at least for me, who is newbie both in Nitro 
and Ruby - learn by good example is much much easier than 
reading any explanatory / guiding tutorials. And scaffolding 
codes is basically a "super example", example that tailored 
closer to the user's need. So it even much much easier to learn 
from scaffolding codes, 10 times easier than reading tutorials.

> On the other hand, I wrote my own controller stub generator 
> with very little effort.

Would you mind share them?

How about views generator?

> I'd really like a way for me to bundle up my custom generators 
> as a gem, so others can install it if they like, with the new 
> generator callable from the gen tool.

I would like that as well.

Thanks!

-- 
                              (Stephan Paul) Arif Sahari Wibowo
    _____  _____  _____  _____
   /____  /____/ /____/ /____
  _____/ /      /    / _____/      http://www.arifsaha.com/



More information about the Nitro-general mailing list