I have three questions related to the development of the iPhone and iPad. I am writing an iPhone application that should also be available for iPad in the future. Using the MVC pattern, I know that I will keep my models, however, it is not clear to me whether controllers and / or views should be dropped. So my questions are:
1) For those developing the same application for both platforms, what are the best practices? Which parts are usually reused and which parts are usually discarded in order to develop both applications with minimal effort and proper design?
2) In addition, I also need to have state / global information in the application. How do you process (design-wise) โstateโ of information in an iPhone / iPad application? I currently have user information (username and password) that I need to use throughout the application to make multiple server requests (encoded in the http header). For this, I have a user model stored in the AppDelegate class. Is this normal in terms of design, or should it be done differently?
3) Finally, my models are separated by abstract classes (or classes that handle common material) and subclasses that specialize in different tasks. The idea is to write as little code as possible to avoid repeating the code (for example: sending requests is common, and disassembly responses depend on the task). Performance wise, is it worth it to separate the code from several classes and have model inheritance?
Thanks in advance!
source share