I created my first comprehensive OS X application. While working on this, I had some doubts about how I use the class that implements the NSApplicationDelegate protocol (the Xcode class creates the default for Cocoa applications, i.e. MyApplicationAppDelegate.m/h ) .
In many textbooks (and books), I see that people create the AppController class to manage the main or universal tasks of the application. I prefer to add my common tasks directly to MyApplicationAppDelegate and create specific controllers depending on the modules I need to manage.
For example, I add to MyApplicationAppDelegate each MyApplicationAppDelegate used to open other windows (i.e. open the preferences panel), each function that is not strictly associated with a specific module / controller and IBOutlet for the main interface. In MyApplicationAppDelegate I also add every link to the controllers used in my application. This is essentially about it.
I'm really confused because I'm not sure if this is a good design. Does MyApplicationAppDelegate any other purpose?
I would like to receive any suggestions and, if possible, any articles that you may know about design patterns for Cocoa.
source share