Home > .NET, cocoa > XCode vs. Visual Studio

XCode vs. Visual Studio

I move between VS and XCode a bit without shuddering or fussing, which seems to make me a strange creature. In general, shocking as it is to say on a Cocoa list, VS is actually a much more powerful environment. Most who love XCode have little used VS (at least VS2005 or later, VS.NET is clunky IMO). But learning what actually is better about VS requires using XCode for quite some time. Most of the initial complaints are simply small differences between the two; many of which I prefer the XCode way. But then, XCode is a Mac app, and I generally prefer Mac UI.

As a regular user of both, here are some advantages of VS that do not wear off when you get used to XCode:

  • Much deeper integration with its debugger. XCode and gdb play together, but they’re not integrated the way VS is with its debugger. There are many important gdb features that can’t easily be reached from XCode, and some (debugging with a core file) that you pretty much can’t run XCode at all if you want to accomplish.
  • The multi-tab interface makes it much easier to manage moving between many files, and the debugger is better integrated with the editor. XCode encourages you to have an explosion of windows, and the debugger is inconsistently integrated with the editor. The AllInOne interface for XCode goes too far the other way and makes moving between files a real pain.
  • Mouse-over gives much better information in VS when editing. VS is always compiling your code, and so can give you access to information in the editor that is only available in the debugger for XCode. XCode technically also is always compiling your code (or it claims to), but it doesn’t really make use of this fact.
  • VS is better in nearly every conceivable way if you’re programming in C++. XCode hates C++. If you use wstrings in C++, XCode will actually come out of the computer and slap you around (who knows, maybe it should). I dream of being able to easily display wstrings in the debugger. Yes, I’ve built the formatting plugins and from time to time they even work. Probably the biggest missing feature in XCode is good code completion for C++, especially with overloads, which VS does very well.

All that said, I still much prefer to work in XCode, but mostly because I prefer coding in Cocoa to .NET (.NET is actually pretty nice, but Cocoa is nicer). Apple’s help documentation for Cocoa is far superior to Microsoft’s documentation for .NET (which is infuriating to work with), and getting to the help in XCode is much more effective than in VS.

So to VS guys I say: Give XCode a chance. It’s better than you think once you are used to Mac interfaces and if you’re working on Cocoa apps (which XCode is highly optimized for). To XCode guys I say: until you’ve used VS for a while, don’t assume that XCode has all the features it should. In the programming editor world, XCode is still kind of primitive.

