Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 04-20-2009, 07:06 PM   #1 (permalink)
coondog
Goon (on a good day)
 
Join Date: Apr 2009
Location: California
Posts: 55
Default Where to put global data and processing code?

Hi everyone,

I'm making a little app based on the "pickers" sample project from the "Beginning iPhone Development" book.

The book's example is basically how to use the UITabBarController and, in this case, the app has five unrelated views, one linked to each Tab and each view's data is processed and output to it's view through that view's controller.

So, the book's example structure looks like this:
AppDelegate
--View1Controller
--View2Controller
--View3Controller
--View4Controller

In my app, however, most of the views are related to one another and will thus share data. For example, one tab will give you a Search Screen and your selection from the search results will take you to another tab that will display data based on that result.

My questions are:

Where do I code-up the processing/data-population of the search result so it can be accessed by the other views? The only place I can think to put that code (so it will be global) is in the AppDelegate, but, is that bad form?

I can certainly figure out how to get the job done, I guess my question is more of a design problem or a best practices question...

Anyway, thank you for any advice.

Chris.
coondog is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 158,558
Threads: 89,129
Posts: 380,260
Top Poster: BrianSlick (7,103)
Welcome to our newest member, thesooty
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 04:53 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.