Common Mac/iPhone development
Hi all,
I'm new to Mac and iPhone development, and all I've done so far is absorb a couple books and a few blogs.
Well I have not found clear hints towards designing your app for both Mac and iPhone. Or, say, to minimize the amount of code which is to be redone for the second platform.
From my (limited) understanding, I gather that, given Model-View-Controller as the basic design pattern:
- Model objects: can of course be absolutely identical
- View objects: are of course different
- Controller objects: not clear how different they are, or better: can you structure your code to clearly separate out the "different objects"; use delegates ? use "categories" for slightly different methods ?
As a corollary, I sense that using Interface Builder and the lovely default controllers will ease your development for ONE of the platforms, but force you to redo all controller code for the second platform. So more hand-written code might be a better option ?
If any of you has already walked that path, I am interested by any hints.
Thanks in advance
PS: I will start with a simple book collection app, so nothing too fancy.
I'm new to Mac and iPhone development, and all I've done so far is absorb a couple books and a few blogs.
Well I have not found clear hints towards designing your app for both Mac and iPhone. Or, say, to minimize the amount of code which is to be redone for the second platform.
From my (limited) understanding, I gather that, given Model-View-Controller as the basic design pattern:
- Model objects: can of course be absolutely identical
- View objects: are of course different
- Controller objects: not clear how different they are, or better: can you structure your code to clearly separate out the "different objects"; use delegates ? use "categories" for slightly different methods ?
As a corollary, I sense that using Interface Builder and the lovely default controllers will ease your development for ONE of the platforms, but force you to redo all controller code for the second platform. So more hand-written code might be a better option ?
If any of you has already walked that path, I am interested by any hints.
Thanks in advance
PS: I will start with a simple book collection app, so nothing too fancy.
Cocoa and CocoaTouch is very similar. For the most part, you will be able to (and will want to) keep all your model code the same, since it shouldn't know anything about the GUI (view and controller). There will be a lot of parallels between your Mac controller and view, the design and interface should pretty much all be the same, but the API (names) will obviously be slightly different between the two platforms (ie, NSButton vs. UIButton). You will have to make those changes and will have to recreate your interface builder files (XIB/NIB).
One last thing, most Mac OS X applications usually have a more advance GUI (ie, multiple documents), so obviously there will be a direct correlation between the complexity of your Mac OS X app's GUI (controller and view) and the complexity of the port.
One last thing, most Mac OS X applications usually have a more advance GUI (ie, multiple documents), so obviously there will be a direct correlation between the complexity of your Mac OS X app's GUI (controller and view) and the complexity of the port.
If you follow MVC strictly, you should definitely be able to have identical models and controllers across all platforms, and only have to reimplement views. Views can potentially have their own view controllers and view models, though, which would be view-specific and therefore platform-specific.
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Win a copy of: Beginning iPhone 4 Development: Exploring the iOS SDK | @iOS_blog | 0 | 2,690 |
Oct 1, 2011 04:23 AM Last Post: @iOS_blog |
|
| iphone 4 game development | andynov123 | 2 | 6,271 |
Jan 18, 2011 01:27 AM Last Post: JohnEdward |
|
| Beginning Iphone game development collision | lunayo | 0 | 3,179 |
Oct 8, 2010 11:43 AM Last Post: lunayo |
|
| Problem with making a game with the iPhone Game Development book | MrPenguin9 | 2 | 4,370 |
Feb 1, 2010 09:13 AM Last Post: MrPenguin9 |
|
| Does anyone know good course in iphone app development? | Irina | 5 | 4,545 |
Jan 16, 2010 11:52 AM Last Post: kgutteridge |
|

