Closed Bug 1131914 Opened 7 years ago Closed 7 years ago
Refactor delegates and file hierarchies to be more consistent
Before tacking on too much as our codebase continues to expand, I'd like to take a step back and clean up some things that have been on my to-do list.
An incremental cleanup patch that fixes a number of things, including: * Using iOS-style naming conventions for delegates, which means using the class name as the method name. This makes code completion easier and helps to avoid namespace collisions. * Moving the various TabBar ViewController panels into a single Home directory, and renaming them from *ViewController to *Panel. Also renamed TabBarViewController to HomePanelViewController to make its purpose as the "master" pager more clear. * Other miscellaneous variable renamings and whitespace cleanup.
Comment on attachment 8562563 [details] [review] Pull request I think these are all good changes. One comment added: "If we really want to follow the UIKit conventions then the first argument should also be a reference to the object calling the delegate. I know that does not always make sense in cases where there is just one instance alive, but .. that is what UIKit does. (It does actually help with state management. Specially when presenting viewcontrollers, it means that you don't have to keep a reference to the viewcontroller around. You can just use the reference that you get in your delegates.)"
Attachment #8562563 - Flags: review?(sarentz) → review+
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.