views:

259

answers:

2

I am comming from an enterprise java development organization where we did development in nicely seperated re-usable layers. Persistency layers, Service layers, etc etc.

Now, I am looking for iPhone example apps or documentation on how to architecture complex iPhone projects. Most books & apple examples show you very limited code & architecture. They are not usable imo.

What I am also looking for is info on how to setup a continuous-integration build system which runs all my unit tests on code checkin & reports the unit test findings to a system where we can see the results. For our java projects, we use svn, mvn & sonar for this. What's apple's equivalent for this setup? Is it even possible?

So, to summarize my questions:
Q1: Are there any examples or books on complex iPhone project architecture?
Q2: How do we setup a continuous-integration build system?

+4  A: 

The heritage of the iPhone dates back to OpenStep by NeXT Computer. For some time, NeXT's primary focus was custom, enterprise applications. The technologies that are in-play on the iPhone are well proven in enterprise environments. NeXT was one of the orginal advocates of object technology, patterns, and MVC in particular.

That said, some of what used to be available in Openstep is now gone. NeXT had a radically advanced ORM system (Enterprise Objects Framework - http://en.wikipedia.org/wiki/Enterprise%5FObjects%5FFramework) that, although is still in use internally at Apple and powers iTunes/etc, is now deprecated for customers using Objective-C (a Java version still exists). A lite ORM, Core Data (http://developer.apple.com/macosx/coredata.html), has taken its place and is now available on the iPhone. SQLite (which is awesome) is also bundled on the iPhone and available for developers.

Another fly in the ointment is that the current version of XCode for the iPhone has a limited grasp of subprojects/frameworks, so it is more difficult to partition reusable code than it used to be. Tim Wood, of Omni, provides some details on how to manage frameworks within XCode on the iPhone (http://blog.omnigroup.com/2008/10/01/using-frameworks-in-iphone-applications/) Unfortunately, the process is not as easy as it ought to be.

I am not sure what books are available, but almost any former Openstep developer is going to have enterprise development expertise. You might consider pulling one into your project to help things along.

svn and mvn are available/bundled on OS X. There are also options for pulling in other, open source packages through systems like fink or MacPorts:

There are also several framework options that support TDD. http://stackoverflow.com/questions/195820/test-driven-design-for-iphone-native-apps

It does not look like sonar groks Objective-C at this time. Depending on your options, maybe you could develop a module for this?

xyzzycoder
A: 

How complex of an example would you like? This question links to a number of non-Apple open source iPhone applications, including my own. Some of the applications out there are relatively complex.

As far as design goes, I'd highly recommend the book Cocoa Design Patterns. While not strictly for the iPhone (given Cocoa's beginnings at NeXT and more recent presence on the Mac), the design patterns covered are core to the architecture of the Cocoa frameworks and Cocoa applications.

I'd also recommend paying for the WWDC 2009 videos and watching the sessions "iPhone User Interface Design", "Effective iPhone App Architecture", and "Prototyping iPhone User Interfaces". There are a lot of good suggestions for architecting iPhone applications in these sessions.

I've used unit tests with my applications, but I have not done any form of continuous-integration building. However, this question looks to have a lot of good information on doing continuous integration with Xcode.

Brad Larson