iPhone vs BlackBerry – A Developer’s Tale – Part 1
Here is the plan: Develop two mobile apps, one for BlackBerry and one for iPhone at the same time to see what is easier for a .NET guy to whip out — then blog the whole thing into a series of posts! Brilliant!.
Crazy – You Bet!
So the original project was simply to develop an iPhone app but I figured that since I was putting so much work into the mobile web service why not do two apps at the same time! Since most of the heavy lifting is going to be done by using C# and ASP.NET MVC then It shouldn’t be that hard — will it?
For this series of posts I’ll be keeping track of the iPhone development using my MacBook Pro using Xcode and Objective-C and the BlackBerry development using my Dell XPS using Eclipse and Java. I’m going to try and keep track of the hours spent – but I can guarantee I won’t have a stop watch with me at all times.
Let’s see what happens!
Getting Set Up
This post is probably isn’t going to be very interesting since this mainly goes over getting the two environments setup. You’ve been warned! 🙂
[BlackBerry – 2.5 hours]
Since programming with BlackBerry uses Java I immediately downloaded the latest version of Eclipse along with the SDKs from the BlackBerry website. I got everything downloaded and installed in less than 40 minutes (even though the BlackBerry website wasn’t the easiest thing to navigate)!
So I fired up an instance of Eclipse and started a new project — and… uh… what the heck? My keys aren’t working? I tried closing and reopening and rebooting — nothing! The keys simply would not respond. As it turns out the problem was the BlackBerry SDK itself! Basically, the newest version of Eclipse wasn’t supported so that meant I had to find a previous version (3.4) and use it instead — bummer.
So after downloading Eclipse (again) I was ready to go. I started a BlackBerry project, pasted in some sample code to play around with, hit run and — CRASH! I’ll save the dramatics here but basically the UAC in Vista was kicking in and causing the emulator to die. Disabling it fixed the problem (but turned off UAC which isn’t what I wanted… but oh well). I had considered reverting this back to my VM of Ubuntu but since I had already invested so much time I figured I’d just stick with it.
After I finally figured out how to get the emulator started then it wasn’t long before I had my first “Hello World” program running and the BlackBerry was in business! Not too bad!
[iPhone 4.5 hours]
My new Mac came in the other day and I was ready to get started. Downloading the correct Xcode was a little confusing at first but once I got it figured out I had it up and running without any of the problems I had with Eclipse (although it was a 2GB download – whoa!)
The whole Mac keyboard/touch pad thing is terrible if you’re used to using keys like END, HOME or Right-Clicking (which I’m assuming developers use quite often :)). Even things as simple as resizing a window are painful on a Mac – but really its irrelevant for this discussion.
As s C# developer it wasn’t hard to look at Java code and get a general idea of what was going on. Even the entire Eclipse IDE acts similar to Visual Studio so the learning curve was greatly reduced… but Objective-C… not so much…
I read the documentation on the Apple website several times, watched a couple terrible screencasts and poked around with the Xcode IDE and still nothing. If you haven’t ever seen Objective-C before, make sure to shield your eyes when you do. I can pretty much guarantee it won’t make a bit of sense.
Also, the Apple documentation made some bizarre suggestions on the correct way to define methods… Check out this little gem here…
…method names should interleave the name with the arguments such that the method’s name naturally describes the arguments expected by the method. For example, the Rectangle class could instead implement a setOriginX:y: method that makes the purpose of its two arguments clear…
What? Name your method to emphasize the first argument? Would Steve McConnell approve of this?
BlackBerry (3%): IDE installed and sample is working!
iPhone (1%): IDE installed but haven’t been able to understand any of the code yet.
Currently, BlackBerry has the lead with the least development time invested. In fact, the BlackBerry is up and running with a sample application. But after looking at the designer for the iPhone interface it looks like once I get past the initial Objective-C hurdle then development may move a long much faster than I anticipated. Will BlackBerry maintain the lead or will the iPhone catch up? Check back for the rest of the series!