We're building a large Angular SPA that uses ASP.NET Web API on the backend. The application will have a large number of views (100-200). I'm debating whether to organize the Web API such that the controllers and their methods are grouped by client side view, or, grouping them by functionality group.
As an example for Web API controller structure:
Or By Functionality Group:
I'm personally leaning towards a By Views approach. As the application grows, my concern is having to bounce around between controllers constantly in an ever-growing project. I feel like it will become unwieldy and difficult to keep track of where you are in the project.
It should be noted we use a repository pattern behind the Web API layer, and that WILL be organized in a functionality group fashion. The Web API layer itself tends to be very thin, and most of the work occurs in the Repo layer.