Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Switching to a possible 10 views - how many view controllers?

Posted on 2010-09-01
1
Medium Priority
?
536 Views
Last Modified: 2013-11-25
I'm writing a "guide" style app which will display static content dependant on what category the user selects. From the main menu there is an option of reading/displaying 10 different views each loaded from 10 different buttons. Each view will contain text and some graphics (nothing heavy).

What's the best way of doing this?

Should I have one view controller for all or one view controller for each view?
0
Comment
Question by:nickedwards
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 5

Accepted Solution

by:
xdomains earned 2000 total points
ID: 33583742
You can decide to select between a single view controller or multiple view controllers based on these -

a) Data that the model is going to handle: If the data can be seggregated to be independent for each views, then you can go for multiple models, views and controllers. If you have any interdependencies between the data, then it best not to split them across models

b) Even if you have a single data model, it is perfectly fine to have multiple view-controllers. This is much cleaner, and you will have excellent control on what you want to do with the view. This will be highly maintainable and light weight while executing, because only the necessary views need to be loaded. You should keep a controller for each view, again for the maintainability aspects. This will also enable you to abstract and encapsulate the business logic behind the views.
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
Do you come here a lot? Are you lazy like me and don't want to go through the "trouble" of having to click your Dock's Safari icon and then having to click your Experts Exchange Favorites bookmark to get here? Well then this article is for you.
The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.

704 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question