zendframework / zend-expressive-skeleton

Begin developing PSR-7 middleware applications in seconds!
BSD 3-Clause "New" or "Revised" License
136 stars 90 forks source link

Directory naming convention #55

Closed mtymek closed 8 years ago

mtymek commented 8 years ago

ZF2 skeleton uses convention where directories containing classes (reflecting namespace structure) are written with first letter in uppercase, while resource files are kept in directories starting with lower case letters. So we have:

config/
  module.config.php
src/
  App/
    Controller/
      IndexController.php
    Repository/
      AlbumRepo.php
view/
  index.phtml
  layout.phtml

etc.

In case of this repository, it is mixed, with no clear indication what to find under certain directory:

config/
  something.php
data/
  cache/
    .gitignore
src/
  ExpressiveInstaller/
    Resources/
      config/
        routes.php
    templates/
      plates-404.phtml
    config.php
    OptionalPackages.php

Is there a reason behind this convention? Perhaps this should be standardized to make browsing the code easier?

weierophinney commented 8 years ago

@mtymek You'll note that the only place that violates the convention is the src/ExpressiveInstaller/ directory. This was to keep all source files together for purposes of autoloading. However, we also found it was far simpler to keep the assets that the installer uses under the same tree for two reasons:

This latter point makes your question moot; the files under that tree are removed after installation, leaving you with a consistent tree on completion.