Shared Code

While working on an iPhone app, I had occasion to create some ‘utility code’ – functions that were used by several view controllers, but that didn’t really belong to any one in particular. It wasn’t clear to me where this code should live; assigning it to any one VC was a non-starter, and, since I was using pure plist data structures (NSDictionaries, NSArrays, etc.) as my models, it didn’t seem natural to add the code to them, either.

In the end I decided to stick the code into the Application Delegate, but I felt guilty about it.

Share and Enjoy:
  • Twitter
  • Facebook
  • Digg
  • Reddit
  • HackerNews
  • del.icio.us
  • Google Bookmarks
  • Slashdot
This entry was posted in iPhone. Bookmark the permalink.

Comments are closed.