简体   繁体   中英

Comparisons Windows and Mac OS X as development environment

I have been using Visual Studio (VC++) and Windows API for a long time, and quite familiar with Linux tool chains, but have no experience on Mac OS X development.

I would like to hear your opinions about the pros and cons of Windows and Mac as development environment . But, as it may be subjective, I would appreciate if you could enumerate some facts, rather than simply saying "A is better than B". In particular, I'd like to hear about the followings:

  1. IDE: Visual Studio vs. xcode
  2. API: Win32 API (including native C-based Win32 API, MFC, C#) and Cocoa (Mostly Objective-C)
  3. Documentation: MSDN vs. ??
  4. Tool supports: Debugging, profiling, testing, etc.
  5. Knowledge base: When you have a problem, is it easy to get help from anyone? Are there many books? (In Windows development, there are Petzold, Richter, ...)
  6. Mobile apps: iPhone vs. Windows Mobile

I'm afraid that this topic would be controversial. But, I want to know how Mac offers development environment comparing to Windows.

I am trying to keep the answers as non-subjective as possible, focusing strictly on facts.

1 - IDE: Visual Studio vs. xcode

Looking just at feature sets, most developer tool features are pretty standard these days. The basics, code highlight, debuggers, profilers, etc. are available on each. Some tools have features not found in others, but the base level of functionality is pretty stable across the two platforms.

2 - API: Win32 API (including native C-based Win32 API, MFC, C#) and Cocoa (Mostly Objective-C)

They are different, though perform the same functions. Both give their respective developers the building blocks to create applications that fit the designated style of the platform. Both allow a developer to deviate from the "standard" style recommendations.

3 - Documentation: MSDN vs. ??

Apple has their own documentation set available as well. It's the Apple reference library. http://developer.apple.com/mac/library/navigation/index.html

4 - Tool supports: Debugging, profiling, testing, etc.

Again, both suites contain equivalents. Debuggers, profilers, test harnesses, etc.

5 - Knowledge base: When you have a problem, is it easy to get help from anyone? Are there many books? (In Windows development, there are Petzold, Richter, ...)

From a total word count of published books, I would hazard a guess that the Windows development world outpaces that for Mac development. That said, there are some very good Mac development books out there. For a new developer, "Cocoa Programming for Mac OS X" by Aaron Hillegass is considered one of the primary sources.

6 - Mobile apps: iPhone vs. Windows Mobile

I don't have any experience with developing for Windows Mobile, but again, I would think that both have reasonably similar tool chains, since everyone "borrows" ideas from each other.

All that said, Mac offers a comprehensive development environment for developing for Mac and iPhone platforms, much like Windows has a comprehensive development environment for developing for Windows and Windows Mobile platforms. One major difference is that the standard Mac development tool chain comes with your Mac. You don't have to buy anything else (except for the iPhone developer program subscription if you develop for that platform).

1 - IDE: Visual Studio vs. xcode

Perhaps unsurprisingly, Visual Studio is very Windows-like and Xcode is very Mac-like. Xcode offers a very clean interface with a minimal amount of very large buttons. The code auto-completion in Visual Studio is superior to Xcode, but I believe the latest versions of Xcode have closed this gap significantly. Xcode is very good about using toolbars and accessory panels in consistent ways, so if you're comfortable using the inspector panel in Interface Builder, you'll also be comfortable using the inspector panel in Pages, Numbers, Keynote, iWeb, etc. Visual Studio tends to be very chaotic, ie accessing settings for the code editor is different than accessing settings for the reporting services component, which is different than the TFS component, etc.

OS X also offers the incredibly helpful menu search bar, which makes locating the command to open the breakpoints window in Xcode nearly as easy remembering what the key combo is.

The UNIX foundation of OS X, plus Ruby, Applescript and Automator support makes it very easy to script Xcode in whatever language you're comfortable with. Great for automating SCM processes on builds or automated moving of files or what have you.

2 - API: Win32 API (including native C-based Win32 API, MFC, C#) and Cocoa (Mostly Objective-C)

I can't speak for Windows APIs as I've barely used them, but Cocoa is wonderful. Putting aside any objections people have to Objective-C, it's very rare to hear disparaging remarks about the APIs, they are powerful, easy to use and offer incredibly consistent interfaces, which makes picking up new Apple frameworks pretty darn easy.

3 - Documentation: MSDN vs. ??

Apple's documentation is clean, well written, up-to-date. Almost all classes will contain links to sample projects. Most class documentation of any complexity include sample code, the most complex classes and frameworks will have extensive written documentation, always written in clear and easy-to-understand English.

There's a lot of reasons that namespaces would make Objective-C a better language, but I like the fact that a search for 'NSString' in Apple's documentation will always return the pages I'm looking for.

Most importantly, you don't have to wade through advertisements for other Apple products while trying to use the documentation. :-D

4 - Tool supports: Debugging, profiling, testing, etc.

I'm very pleased with the Apple tools that I've used, but having never used Microsoft's tools, I can't comment on any differences between the two.

5 - Knowledge base: When you have a problem, is it easy to get help from anyone? Are there many books? (In Windows development, there are Petzold, Richter, ...)

I have a lot more trouble getting help on Visual Studio issues. This isn't a fair comparison, though, as we are using an older version of VS where I work. When I Google for an answer on a VS issue, I usually end up on Experts-Exchange or some ancient MS blog. When I Google for help on an Xcode/OS X issue, I usually end up on StackOverflow or one of the many well-written and up-to-date Cocoa blogs out there. It's not surprising I've been a lot more pleased with my OS X/Xcode experience.

In addition, I'm usually able to work for significantly longer between Google-help-queries when doing OS X/iPhone development. The consistent class interfaces, well-written documentation and error messages that explain what you did wrong and how to fix it mean that I rarely need to ask for help to figure out the issues I'm having. That has not been my experience working in Visual Studio. Take this with a grain of salt, as I've been an OS X developer for 5+ years and have been working in Visual Studio for < 1.

6 - Mobile apps: iPhone vs. Windows Mobile

Never touched Windows Mobile, so I can't comment.

A couple of areas where Mac OS X wins:

  • performance tools (Shark, Instruments, etc) - nothing even close on Windows (apart from maybe Intel's VTune, which is nowhere near as functional as Shark)
  • all Apple tools are free

Adding on to what Paul said:

I do cross-platform development using Eclipse & occasionally NetBeans - and both work (mostly) the same on the Mac as the PC.

OSX having a BSD backend gives you access to the usual unix toolset with a terminal for running shell scripts and other nice command line stuff.

  1. Tools support

I prefer OSX because, through Macports, I have thousands of libraries + source + dependencies available. It is more integrated than cygwin. Also OS X has a proper terminal and X built in. I don't know why windows still has the same terminal as in windows 3.1.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM