title: Application Design and AppDelegate
body: <p>I am developing an iPhone app for some sweet undergrad research I've been working on. Sadly, my school doesn't offer software engineering / design classes so when it comes to questions of best practices in OO Design, I do a lot of reading.</p>
  
  <p><strong>My Dilemma:</strong></p>
  
  <p>My application loads a view (v1) where, upon user's button click, v1's controller class executes an action method. This action method should fill an array with objects. After that, the user will either execute the action again or click a different tab to load another view. Other views in the application will use the array that v1 populated.</p>
  
  <p>So, where should this shared array be declared? Right now, it's in the AppDelegate class from when I was testing features without a GUI. Should I grab the AppDelegate singleton and add items to it in the v1ViewController? Should it be declared as static?</p>
  
  <p>Thanks for the help!</p>
  
  <p>^Buffalo</p>
  
  <p>EDIT:</p>
  
  <p>Follow-up Question: When interacting with a singleton, which is the better way to talk to it: </p>
  
  <pre><code>[[MyAwesomeSingleton sharedInstance] gimmeSomePizza]; 
  </code></pre>
  
  <p>or </p>
  
  <pre><code>MySingleton *s = [MySingleton sharedInstance]; 
  [s gimmeSomePizza]; 
  </code></pre>
  
  <p>I guess what I'm wondering is, do you make the sharedInstance method call every time or do you define a pointer to the sharedInstance and then reference the pointer?</p>