views:

449

answers:

7

I have been asked what it would cost to port a .NET application to Mac.

I don't have enough knowledge to even give a rough estimate. I have not done anything on a Macintosh above surfing the web, and that was 10 years ago. My guess is that we probably have to write it from scratch in java or objective-c.

We are a Windows/Linux shop, and besides forking out for one or two snazzy new iMacs, what else do we need that costs money?

Does anyone have any advice?

Edit1: Am I correct in assuming that most UI used for "classic" winform applications will be considered very ugly on a Mac?

Edit2: Since it's almost impossible to select a "correct answer" to this question I have decided to change it to "community wiki"

+4  A: 

If your application is built with C#(and possibly VB), you may be able to use Mono. This is a open source .net implementation. See http://www.mono-project.com, and for a development IDE, http://monodevelop.com/

KT

Karl T.
+6  A: 

If you are already using .NET you might as well try migrating to Mono instead of re-writing everything.

Joey
+5  A: 

That depends heavily on the kind of application and your customers.

There are lots of poorly ported applications on the Mac (Java, Qt, Silverlight, Mono), that Mac users dislike and don't use. Personally I think, there is no such thing like "cross-platform" when it comes to UI (well, I know there is, but I think results are unacceptable).

So I recommend to learn Cocoa and Objective-C, but that's definitely possible. The development tools Apple provides are free and great.

Nikolai Ruhe
+2  A: 

It entirely depends on the nature of the app. Do you foresee porting the application to linux eventually? If so, you might want to consider rewriting in a platform-agnostic language.

I personally can't stand Mac applications that are written in Java. They just don't feel right at all. To me, a rewrite in Objective-C would be the best option to make the App feel like a native App.

Objective-C is a great language, and as stated before, the Developer tools are free from Apple.

One more thing to consider: Apple has great support for Ruby and Python as well. There are bridges to allow you to leverage the Cocoa framework in your application. This is all built into the Xcode IDE.

Reed Olsen
Totally agree. The Cocoa-Java bridge has long been deprecated, and don't expect to see it beyond Leopard. Objective-C is the "purest" solution, but you can mix with Python/Ruby/etc. as well. You can try using Mono to leverage existing C# code, but be aware that it's a "square peg in a round hole" proposition from the get-go.
Quinn Taylor
Although, to be fair, it is possible to write nice UIs for mac in java (see cyberduck) but it is the exception, no the rule
cobbal
Good call. Cyberduck is actually one of my favorite Mac apps :)
Reed Olsen
+4  A: 

Although you will need Apple hardware, but that's a fairly trivial one-time (or at least infrequent) outlay — as always, the programming effort is what will really cost you money. Whether you start from scratch in Objective-C or leverage existing code via Mono (or some other tool) you will still have development costs. The magnitude of those costs will depend on the approach you choose, the expertise of your developers, and degree of flexibility inherent in the design of your software.

Before you choose any specific approach, definitely look for examples of apps that have ported from .NET to OS X (in whatever form). Be inherently mistrustful of "silver bullet" / panacea tools. Be sure that your chosen approach will support all the critical technologies you use, or that equivalents are available on the new platform. Recoding from scratch can be quite costly, but it's even more costly if you start out trying to port it, only to realize it won't work as hoped and you have to start from scratch anyway. :-)

Quinn Taylor
A: 

Mono seems like the obvious choice, but the last time I looked into this, their Windows Forms support was practically non-existent. I'm sure it's gotten better, but it'd be worthwhile to take a look at the Mono Project WinForms page to see what the current status is.

Also be aware that Mono (of course) doesn't support P/Invoke to access the native windows API, when running on other platforms. This could be a major problem if your application uses the native API for anything important.

Mark Bessey
+1  A: 

It's quite possible to write completely cross-platform .NET code that runs on Windows/Mac/Linux. It's a lot more work, but it is doable. For a good (open-source) example of what is possible, have a gander at Banshee, a cross-platform media player written in .NET.

Jacob
As you say, Banshee is a good example of what's possible. At the same time it's a good example of why you shouldn't try to build cross-platform UIs.
Nikolai Ruhe
Now that you mention it, it is rather ugly. Oh well.
Jacob