title: Project directory structure
body: <p>Over my years of practice and through most of the reading I've done, the oft recommended directory structure for a web app project has been closely tied to the MVC structure:</p>
  
  <pre><code>tests/
  src/
    styles/
    markup/
    scripts/
      views/
      models/
      controllers/
  </code></pre>
  
  <p>However, I've recently started working in a new company, and their project repositories are oddly structured (<em>odd to me</em>). The devs explained that they find this <em>feature-structure</em> easier to comprehend (<em>I don't know what this project structure is really called</em>). It goes something like this:</p>
  
  <pre><code>app/
  src/
    component1/
      test
      view
      model
      controller
    component2/
      test
      view
      model
      controller
  </code></pre>
  
  <p>Of course, some components don't have the <code>view, model, controller</code> files because they're more akin to independent modules or business logic, than a chunk of MVC architecture. In my opinion, this makes the structure less intuitive.</p>
  
  <p>Can anyone shed some light on this? I feel that my view of the situation is biased because I've always worked in MVC-ish / flux-like app structures.</p>
  
  <p>Are there advantages to this structure, or is it just the result of some devs' foibles and inexperience?</p>
  
  <p><strong>Keep in mind</strong>
  The projects in question are a mix of web apps and web services.</p>
  
  <p><strong>edit</strong>:
  Would this question be more relevant to <a href="https://softwareengineering.stackexchange.com/">https://softwareengineering.stackexchange.com/</a> ?</p>