Categories: .NET, cocoa Tags: , , ,
  1. July 30th, 2009 at 17:06 | #1

    Im a NOOB to iphone dev, as such i had to start from ground zero with objC, cocoa and the iphone specific UIKit, xcode, along with apples docs. My background is asp 2 and 3 from microsoft and once i started messing around in C with MSVS 2009 i think, or 2008. In any event, ive been reading posts on MSVS vs Xcode and found people attacking each other overo it. ive been trying to figure out if i should stick to c in VS or objC in xcode. i must say xcode has had a much less steep learning curve than msvs did. The proof is in the fact that i dropped msvs after a while. (of course i could still drop xcode :)). My point is that i have found apples documentation much friendlier to the novice programmer and now im just kinda worried that i wont be able to do much with the apps i develop since there are only a million or so iphone users vs god knows how many windows mobile users. same for windows xp/vista users vs apple macosx users. so in my crystall ball if you will, i see more future in msvs c++ programming or .net than in apples xcode and objC. but im sticking to xcode and objC just because i get it a lot easier than msvs. i wish xcode and msvs would incorporate c, c++ and objC equally so that the rpogrammers could make their own calls.

  2. August 3rd, 2009 at 21:49 | #2

    VS is unlikely to incorporate ObjC since for all practical purposes, ObjC==Cocoa and Cocoa==Apple. Without Cocoa, ObjC isn’t much of a language. I’ve just posted an article that goes into this more deeply. It would be nice if XCode supported C++ more fully, but that’s unlikely for similar reasons.

    Regarding the future for programmers, you have to consider much more than the total size of a market. You also have to consider competition and practical opportunities. It doesn’t matter how many Windows users there are in total if the overwhelming majority would never buy your product. And if the niche you want to fill is overflowing with established companies, that’s a tough place to be, too. Micro-development shops (1-5 people) thrive in the Mac world. Single developers really can thrive iPhone world where so much of the trouble of distribution is taken care of. The Windows world is a bit of a muddle. Do you bet on the future with C#/.NET, which you still can’t easily ship desktop applications with, or do you stick yourself in the past with C++? If you write for OS X 10.5, all your skills will still apply to 10.6. But try to bring your MVC apps over to the bright new .NET world and it’s all from scratch. ASP.NET’s a bit better for that IMO, but talk about a saturated job market. A Java? The colleges churn them out. Cocoa is one of the few bright spots of opportunity IMO.

  3. DD
    May 13th, 2011 at 13:50 | #3

    I found this post while searching for tips on how to make xCode behave more like Visual Studio. I recently switched jobs; I was working as a web programmer for many years and was splitting my time between using Visual Studio 2008 to convert my company’s existing LAMP websites (which I worked on in Eclipse) over to asp/.NET sites. Now I write iPhone apps and maintain a small set of customer php sites. I was using Windows XP and 7 at work, and a Snow LeopardMacBook Pro at home. Now I use a Mac Pro at work. When I need Windows, I fire it up in VirtualBox. I am a Mac fanboy, no way to deny it. But I have to say that I think Windows and VS in particular, have a much, much nicer interface, in general. The OS X looks nicer in many ways, and is smoother, but Windows is easier to use, as far as application, window, tab, and document switching are concerned. I want a key combination to switch between two different windows of the same application (ctrl-tab in Windows), I want to be able to grab and edge or corner of a window and use it to resize. I want an application’s icon to stay in the doc even when the window is open on the desktop. I want keyboard commands to get to menu items. I’m not willing to trade the OS X system architecture, stability, or security to get it, but I’d consider it. There is more I could say, but this post looks old, so I won’t gamble that anyone will be reading it. I’m going to switch back to xCode now and start working at a job I enjoy, but the old spirits die hard and every time I have to take my hands off of the keyboard to switch between windows, part of me dies.

  4. May 13th, 2011 at 14:09 | #4

    I’m not sure I understand all your issues here.

    • I want a key combination to switch between two different windows of the same application (ctrl-tab in Windows) – Cmd-` on Mac

    • I want to be able to grab and edge or corner of a window and use it to resize – Agreed. They’ve added this in 10.7.

    • I want an application’s icon to stay in the doc even when the window is open on the desktop – I’m not sure what you mean here. This is how Mac works.

    • I want keyboard commands to get to menu items – Mac is extremely good at this, and it’s highly configurable compared to Windows(System Pref>Keyboard>Keyboard Shortcuts). Cmd-? (Cmd-Shift-/) will give you something much more powerful than tapping Alt in Windows.

    I have a lot of complaints with the Mac UI, particularly its train wreck of a Dock (which after years of using, I still don’t really like). But keyboard shortcuts really are not a problem.

  5. Queue
    June 17th, 2011 at 01:56 | #5

    @DD

    The only thing keeping me using OSX was the fact I could use alt+~ to switch between windows. Then I found http://www.ntwind.com/software/vistaswitcher.html (googling and such). I agree that the universal hotkeys among programs really makes OSX a nice platform and work environment but there is always a freeware application for Windows that does the exact same.

  6. February 25th, 2012 at 15:59 | #6

    I’m an expert ASP.NET developer and now a NOOB Xcode 4.2 / iOS 5 wannaB developer. So as a former Microsoft Bigot, I can say that I’m impressed with Xcode as an IDE.

    Yes, familiarity with one tends to guide our judgement of the other, and without an equal knowledge of both, that judgement often becomes ideological.

    I can say that VS 2010 and Xcode 4.2 are both superb.

  1. No trackbacks yet.