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 > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 02-07-2009, 04:20 PM   #1 (permalink)
New Member
 
Join Date: Feb 2009
Location: Clive, IA
Posts: 6
Default Same data, multiple presentations

Hi all

I'm wondering what the brain trust here thinks about the best way to model an application that has multiple list view presentations for a single set of data.

In my case, the data (as well as the UITableViewCell) is identical, but I have 3 different sort/grouping options. The first sort option results in a single section with all rows beneath it, the second option results in 2 sections, and the third option will result in about 50 sections.

Should this be 3 different views/controllers or a single view/controller with enough logic to get the correct data displayed?

It seems to me that 3 different views/controllers makes the most sense. That way I can prepare and group the data as required and tie it specifically to the controller.

Thanks in advance for your thoughts!

Todd
talanb is offline   Reply With Quote
Old 02-07-2009, 04:41 PM   #2 (permalink)
Registered Member
 
Join Date: Dec 2008
Posts: 495
Default

I would agree with your assessment. It may seem like a lot of extra code, but the functionality is split out nicely making it easier to change or add or remove.

If you have all the logic for those scenarios built into one controller it could easily become a nightmare for maintaining and debugging, imo.
__________________
My Apps on AppStore : gScale (guitar scales reference), eMaze, eMaze Lite, eTimesheet
exorcyze is offline   Reply With Quote
Old 02-07-2009, 04:57 PM   #3 (permalink)
New Member
 
Join Date: Feb 2009
Location: Clive, IA
Posts: 6
Default

Thanks for agreeing with me, exorcyze

I actually just started down this path and I'm already seeing how ongoing maintenance will be much easier.
talanb is offline   Reply With Quote
Reply

Bookmarks

Tags
design pattern, table view

Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 243
21 members and 222 guests
ADY, AragornSG, bookesp, BrianSlick, Dani77, Dattee, Dominus, dre, glenn_sayers, HemiMG, JasonR, karlam963, nobre84, Oral B, prchn4christ, Raggou, Rudy, spiderguy84, themathminister, viniciusdamone, vvenkatachallam
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,885
Threads: 89,229
Posts: 380,763
Top Poster: BrianSlick (7,129)
Welcome to our newest member, bookesp
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 02:21 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0