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 08-19-2008, 11:16 AM   #11 (permalink)
Abel
Registered Member
 
Join Date: Jul 2008
Posts: 189
Default

I have to agree with aoberoi .. the delegate was used correctly just that when you link a view to data you are making it less reusable. Apple states controllers should be the non reusable part of your program so you should separate a view from a views data, doing so will in turn (hopefully) make your view classes and model classes reusable.

Quote:
Originally Posted by aoberoi View Post
Oh I agree completely that the application delegate is implemented correctly.

My difference of opinion (and thats all it is) is where the methods such as sayHi and tellDelegateToFlipView should be implemented. I think there should be outlets for these methods in View Controller classes. These classes are typically implement the functionality of items placed in the Views. To communicate with data used by the whole application, yes it makes sense to go to the app delegate.

In this small example, an easy to understand method does have its obvious advantage. I am only commenting that in order to use the principles of the design pattern, technically the functionality of those buttons should be moved to a view controller. Otherwise, one might ask, why did I have to make a class file for the view controllers? I never used them right? Also, if it was implemented the way I suggested, there would be no need to make source files for either of the Views, and less source files to me means easier to understand.
Abel is offline   Reply With Quote
 

» Advertisements
» Online Users: 870
23 members and 847 guests
ADY, anshuk1219, chits12345, denied, dreamer11, Error404, FAED, gmarro, Grinarn, ilmman, john love, leahov, M@realobjects, magnett, MarkC, Nicoloren, nitingohel, pratikchandak, R40ul, sethaver, sigluca, snackbox, woody08
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,866
Threads: 89,225
Posts: 380,691
Top Poster: BrianSlick (7,129)
Welcome to our newest member, sethaver
Powered by vBadvanced CMPS v3.1.0

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