Xcode vs. Visual Studio
If you are writing a full featured GUI application for Windows, you spend your life in Visual Studio. On the Mac, you use Apple’s Xcode.
Before writing Phanfare Photo for the Mac, most of my development experience had been in Windows. I installed XCode. Within 10 minutes I had a ‘hello world’ application displaying a window on my screen. So far, so good. Over the next few weeks I spent hours trawling the Apple documentation and popular community development sites like CocoaDev and Cocoabuilder trying to absorb as much as I could about my new development platform and its nifty visual effects (who doesn’t love the genie?).
Xcode’s rich key mapping system helped ease my pain of transition. Visual Studio has this too, but since I started on Windows, I just used the default bindings there. I was quickly able to get Xcode to respond to the keys I had been patterned to hit; for example I find Apple-Shift-Right Arrow to select forwards on a line to be a little painful, so a rebinding to Shift-End made my hands thank me.
Xcode provides a flexible tree listing, a code editor with syntax highlighting, and Microsoft-like IntelliSense to automatically insert method definitions for easy coding. It all sounds great on paper, but as they say, the devil is in the details. Xcode still insists on opening separate windows for every task, or splitting views to such a degree that all important information is hidden behind scroll bars. Visual Studio, by comparison, keeps your desktop orderly through a tabbed interface and a powerful toolbar system that can be moved anywhere. A picture is worth a thousand words.
Here are two screenshots: both are of simple projects that contain a window and a button. The Visual Studio interface is clean and uncluttered. By comparison the Xcode interface is painful to use. You may think I purposefully opened up all these windows to try to make Xcode look bad, but this is actually what my desktop looks like on a normal day, and you can reproduce this yourself by adding a window in Apple’s Interface Builder, building the project, and then running the debugger.
Visual Studio integrates its debugging and build warning functionality right into its main interface, which is much more intuitive to me. Xcode, on the other hand, presents new windows for everything and then adds confusion by allowing each to have its own code view and inconsistent behavior. Clicking on a build warning will not reuse your existing code editor window, but instead open the file in the split view at the bottom (where, unless you maximize the window, you can’t see anything), and double clicking the warning will just add to the mess by opening an entirely new window! This may sounds like nit-picky stuff, but when you spend your entire day in an IDE, these details matter and affect your productivity (and your sanity).
Both products feature automatic code completion (“Intellisense� in the MS world), but once again Visual Studio has the more polished and useful implementation. The Visual Studio Intellisense system, which I fell in love with in the mid-90’s, just plain works across every language and every project – it’s incredible to be able to change a function definition in a library and jump to an entirely different project and have it appear right away. It’s so powerful, providing small descriptions of the functions and parameters, that when I was teaching myself .NET I rarely had to look up documentation: I could simply scroll through the list and read about what things did.
Now I’m not sure how long Xcode (or its previous versions) has had auto code completion, but they are clearly playing catch-up to what is one of Microsoft’s best features. Apple’s auto code completion breaks in so many ways that it can’t be depended on. Most of the time it will display a list of every symbol defined in the entire universe. It is not only slow, but painful to sort through the choices if you don’t know what you are trying to find because Xcode’s implementation provides only a minimal amount of information, lacking descriptions and usage information. Xcode’s behavior around when it actually updates symbols is so unpredictable that even after living and breathing in the Xcode IDE, I don’t have a good feeling for when it gets updated. If Apple wants to help adoption of its platform with developers, this would be a good place to focus their efforts.
For an IDE that has been around (under different names) for the past decade, there seemed to be so many bugs in Xcode that I found myself banging my head on the desk daily. Simple things like windows not responding to keyboard input or not updating properly to major issues like exceptions popping up while typing in the code editor plagued my early development process. No software is perfect, but with Apple’s push towards polish in the rest of their product line I felt that they left out the developer tools.
Now, we know the ending to this story. The Mac version of Phanfare Photo exists, so I did survive the experience of Xcode. In fact, to my surprise, once the code base hit around 20,000 lines, I was moving around just fine and making good progress on the Mac. While XCode is no Visual Studio, its deficiencies are not insurmountable to writing code.
Next time, I will be talking about GUI development on the Mac vs. the PC.






Add New Comment
Viewing 16 Comments
Thanks. Your comment is awaiting approval by a moderator.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Add New Comment
Trackbacks
(Trackback URL)