[Nitro] Default dir structure

Bryan Soto bryan.a.soto at gmail.com
Wed Jan 4 17:01:22 EST 2006


But if NRAD were completed and generated all the source code, there'd be no
need to document anything! It's a win all around! ;)

It is a cool idea, and I think someone is actually working along similar
lines for Rails. A snippet from the user's guide: "Eventually you'll realize
that AppTrain is just a simple Web front end for creating applications that
run on the Rails framework."

See http://apptrain.rubyforge.org/apptrain_users_guide.html for more info.
It's nowhere near Rob's vision yet though. :)

More seriously, Rob is correct in that the generator could do a bit more
than it does (and would need to for NRAD to work). Has anyone run across any
items that could be automatically generated?

Rob mentioned:
* Multiple versions of application layout
* Generating config files, i.e. Og.setup
* Compiler pipeline
* Pollute the application level namespace with Nitro's internals (No,
really, I'm not biased ;)
* Fix shebang lines

As to the original question, my preferred layout is almost a subset of
Rob's. I also like src/views but, rather than src/elements, I use src/tags.

I personally like the src directory and I think for new users, it's visually
distinctive. You have a single ruby file in the top level, so you know
that's your entry point and if you want to go poking around, the src
directory is the conventional place to store the app's source code.

Just my $0.03 (I wasn't aware of the inflation Peter mentioned, but it's in
a mailing list so it must be true :)

b

On 1/4/06, Peter Abrahamsen <rainhead at gmail.com> wrote:
>
> Rob,
>
> That's a cool idea, and could be a boon to the project if done well.
> Documentation's probably more important, though :)
>
> P
>
> On Jan 4, 2006, at 11:56 AM, rob wrote:
>
> > It is good to retain the flexibility to choose different directory
> > structures as peoples tastes and conceptions vary and some projects
> > are naturally more complex than others and thus require greater
> > division into categories to make them manageable. The /src directory
> > could go in most cases but I have played and end up putting it back
> > after a while as I prefer the additional level of visual segmentation
> > for all but mini projects. For what it's worth our projects often
> > start out similar to this (which would definitely be cluttered rather
> > than useful for a smaller project):
> >
> > /conf/*
> > /conf/main.yml # sample configuration file for use by application
> > /conf/debug.rb
> > /conf/stage.rb
> > /log/*
> > /public/css/*
> > /public/js/prototype.js # the well known handy javascript library
> > /public/js/*
> > /public/images/*
> > /public/*
> > /run.rb
> > /scripts/generate_rdoc.rb # i do not expect most people would want
> > this
> > /scripts/*
> > /src/models/*
> > /src/views/*
> > /src/views/main/index.xhtml # bare-bones template
> > /src/views/main/*
> > /src/controllers/main.rb # bare-bones controller
> > /src/controllers/*
> > /src/elements/*
> > /src/elements/generic.rb # bare-bones element
> > /src/lib/*
> >
> > My opinion is that the user should be given a multiple-choice with
> > each template assigned as being suitable for a different sized
> > (small,medium,large,etc) as one consideration and the users like or
> > dislike of folders as another consideration. Other things the
> > generator should do is offer the user multiple choices about which
> > store to use (creates the conf files), how things such as the
> > compiler pipeline car constructed and if Nitro is to be included into
> > the default namespace. Extra swish touches could be options to
> > include a shebang in run.rb, say between "/where/is/bin/env ruby" and
> > "/where/is/bin/ruby" I have a rudimentary implementation of this that
> > we use to start our own projects but do not think it would be
> > generally useful as it is heavily tied-in to our own systems and is
> > console interactive only. Something I have considered is that it
> > would be fun although a little time consuming to construct a GTK
> > toolkit that allows you to draw our your nitro application with
> > controllers, models, etc linked visually and a skeleton source code
> > is produced for you. While this is unlikely to happen, a Nitro
> > application with selector boxes (or javascript widgets but then you
> > may have well as used GTK) that allow you to visually do the same. If
> > someone is has time on their hands, there is a great project for you!
> > Create a visual construction kit for the innovative and intelligent
> > ruby web development framework. We would even need a new acronym RRAD
> > (rocket-rapid application development/really rapid application
> > development) perhaps. Or better yet, NRAD - Nitro-Rapid application
> > development....
> >
> > - rp
> >
> > On 3 Jan 2006, at 11:11, George Moschovitis wrote:
> >
> >> BTw,
> >>
> >> I mean the USERS application dir. And this is only the suggested dir.
> >> Unlike Rails you can use any dir structure you need for Nitro
> >> applications.
> >>
> >> -g.
> >>
> >> On 1/3/06, Yvon Thoraval <thoraval.yvon at free.fr> wrote:
> >>>
> >>>
> >>> Le 3 janv. 06 à 11:32, George Moschovitis a écrit :
> >>>
> >>>
> >>> What do you think about this one:
> >>>
> >>>
> >>>
> >>>
> >>> run.rb
> >>>
> >>> controller.rb
> >>>
> >>> model.rb
> >>>
> >>> template/*
> >>>
> >>> public/*
> >>>
> >>> log/*
> >>>
> >>>
> >>> i do agree, their is no needs of a subdir src...
> >>>
> >>>
> >>> Yvon
> >>>
> >>>
> >>>
> >>> _______________________________________________
> >>> Nitro-general mailing list
> >>> Nitro-general at rubyforge.org
> >>> http://rubyforge.org/mailman/listinfo/nitro-general
> >>>
> >>>
> >>>
> >>
> >>
> >> --
> >> http://www.gmosx.com
> >> http://www.navel.gr
> >> http://www.nitrohq.com
> >>
> >> _______________________________________________
> >> Nitro-general mailing list
> >> Nitro-general at rubyforge.org
> >> http://rubyforge.org/mailman/listinfo/nitro-general
> >
> >
> > _______________________________________________
> > Nitro-general mailing list
> > Nitro-general at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/nitro-general
>
>
>
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/nitro-general/attachments/20060104/32eb9f53/attachment.html 


More information about the Nitro-general mailing list