In my relatively short career, I've developed applications and websites in some professional capacity with VB, PHP, C#, and VB.NET (that's right, the first mention of VB is VB6). This includes Windows and Windows Mobile applications, and PHP and ASP.NET websites. Recently, I have been developing for Windows Phone 7 in my spare time (see ArkWords, my first WP7 app I've discussed openly).
At the office, though, I've had a chance to work on Android and iPhone apps. I'd like to take this opportunity to compare and contrast the languages and tools of those two and of WP7. But first, a few disclaimers. I use Windows at home -- I'm used to it. My server at home runs Linux -- its software RAID support is awesome. My phone is an AT&T/HTC Fuze and, while it normally runs Windows Mobile, I've been following this xda-devs thread. And last, but certainly not least, while I love the hardware specs of the iPhone 4, I still strongly dislike Apple's culture of secrecy and closed, tightly controlled ecosystems.
Well, now that that's out of the way, we can get to the good stuff. Let's start with languages. It should be obvious from the above paragraphs that I'm used to C#, which makes me a bit biased. I won't deny it. But what isn't so obvious is the fact that I actually learned Java before I'd even heard of C#. While I haven't done any serious Java development, I did work on personal projects written in it some time ago. I haven't touched Objective-C until very recently.
I like C#. It's less verbose than VB.NET, but not cryptic enough to be overly confusing. The C-style syntax is familiar and comfortable. I'm used to the .NET Framework, so I can navigate around it pretty easily. That said, I'm not really used to WPF/Silverlight. I've worked with both in a very limited manner, and I'm only now starting to get used to the intricacies of XAML. I'm learning about the MVVM pattern and how to properly implement it, but I haven't quite gotten it down yet.
I'm fine with Java. Same comfort with syntax, and almost the same comfort with its namespaces. Android's XML-based layout engine is something new to get used to, but then again, so is XAML. What's nice about both of these is that when you actually create your UI in either XML flavor, those objects become automatically accessible to you. To be honest, I wouldn't have even thought about mentioning this because I assumed that all modern languages/IDEs do this for you. But then I came across Objective-C.
Oh, Objective-C. The oldest of the three languages discussed here, it is also arguably the most powerful. After all, being a strict superset of C, it's 100% backwards-compatible with regular ol' C. These languages were written when you had to have access to the most low-level stuff inside a computer. Of course, these days, and on an iPhone, you have no such low-level access, and you don't really need it. However, all of the baggage from these 1980s computer languages still lingers on today. Why do I still have to do memory management? Why do I have to create a UI object three times in three different locations in order to be able to use it in code? Naturally, there are good reasons for these things, but they exist because of all this baggage.
I don't like dealing with pointers and memory management and redundant code when all I want to do is write my apps that do what I tell them to do. The less fuss, the better. Java isn't perfect in this matter, either. Due to established conventions, there is always an overuse of get* and set* methods. There are certain aspects of programming in Java that are more verbose than VB.NET. That's scary. Of course, C# and XAML aren't perfect. Talk about verbosity! Anything to do with XML will be gigantic in size. And, when you can easily set some attributes in XAML, doing the same in C# sometimes requires multiple object instantiations -- just to set a single property.
Now that I've complained about the three languages, let's move on to the tools. I'll just start with the punchline: Visual Studio is better than the rest. (I can almost hear grumblings of dismissal of the rest of this post by Apple lovers. Then again, they probably stopped reading after the end of the second paragraph.)
Visual Studio 2010 is the best IDE of the three platforms. While it is quite a bit heavier than its previous version, it is still well ahead of Eclipse, and light-years ahead of Xcode/Interface Builder. Auto-completion and auto-suggest features are unrivaled. The product just feels... polished. Which it had better, after so many years of development. Like I stated above, it is heavier than the 2008 version, causing some rather annoying slowdowns occasionally. But overall, it is still an excellent IDE.
The first time I used Eclipse was a few years ago. It felt like it was taking my then-modern CPU and turning it into a 486DX. It was sloooooooooooooooow. Today, it feels much snappier, at least in part due to it running on a Core 2 Quad with 6GB RAM. Being a modular IDE, it'll handle pretty much any language and supporting tools you can throw at it. And it's officially supported by Google as "the" Android IDE. Eclipse isn't as powerful as Visual Studio, but then again, it isn't nearly as big of a download, either. I have a feeling that JetBrains' IntelliJ IDEA would work much better than Eclipse (because I love their ReSharper product) but I haven't tried it.
Xcode and Interface Builder are unpleasant. While the fact is, they only run on Macs, I can't really mention that as a huge negative because Visual Studio only runs on Windows. Eclipse beats both of them in terms of portability. But anyway, one of the issues is that Interface Builder is a separate application. While the existence of an official graphical UI designer beats Android's lack thereof, it is very much disconnected from the main Xcode application. Moreover, Xcode feels like a version 1.0 product, when it has existed in its current form since 2003. The reason I say that would be better described through an anecdote. I was adding a folder to application resources. After dragging it onto "Resources", I realized I needed to change a file (let's call it "1.png") in the actual folder to a completely different file ("2.png"). That's when I found out that I can't tell Xcode that the folder's contents have changed. It kept looking for the now-deleted "1.png" and complaining that it's not there. Fine, I figured, I guess I'll have to delete the reference to the whole folder and recreate it. But no! When I dragged the folder onto "Resources" after deleting it from there, "1.png" appeared under that folder again! Xcode was caching the contents of the folder even after it was deleted. Thankfully, restarting Xcode after deleting the folder reference cleared the cache and I was able to add the folder with the correct contents. That kind of silliness just screams "1.0 product" to me.
I said I'd discuss languages and tools in this blog post, so I'll stop here. I could go on and talk about how the many resolutions available in Android are detrimental and reminiscent of old Windows Mobile, and how Apple's maniacal desire to control everything turns me off of their products, but that would be going too far off the subject at hand. I'd just like to finish by saying that, while no platform out there today is perfect, it is my opinion that WP7 and Visual Studio are closer to that goal than the others. That's why I'll continue to develop for WP7 on my personal time.
Comments