Show HN: Beginning Android for iOS Developers
clayallsopp.posterous.com
clayallsopp.posterous.com
tl;dr I walk you through how I ported one of my iOS apps. There are UIKit references and such, but anyone can pick this up and learn something (I cover parsing JSON from the file system, serializing objects, HTTP requests...yknow, all the useful stuff).
I've never written anything of this scale, so criticisms are welcome!
Seeing the language documented one function at a time also loses out on how the components interact, design patterns that make sense, and other considerations that I am certain this will help with.
Thank you for sharing.
- Biggest difference is making interfaces, both in terms of tools and higher level philosophy. Having Linear/Relative/Table/etc Layouts is a really foreign concept to iOS developers, who are used to just using two sets of pixel dimensions (320x480 or 768x1024). Once you get some practice with them it's not a big deal, but its definitely one of those things that originally made me stop learning Android dev on my first try. At the same time, it's necessary to have all these different ways of laying out data to cope with the device fragmentation. There are tools built into Eclipse and elsewhere (DroidDraw) that give you a graphic representation of what you're doing, but they're not as tightly integrated into the development process as Interface Builder is to iOS.
- Related to that point, I feel like it's just a lot easier to do complex and custom interfaces on iOS. I haven't delved too deep into this on Android, but all of the really awesome Quartz features for manipulating and animating views just don't exist (although I heard 3.0 is trying to change that).
- Dealing with touches is something much more deeply ingrained in iOS than in Android; from what I've heard, it's actually non-existant in pre-2.0 APIs. I believe there's just not concept of a UIResponder-esque chain of handling events, which sucks because those form the backbone of really cool interfaces that iOS apps are known for.
- All that being said, it was actually pretty enjoyable once I got the hang of it. Things like ArrayAdapters are really useful and my code was more modular because of them. Now, if Apple got around to bringing all the Bindings and NSObjectController magic to iOS...
tl;dr the Android SDK (pre 3.0) seems better suited for business-as-usual apps than the gorgeous interfaces you find on the App Store.