468,256 Members | 1,435 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,256 developers. It's quick & easy.

Programming .NET for cross platform application

Hello,
We are going to develop our application from scratch.
The application is currently written for WIN32 users only, using MFC.
The requirements asks that the application will run (in the future) on
Windows, MAC and Linux.
Is there any way to write all the code on the .NET Framework, or I should
write the core code in native C++ and write the top level modules (including
GUI) in .NET Framework (using C#), so I can use the core code in the future
on the MAC and Linux?

Thanks,
Janiv Ratson.
Jun 22 '06 #1
7 1430
You should have a look at http://www.mono-project.com/

This is an cross platform implementation of the .NET framework.

Regards,
Lionel Schiepers.
"Janiv Ratson" <janivr@gmailcom> wrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
Hello,
We are going to develop our application from scratch.
The application is currently written for WIN32 users only, using MFC.
The requirements asks that the application will run (in the future) on
Windows, MAC and Linux.
Is there any way to write all the code on the .NET Framework, or I should
write the core code in native C++ and write the top level modules
(including GUI) in .NET Framework (using C#), so I can use the core code
in the future on the MAC and Linux?

Thanks,
Janiv Ratson.

Jun 22 '06 #2
Janiv Ratson wrote:
Hello, We are going to develop our application from scratch. The
application is currently written for WIN32 users only, using MFC. The
requirements asks that the application will run (in the future) on
Windows, MAC and Linux. Is there any way to write all the code on the
.NET Framework, or I should write the core code in native C++ and
write the top level modules (including GUI) in .NET Framework (using
C#), so I can use the core code in the future on the MAC and Linux?


To be honest, if cross platform is a main requirement, I wouldn't do all
this work-around... I would switch to Java. Then you as a programmer do
not have to worry, if it will run on a certain platform, as Java nearly
runs anywhere... and Java-Applications can be based on SWT and the
Eclipse Platform, which provides already a lot of nice stuff for
applications.

I think, the time of mono & Co will come, but it is not yet that approved...

Additionaly: Just be aware, that you do not exactly know yet, what the
changes with all the new .NET 3.0/winFX stuff will be. You will have to
wait more time until the mono project also has all these implementations
migrated... or might never be able to migrate certain stuff because of
different operating systems.

Using mono or such things is only recommended for small applications,
but on real big projects I would stick to Java or as you proposed to C++
and do only the GUI stuff in .NET for Windows, in Java for Linux and Mac...

Markus
Jun 22 '06 #3
Janiv,
The requirements asks that the application will run (in the future) on
Windows, MAC and Linux.
Forget it than with Net. If your requirements ask this and allows you to
spend probably ten times the cost for less than 10% of the desktops, than
let it be and choose something else.

Just my thought,

Cor

"Janiv Ratson" <janivr@gmailcom> schreef in bericht
news:%2****************@TK2MSFTNGP04.phx.gbl... Hello,
We are going to develop our application from scratch.
The application is currently written for WIN32 users only, using MFC.
The requirements asks that the application will run (in the future) on
Windows, MAC and Linux.
Is there any way to write all the code on the .NET Framework, or I should
write the core code in native C++ and write the top level modules
(including GUI) in .NET Framework (using C#), so I can use the core code
in the future on the MAC and Linux?

Thanks,
Janiv Ratson.

Jun 22 '06 #4
Your options for cross-platform C# development today are as follows

Windows:
MS .NET
SSCLI
Mono

MAC:
SSCLI
Mono

Linux:
Mono
SSCLI (Argueably as it really runs on BSD)

You can develop for the .NET platform on Windows and Mono on Linux and the
MAC, I do that today. Admittedly, we have run into some issues with Mono,
but only in the cases where we are doing some fancy Generics with .Net 2.0.
I have not personally used the SSCLI on anything but Windows, but I have
heard it makes a great reference platform before deploying to .NET or Mono.

Michael Cummings
Magenic Technologies

"Janiv Ratson" <janivr@gmailcom> wrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
Hello,
We are going to develop our application from scratch.
The application is currently written for WIN32 users only, using MFC.
The requirements asks that the application will run (in the future) on
Windows, MAC and Linux.
Is there any way to write all the code on the .NET Framework, or I should
write the core code in native C++ and write the top level modules
(including GUI) in .NET Framework (using C#), so I can use the core code
in the future on the MAC and Linux?

Thanks,
Janiv Ratson.

Jun 24 '06 #5
The big problem with using the SSCLI in anything resembling a production
environment would be the fact that its JIT does *no* optimizing. There are
many similar performance issues with it. It is there as a roadmap to show
how things can be done.

mono on the other hand has a very nice optimizing JIT :)

People like to down play mono but many who do have not looked at it in a
long time. Yes it will be behind the main framework (as they can't start
development on something until MS finishes or atleast releases something)
but they imo have done a very good job catching up. Winforms is just about
functional .. I have loaded up some fairly substantial apps.

The other thing which should be taken into consideration when dealing with
multiple platforms is that people don't like interfaces that are not native
to their environment. This means you will likely end up with multiple front
ends (cooa#, winforms, and GTK#). I personally tend to use MVC/MVP to allow
this up front, but it should atleast be thought of early in the design
process.

Cheers,

Greg Young
MVP - C#
http://codebetter.com/blogs/gregyoung

"Michael Cummings" <mi******@magenic.comwrote in message
news:O2**************@TK2MSFTNGP05.phx.gbl...
Your options for cross-platform C# development today are as follows

Windows:
MS .NET
SSCLI
Mono

MAC:
SSCLI
Mono

Linux:
Mono
SSCLI (Argueably as it really runs on BSD)

You can develop for the .NET platform on Windows and Mono on Linux and the
MAC, I do that today. Admittedly, we have run into some issues with Mono,
but only in the cases where we are doing some fancy Generics with .Net
2.0. I have not personally used the SSCLI on anything but Windows, but I
have heard it makes a great reference platform before deploying to .NET or
Mono.

Michael Cummings
Magenic Technologies

"Janiv Ratson" <janivr@gmailcomwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
>Hello,
We are going to develop our application from scratch.
The application is currently written for WIN32 users only, using MFC.
The requirements asks that the application will run (in the future) on
Windows, MAC and Linux.
Is there any way to write all the code on the .NET Framework, or I should
write the core code in native C++ and write the top level modules
(including GUI) in .NET Framework (using C#), so I can use the core code
in the future on the MAC and Linux?

Thanks,
Janiv Ratson.



Jul 9 '06 #6
"Janiv Ratson" <janivr@gmailcomwrote

[Wants to build a Cross-Platform .Net application]

You can build cross-platform .Net code using Mono. We've been shipping
product this way for quite some time.

At Coversant, we started with the SoapBox Framework which is an XMPP SDK.
This Sdk provides a network stack suitable for sending and receiving XMPP
stanza's across a socket. This includes technologies such as TLS (and SSL),
SASL, Compression, and Xml. This framework is fully object oriented, using a
large subset of the .Net framework.

The SoapBox Framework runs just find under Mono. Through Mono our framework
runs just about everywhere: Solaris, Linux, AIX, OSX, and a number of other
platforms. It took a little bit of work to make this happen, but it can be
done. We have a single code-base, with a few (probably less than 20) "#if"
sections that do slightly different things.

Server applications and SDK type applications are a good fit for Mono.
There's some tinkering required, but it's not bad.

GUI applications can also run through Mono, although not quite as well. At
this point, our production GUI stuff is only Win32/Win64 and not Mono.

Some pitfalls:
- Mono debugging stinks. There's no good answer.
- Dump file analysis is a joke, which makes building a true production
system difficult.
- Performance Coutners and other Windows related structures don't exist.
- Use C#, don't use VB. The Mono C# compiler is much more mature than the VB
compiler.

--
Chris Mullins
Coversant, Inc
Jul 12 '06 #7
"Greg Young" wrote
People like to down play mono but many who do have not looked at it in a
long time. Yes it will be behind the main framework (as they can't start
development on something until MS finishes or atleast releases something)
but they imo have done a very good job catching up. Winforms is just about
functional .. I have loaded up some fairly substantial apps.
I agree. For most things Mono does an excellent job. It's been frustrating
at times, especially with their somewhat patchy .Net 2.0 implementation, but
overall it's very good.

The SoapBox (XMPP sdk, Server, and Client) stuff that we build at Coversant
has run on Mono from the very beginning. We've had some problems with it,
submitted a fair number of bug reports and patches, and been very happy
overall to see it continue to mature.

--
Chris Mullins
Coversant, Inc.

Jul 12 '06 #8

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Karsten | last post: by
24 posts views Thread by Kanthi Kiran Narisetti | last post: by
7 posts views Thread by Web Master | last post: by
32 posts views Thread by cat_dog_ass | last post: by
36 posts views Thread by peter.mosley | last post: by
7 posts views Thread by Charles | last post: by
9 posts views Thread by Mex | last post: by
46 posts views Thread by Chris Stewart | last post: by
reply views Thread by kermitthefrogpy | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.