[ng-dhtml] directory structure

David Schontzler schontz at gmail.com
Thu Sep 16 12:55:56 CDT 2004


Well, I think that we'll probably want to combine some classes in a
single file in some cases, but I'm sure we can set it up to combine
files during build time. That said, one file per class should be fine.


On Thu, 16 Sep 2004 09:09:19 -0800, Dylan Schiemann <mail at dylans.org> wrote:
> Well, I had thought we decided on a directory structure a while ago, but it seems that what we really decided on was the class structure, and then the structure for unit tests:
> 
> src/A/B.js
> tests/A/test_B.js
> 
> So, any suggestions on how to organize our files?  I guess to some extent, some of this is influenced by what constitutes a file... should a file be a  single class, or a collection of related classes, or based on the namespace breakdown, with one file for each item following a dot down to the class level, and should those files be nested in directories, or should nesting be shallow?
> 
> In my practice, I've tended to follow the pattern of each file representing a class, or a class plus some utilities functions that are closely related to it,  and each directory containing a set of related classes that collectively form a higher level construct of some sort.  So for example you might have hte following subtree:
> 
> src/
> src/widgets/ (would contain base class and other stuff applicable to all default widgets)
> src/widgets/window (code specific to window widgets)
> 
> or if the core widgets have a lot of files, I might add another directory or more for some of that stuff, for example
> src/widgets/core
> 
> I guess from a pragmatic approach, it would be nice to indetify what should be at a top level, what should be the next level down, etc., so we have some basic informal guidelines for new things we haven't yet considered.
> 
> Let me know what you think and I'll set the structure up in svn later today.
> 
> -Dylan
> 
> _______________________________________________
> NG-DHTML mailing list
> NG-DHTML at netwindows.org
> http://netwindows.org/mailman/listinfo/ng-dhtml_netwindows.org
>



More information about the NG-DHTML mailing list