[Solar-talk] Project structure layout?

Jeff Moore jeff at procata.com
Tue Nov 13 18:17:47 CST 2007


On Nov 13, 2007, at 8:27 AM, Paul M Jones wrote:

> Comments, criticism, analysis?

One of the things that I think can get lost in organizing files by  
type is the concept of a working set of files.  For some files, you  
always work on those files together, even if they are of different  
types (or different roles in pear speak).  Storing them in separate  
file system locations can make working with them slightly harder.

For me, the best example of this are the unit test files.  Since you  
almost always work on both the tests and the code under test at the  
same time, having both files in the same directory makes opening files  
during development slightly easier.  It also highlights that  
relationship between the files and especially highlights missing test  
code.

Depending on the division of labor at your organization, the same may  
be true of other kinds of related files, templates and controllers,  
perhaps.

This desirable locality of reference during development seems to  
conflict with the need to place different kinds of files in different  
places for the application to easily and efficiently find them at run  
time.  If you optimize for locality of reference to make development  
easier, it makes the code for locating those files at runtime more  
complicated and the differences between the development and production  
environment greater.  If you optimize to make it easier for the app to  
locate its files, you make the system harder for people to understand  
and work with because files that are worked on at the same time are  
spread across several directories.  Maybe there is no good solution to  
this conflict.

Best Regards,

Jeff


More information about the Solar-talk mailing list