I have an iPhone application that contains several views and their associated controllers. Looking at sample code, I've seen different different ways to organize these files - either have all of the views grouped, then all of the controllers grouped, or group the views and controllers by functionality.
Option 1 - Views and controllers grouped separately
-Views
|
- EditItemView.h
- EditItemView.m
- AddItemView.h
- AddItemView.m
-Controllers
|
- EditItemViewController.h
- EditItemViewController.m
- AddItemViewController.h
- AddItemViewController.m
Option 2 - Items grouped by functionality
-AddItem
|
- AddItemViewController.h
- AddItemViewController.m
- AddItemView.h
- AddItemView.m
-EditItem
|
- EditItemViewController.h
- EditItemViewController.m
- EditItemView.h
- EditItemView.m
Option 1 seems to make more sense from a MVC standpoint - the code is grouped together, but I'm wondering as the app grows to 10+ views and controllers, is that the most logical and maintainable? Is there a best practice recommendation around this? Currently, I will be the only one maintaining the app, but whether or not there will be multiple developers, I want to use best practices as much as possible. Are there published standards on this?