Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Making a C#/Winform application cross-platform - should I use AIR, Mono, or something else?

I have an app that I've written in C#/WinForms (my little app). To make it cross-platform, I'm thinking of redoing it in Adobe AIR. Are there any arguments in favor of WinForms as a cross-platform app? Is there a cross-platform future for Winforms (e.g., Mono, etc.)? Suggestions for cross-platform UI development?

By cross-platform I mean, currently, Mac OSX, Windows and Linux.

This question was asked again and answered with better success.

like image 314
Dan Rosenstark Avatar asked Sep 16 '08 14:09

Dan Rosenstark


People also ask

Can you make your own AC?

You just need a fan and two plastic soda bottles to make this air conditioner. Modify the bottles by cutting off the end and punching holes in the sides. Then strap them to the back of the fan and fill the bottles with ice. Voila!

Can you DIY a central air conditioner?

While 87 percent of U.S. households use some type of air conditioning, central AC systems are the most sought-after for both convenience and accessibility. If flipping a switch for whole-house cooling is what you're after, you may wonder whether it's possible to install your own. And the answer is, you definitely can.


2 Answers

As far as my experience in Flex/AIR/Flash actionscripting goes, Adobe AIR development environment and coding/debugging toolsets are far inferior to the Visual Studio and .NET SDK as of the moment. The UI toolsets are superior though.

But as you already have a working C# code, porting it to ActionScript might requires a redesign due to ActionScript having a different way of thinking/programming, they use different primitive data types, for example, they use just a Number instead of int float double etc. and the debugging tools are quiet lacking compared to VS IMO.

And I heard that Mono's GtkSharp is quiet a decent platform.

But if you don't mind the coding/debugging tooling problems, then AIR is a great platform. I like how Adobe integrates the Flash experience into it e.g. you can start an installation of AIR application via a button click in a flash movieclip, that kind of integration.

like image 110
chakrit Avatar answered Oct 23 '22 15:10

chakrit


I'm thinking of redoing it in Adobe AIR

Not having spent much time with AIR, my personal opinion is that it is best for bringing a webapp to the desktop and provide a shell to it or run your existing flash/flex project on the desktop.

Btw, if you don't know ActionScript, I mean its details, quirks, etc, don't forget to factor in the time it will take googling for answers.

Are there any arguments in favor of WinForms as a cross-platform app? Is there a cross-platform future for Winforms (e.g., Mono, etc.)?

It's always hard to predict what will happen, but there is at least one project (Plastic SCM) I know of which uses Mono Winforms on Win, Mac and Linux, so it is certainly doable. However, they say they built most of their controls from the ground up (and claim they want to release them as open source, but not sure if or when), so you will need to put in some work to make things look "pretty".

I played with Winforms on non-windows platforms and unfortunately, it isn't exactly "mature" (especially on Mac). So what you get out of the box may or may not be sufficient for your needs.

If you decide a desktop app is not the best way to provide a cross-platform solution, you can always take your business logic written in C# and create either a full-blown webapp with ASP.NET or go with Silverlight, so many other options exist with C#.

like image 20
Emrah Diril Avatar answered Oct 23 '22 15:10

Emrah Diril