views:

225

answers:

7

Coming from a Microsoft development backgroup I am a bit confused as to what development languages/environments are available on an Mac. Are there any C# like languages to develop with on the Mac other than Java that I should also consider? What do MS to OSX converts prefer and why? I am after a business level programming strategy and not gaming or graphics so application performance is not the overall driver for my choice of platform.

+3  A: 

Have a look at the Mono project

Quote from wikipedia

Mono is a project led by Novell (formerly by Ximian) to create an Ecma standard compliant, .NET-compatible set of tools, including among others a C# compiler and a Common Language Runtime. Mono can be run on Linux, BSD, UNIX, Mac OS X, Solaris and Windows operating systems.

But I really recommend go the Cocoa route and get Aaron Hillegass book "Cocoa Programming for Mac OS X"

epatel
+12  A: 

Objective-C with the Cocoa API is the way to go. Once you have those down, there's also bridges between Ruby and Python to the Cocoa API. I'd highly recommend initially learning the Cocoa API with Objective-C first, though.

Grant Limberg
A: 

On a related note,

Silverlight is a web-based "flash-like" technology supported on Windows and Mac and you can code in most .net languages.

TJB
+2  A: 

Objective-C, C, C++, Java, Ruby, Python, Php, ... There are lots of choices of languages/development environments to use, including C# via Mono as @epatel says. I would say that the choice of language depends more on what you are developing than on what platform you are coming from.

tvanfosson
A: 

C# is available for OS X, as long as you're willing to use Mono. For non-UI and web stuff it ought to work just fine.

For desktop app development, I use REALbasic. It's syntax and object model are very similar to Visual Basic.

For business-level programming, I'm not sure if Cocoa/Objective-C will be the most productive thing to start with; it's quite different than .NET and/or Java.

Paul Lefebvre
+5  A: 

I also just bought a Mac and come from a .NET development background. I tried a bunch of different languages and environments. If you're going to write OS X desktop software, you're going to need to use Cocoa and Interface Builder. IB doesn't have a Windows counterpart because it's so heavily tied into Cocoa. This means you're going to need to learn Cocoa simultaneously, and it's not easy to do by looking at code.

Objective-C is the native language of the Mac and it's not as refined as C#. It takes a while before you can read it fluently because calling functions looks different. Using Python or Ruby instead of Objective-C only adds a layer of complexity until you learn Cocoa, but it seems quite viable after that. C# via Mono works fine, but I don't think the whole Cocoa# bridge is implemented. The C# tools are a lot lower quality than Visual Studio, and MonoDevelop is extremely ugly on the Mac. I decided that if I want to go this route then I need to learn Objective-C, but went a different direction.

If you're writing a web site then you have a lot more flexibility. The entire Python and Ruby cultures are available, although there are some hiccups with installing some Python libraries. This is the route I took because I had some basic Python experience and the skills are almost 100% compatible with Linux. iTerm is a better client than Terminal. I didn't like most of the code editors I tried, and started with Smultron which isn't much more than a very competent text editor with syntax highlighting. There are definitely tons of options.

No matter how you approach it, you're going to spend a lot of time learning. I have constantly stumbled over Python syntax but I'm finally getting good at it. The SQLAlchemy (Python ORM) docs almost always have an open browser window. I also bit the bullet and started using Vim (MacVim specifically), which is actually a fun thing to learn because there always seems to be another command that does exactly what you want. (For example, I got tired of going to a line, hitting $ to go to the end, hitting a to append, then hit enter to start a new line so I Googled and found out I can just hit o.)

Dan Goldstein
+1  A: 

Objective-C and Cocoa is the way to go for sure. Quite often devs will make the misconception that Objective-c isn't "as detailed", or "as fine tuned". But I can assure you, it's the power house behind some of the best apps in the business. There is a noticeable learning curve.

Rev316