iPod touch Fans
Cheap iPod touch 3G - 8GB $188.95, 32GB $279.95, 64GB $373.73 with free shipping!
Reply
 
Thread Tools
  #1  
Old 1 Week Ago
iPod touch Admirer
Join Date: Sep 2009
 
Default Ipod application structure

Hoping not to be boring (sorry for my english)
I'm studing and googling to understand the basic structure of any iphone/Ipod application, and to build a general template for them.
I'm developing by cygwin, programmaticaly.
But my question doesn't depend on the developing way or tool.

I read about a model-view-controller concept.
I understand that there is a main program that create a UIApplication subclass where I build my application.
In the application object I define the root-user-interface (custom ViewControllers, NavigationControllers, TabBarControllers) and inside the root-viewcontrollers the child-views.
Each root-viewcontroller manage its own views and each view manage the needed data object.
But what a bout the data objects?
Where I build my data objects (the model?)?
are them properties of the application object?
or I build them inside the root-viewcontrollers?
or inside the child-views?
or where?
I think that to share the data objects I have to build them in the toplever of the hierarchy, in the application object.
Is it right?

Can you please give me some certainty about the general structure?
Some link, some tutorial or just your experience.

Thanks
P
__________________
  #2  
Old 1 Week Ago
lauNchD's Avatar
iPod touch Fan
Join Date: Jan 2008
 
You can create you own custom classes for everything. Here's an example of a cheap (as in cheaply made) pseudo contacts app:

Model - should be the place for the actual data/information, which handles all properties, storage, etc.
MyPersonGroup (NSMutableArray?)
MyPerson (NSMutableDictionary?)
name => @"John Doe"
birthdate => [NSDate dateWithTimeIntervalSinceReferenceDate: -600000000] // some time in the 80s if I'm not mistaken
whatever
View - the highest level of user interaction. Should do all the drawing and (partly) event handling
MyPotentialCustomViewForWhateverCustomDrawingINeed ToDo
UIView
UITableView
...
Controller - the bridge between Model and View. The controller is responsible for delivering the view the correct information and reflecting changes from the view in the model (and vice-versa)
UIViewController
MyPersonViewController
MyPersonGroupViewController
Check out Apple's Core Data Books example; it should be relatively easy to understand.

Hope I clarified the difference between M/V/C for you a little!
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Useful links:


All times are GMT -7. The time now is 03:14 PM.


Powered by vBulletin® ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright © 2007 - 2009 Vigorous Media LLC - All Rights Reserved.
No information may be posted elsewhere without written permission.


Page generated in 0.02401 seconds with 7 queries