Creating .NET C# Applications for Linux
An anonymous reader wrote to mention an article on the IBM site entitled Mono brings .Net Apps to Linux. From the article: "Mono gives open source developers the programming power and flexibility to build applications for Linux while maintaining cross-platform capabilities, using a variety of .NET-compatible languages. One of the great advantages of Mono for current .NET developers is providing an easier migration path to Linux. The Mono project has a very open and active development community and provides both developer tools and the infrastructure needed to run .NET client and server applications. Perhaps the most important benefit of using the Mono architecture is that you gain language independence. Mono lets you leverage any existing code from languages supported in the .NET runtime. "
Keep in mind that Microsoft saw .NET as cross-platform, but only between windows platforms. Java is far better in that respect. While full compatibility is in many cases impossible, the extra effort per platform is much smaller
The Raven
Don't get me wrong, I happen to like both C# and Java, but if I have to create a gui app on windows for some reason, C# and .net wins hands down.
Yes, I realize I could use SWT, but that's still not necessarily good enough. It surprises me that Swing still sucks so much after all this time. I would love to use one language exclusively if I could, but until I see some decent gui apps being built using Swing, it's hard for me to want to use Java unless I have backend services to create.
Having said that, I would like to know if anyone can point me to gui applications that use swing and are actually good and fast. I'm curious if they exist at all.
.NET supports tons of languages, but mono does not! Remember everyone the goal of mono is not to be microsoft .net compliant. It is to be similar to .net but not support everything and add extensions of their own. They don't want you to run windows code on linux, they want you to run mono code on windows and linux with the MONO runtime. Its not portable in the sense that you can run ALL .net 1.0 from windows using microsoft's .net runtime on mono and vise versa. Java gives you portability, mono does not. Finally, java runs on non windows/linux/mac os x systems. I can run java on freebsd but i can not run mono (well it crashes with thread/garbage collection problems all the time).
.NET. He even said i was stupid for wanting it to be compatible. Mono should not be advertised as .NET for linux because its not. Its C# for linux but on a different runtime. VB.NET support is not complete in mono either.
Java = portability; mono = novell's quality of software (bad)
I've personally talked to a mono developer at my university. He works for novell on the project and they never intend to make mono compatible with
MidnightBSD: The BSD for Everyone
.NET makes it simple to interface with existing libraries written in C which, IMHO, makes it a more natural fit with Linux. C# applications can easily take advantage of existing libraries (GTK etc) whilst Java requires more effort (to force you to be "pure" and cross platform).
Sometimes having ease and flexibility is more important than being cross platform.
Besides, most libraries linux C# applications p/invoke are source-portable so the C# application itself will be cross platform as long as you have the platform specific binaries for the native libraries you pinvoked. The binaries you distribute won't necessarily be cross platform but for desktop applications, that's not really a big issue.
I've been programming since I was in Gr. 5. From all the languages I've ever programmed in(BASIC,dBase, Java, C/C++, C#, Assembler etc...), my favourite is Java and C#.
:(
What I like about Java is that it is a modern language that uses modern concepts, is very well documented and its vast lib support makes it very useful.
C# also follows along the same lines of Java, making it quite similar except you have the option of getting out of the sandbox that Java uses. Some people need to get out of the sandbox for various purposes, and C# allows that, not Java.
If I were to choose, I would choose C# 1'st for this very reason and then Java. Unfortunately, I'm a hardware programmer, so I am stuck using C
Mono isn't produced by Microsoft, so it's unfair to compare Mono to Sun's JRE. Yes, Sun requires you to fetch the install file yourself (at least with Gentoo's Portage). But Mono is a GPL thing run by people not affiliated with Microsoft.
You can't compare the two. Try comparing Mono and Blackdown instead.
There are a number of cross-platform commercial applications that run on Mono, for example:
.NET applications and various commercial applications.
* Novell's own iFolder client and servers (same code base, modulo UI which is native on each of the three platforms: Linux/Gtk, Windows/Winforms, Cocoa/OSX).
* (http:///www.medsphere.com) Medsphere's products (Mono/Gtk# based).
* Otee's Unity game engine (http://www.otee.dk/index.html).
You can look for the "Works with Mono" logo on open source
For a larger but still incomplete list, see:
http://www.mono-project.com/Software
As for your question about what will happen when C# 2.0 comes out, we have good news, we already have implemented it (we are missing two fairly minimal features though), for details you can see our web page on the subject:
http://www.mono-project.com/CSharp_Compiler
Generics, itereators, anonymous methods, nullable types, partial classes, per-accessor modifiers, static classes, fixed buffers and co/contra-variant delegates are all implemented and available today.
And we can not wait to implement the new features in C# 3.0
Miguel.
One thing I really miss with C++ and Java is properties. What's with a language that will put all the work into a ternary operator so they don't have to type if/then/else, but insists on mutators and accessors because properties are syntactic sugar?
The reason for the ternary operator is simple - to allow C code to be easily ported.
As for properties, this is a good point but in practice does not matter - all good Java IDEs have property management built in: The will allow the automated generation and management of get/set methods and the values they change. For example, on NetBeans you simply select the 'properties entry' for the class, and off you go..