title: Why do so many MVC web frameworks favor grouping multiple controller actions in a single class?
body: <p>My experience is mostly limited to PHP, yet as far as I know both Rails and ASP.NET MVC have taken the same path.</p>
  
  <p>The point is that nearly every web framework I've ever come across implements controller actions as methods, e.g. <code>create</code>, <code>edit</code>, <code>show</code>, etc. These methods reside in a single class like PostsController, but they hardly ever share state or dependencies, because only one of them gets called during the whole request.</p>
  
  <p>That's why to me this approach seems quite unreasonable, as the class only acts as some kind of namespace. Seeing examples with large chunks of barely related controller action code composing even larger controller classes doesn't help either. Yet a lot of frameworks do exactly that, and only a few use a class for each action.</p>
  
  <p>So the question is, why is it so? Perhaps it's subjective, but I believe that I may have missed an important advantage of this approach.</p>