Tag Archives: API

Differences between Android and iPhone development

These series of guest posts are written by the teams attending the Tetuan Valley Startup School 2010 Fall edition. This post is from the betonsofa team, formed by Luis Aguilar, Ernesto Arredondo and José A. Gil.

We are going to compare Android vs iPhone development, as a continuation of a first article about the differences between Google and Apple TV. This post is mainly based on two papers wroten by David Green and Eneko Knorr, developers in Android and iPhone platforms.


Language
The Android development language is Java.
The iPhone language  is Objective-C.

Objective-C:
- The IDE doesn’t help much.
- You need to do many things to declare a property: declare in the class definition, again to declare getter/settter, initialize in the init method, @synthesize in the implementation, release in dealloc. In general, you have to type way to much to express a simple concept.
- Pointers in Objective-C, though powerful, are also another time-waster.
- The patterns that must be followed (p.i: implementing correct init and dealloc methods) are non-trivial.
- Objective-C’s imports and forward-declarations are a pain

Java:
- The Eclipse IDE helps you define properties
- Java really shines with its garbage collection.
- Imports and forward-declarations exists in java, but Eclipse’s JDT is so good that you can almost forgotten them.

API Libraries
- On Android many Java libraries are available (Java IO, Java IO, network and regex). It make development easy. In general, the layout, organization, and naming conventions of Android platform classes are more consistent and predictable.
- On iPhone,  classes and methods are poorly organized. Depending on the framework used, naming conventions and code organization would differ.
- Android has the benefit of being open source. You can see how things were implemented in the Android platform and learn by example.
- On the iPhone when things didn’t work as expected you had to resort to Google and hope that others had encountered the same problem.

GUI Model
- The iPhone platform does a great job of encouraging an MVC design pattern.
- With Android’s support for multiple processes and component reuse, it does introduce some complexity for the developer
- Both Android and iPhone provide a way of declaring user preferences in XML. Both platforms provide a default UI for editing those preferences.

Resources
- Apple does an excellent job of providing lots of resources for developers. Apple provides lots of sample applications and code to demonstrate API usage.
- Android developers also have access to loads of resources. The guide and API reference are installed with the SDK, so everything is available when offline. You also can download many open source Android projects for ideas on architecture and API usage.

IDE
- Android development leverages the excellent JDT tools. JDT is its incremental compiler, which provides immediate feedback with errors and warnings as you type.
- In Objective-C in XCode, waiting for compiler feedback break the flow of programming.
- Eclipse is better than XCode in content assist and editor management system.

UI Builder
- iPhone app developers are given a pretty good UI builder. It does a great job of showing the UI as it will actually appear. It’s flexible and can model some pretty sophisticated UIs.
- The Android UI builder is pretty useless: it can’t display UIs how they’ll actually appear, and it’s UI is way too inefficient.

Debugger
- XCode debugger UI extremely difficult to use.

Profiler and Heap Analysis
- An area where Apple development tools excel is in profiling and heap analysis. These tools seemed mature and easy to use.

App Store and Google Market
- The iPhone app store is excellent in that you can sell into many countries worldwide with a single setup. Getting an app into the store however is frustrating to say the least. Apple must approve every app before it is accepted into the store. Mine got rejected multiple times without any explanation. The delate is similar for patches resolving bugs of  your own applicattions.

- The Google market by comparison to the Apple app store is terrible in that you can only sell into a handful of countries. On the other hand when you upload your app to the app store it’s available within minutes, so you don’t have to worry about an approval process.
In Google market, people is more reluctant to pay than in iPhone app store.