is the iPhone Development Environment Superior to Android's?
With the increasing popularity of mobile applications, many people venture in publishing comparisons of the developer experience in each environment. About a year ago, David Green published a thorough review of both environments while John Blanco published last week a comparative analysis of the iPhone and Android Development Environments. Both Dave and John agree:
using Java is much better than Objective-C. Private methods, inner classes, anonymous classes, generics, better function syntax, and a much wider plethora of 3rd-party code are just a small smattering of the advantages of Java. It’s no contest.
John and Dave disagree on Xcode vs Eclipse:
[John] I used to love Eclipse. I could master one IDE and get benefits for whatever work I do. It’s been over a year since I had to use Eclipse [...] and coming back has been… …a horrible experience… I don’t know how it happened. Eclipse is bloated, slow, and the simple act of changing editor contexts (XML vs. Java vs. Android Manifest, etc.) is mind-numbing. It takes seconds. [...] it’s making for a *miserable* experience doing Android work. Contrast this with XCode, XCode is a delight to work with. It’s sleek, lightning-fast, and I never see any slowdown when typing in code. I took XCode for granted for sure. XCode in a landslide.
Dave sees Eclipse incremental compiler as a major benefit of the Eclipse environment. For him content assist does not work well and Xcode opens way too many windows:
XCode is so shockingly bad that I almost don’t know where to start. Here’s a minimum list of things that I think need fixing in order for XCode to become a viable IDE:
Dave likes however the iPhone's Interface Builder.
From a simulator's perspective, John sees several limitations to the iPhone simulators with no real possible emulation of the GPS or accelerometer's capabilities. But he was impressed by its accuracy:
I hardly ever see a problem in a device that I don’t see in simulation. It runs fast, I can shut it down whenever, I can reset it easily, I can change languages, and so on. Android’s Emulator, on the other hand, is the worst emulator I’ve ever seen. It’s worse than BlackBerry’s — which is saying something. Sometimes I run an app and it just doesn’t run anymore on the emulator and I have to restart the thing. It’s also horribly slow. I once times an activity as taking 8 seconds to display. This may be related to my Eclipse issues as well, but it must be noted because I have *none* of these problems with iPhone development. Every Android developer I run into says they don’t even use the emulator anymore, opting to run the app on the device directly.
Dave sees the power of a decade relentless improvements in Java Development with a full featured debugger, the ability to use JUnit, along with memory profile tools.
I wrote my first line of Objective-C, 20 years ago this fall. I recall being such an amazing experience and couldn't stay away from Penn State Computer Lab for very long. It is difficult to imagine for most people that Xcode was available, pretty much as it is today, in such a remote past (as NeXTStep). Interface Builder, the foundational element of NeXTStep, was the brainchild of Jean-Marie Hullot who started working on it in 1985 and NeXTStep lead Tim Berners-Lee to build the foundation of the Web at CERN. Along with Jean-Marie, people like Jack Greenfield who developed the first ORM tool, established a strong foundation for model-driven engineering. With such an innovative past, it is no surprise to see Xcode still around in 2010. But is it still in line with its time? Is it still ahead? Could it be improved? is Objective-C a modern enough language with all its recent additions, or is Xcode falling behind and will quickly lose its de facto popularity for more advanced, more model driven tools? We could even question if MVC has a future? or are the concepts of Android Intents and Activity way superior?
What is your take on it?
Java IDEs are smarter
Apple is aware of this and has been working for quite some time to close the gap. Xcode 4 is in beta and uses the clang engine (based on LLVM) to do much better code analysis and completion. It will never be as effective as Java analysis but they can get much closer. Xcode 4 also consolidates windows. This is without an impact on performance. As the original poster noted, the Java IDEs have gotten heavy and slow while Xcode is extremely snappy.
Windows Phone 7
But: Is this enough? Can Microsoft ever catch up?
Re: Windows Phone 7
No you can't, right now only C# is available. But I have to agree with you it's a very nice platform to work with (and I'm a Java fan).
Static vs Dynamic again...
If you like dynamic languages, the lack of tool support didn't bother you from the start. Also, typing speed is key, because the IDE won't complete it for you, won't refactor it for you, won't correct it for you, so your text editor (can we really call it an IDE?) must be snappy.
Well, Eclipse does make me angry sometimes. But I'm trying to learn Objective-C, using XCode, and it makes me angrier, because the IDE doesn't help me, because it doesn't point me that a method or variable doesn't exist, because there is no stacktrace pointing to the exact line with an error.
I haven't tried the Android development environment yet, but unless it is much worse than using JBoss Tools with Seam and jBPM, or Spring Tool Suite with Grails, it wins on XCode, hands down.
We Java Developers are spoiled
Some keyboard shortcuts:
cmd-alt-up toggle header/implemenation
cmd-click -> goto symbol
alt-click -> documentation
cmd-shift-d quick lookup/goto symbol (class, variable, method)
cmd-b -> build
cmd-r -> run
There is a nice screencast series from the pragprogs regarding XCode.
But there is hope on the horizon - stay tuned.
A matter of habit
Xcode hasn't changed much since beginning, but new Xcode 4 (already available to registered developers) looks promising (well all bugs are fixed).
I liked Objective-C language, API and runtime very much. Syntax may look odd, but it is really simple to learn, and core APIs are very well designed. It has immutable types and collections, promotes (well.. even forces) clean MVC paradigm and use of delegate patterns instead of inheritance when designing user interfaces, dynamic typing when you want, very fast dynamic method invocation, and recently even something like closures (code blocks).
Re: Windows Phone 7
Now if I ever get time to finish it we are talking 10,000 downloads per day. Oh wait they are not selling the devices at that rate yet.
Re: Windows Phone 7
Eclipse is not fun
Re: We Java Developers are spoiled
InfoQ Interview with JetBrains
Steven Ihde,Karan Parikh Mar 29, 2015