Creating .NET C# Applications for Linux 340
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. "
.NET Windows Forms (Score:2, Interesting)
portability problems (Score:5, Interesting)
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
Re:let me get this straight ... (Score:3, Interesting)
Sounds just like
I've always though that Mono was a waste of time.
How cross-platform (Score:2, Interesting)
A C# program targeting the Mono runtime will probably be very portable to all operating systems that run Mono. But, will a Mono app/code base developed on Linux run just as smoothly on the
wxWidgets vs. Qt vs. Windows Forms (Score:3, Interesting)
Qt was eliminated right out - my project can't be made GPL (due to a piece of the code that is subject to export restrictions), and I can't afford the license cost for a commercial license (and the educational license was too restrictive: I could only develop on campus on a school owned computer.).
Windows Forms is looking very slick. Cross compatibility isn't a requirement, its something I would like. I havent bought into the whole
-everphilski-
Re:Here we go again (Score:1, Interesting)
I personally think it rocks, and as a Windows developer by trade, allows me to get a wider audience for my programs.
My scripting enigne will be open sourced and make available in due course (probably via gotdotnet or sourceforge).
Re:I'm sorry (Score:2, Interesting)
Re:let me get this straight ... (Score:3, Interesting)
Sam
I'm a long time linux user, and I love java - and I meet a lot of people of like mind in the course of my work. As for mono, we're all pretty much taking a "wait and see" approach. It's a neat hack, but... can we trust that microsoft won't stir up patent trouble? I dunno, java just seems a lot less risky.
Alright, so who told you that linux programers won't use java?
YHBT, my friend!
HAND
Re:I'm sorry (Score:3, Interesting)
GUI applications (Score:4, Interesting)
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.
Re:let me get this straight ... (Score:3, Interesting)
Easier Path to Linux? (Score:2, Interesting)
Then along came Eclipse, which breathed new life into the Java development experience. Nowadays, Eclipse has become an integral part of using Java; most folks I know don't think twice about the IDE they'd choose to develop Java in. The best part of all this is that Eclipse is cross platform as well, which allows me to switch operating systems without hesitation. This could definitely be considered a path to Linux (and in fact, it has been for me).
In the same way, Visual Studio
The easier path to Linux doesn't come down to a language or its Virtual Machine. In the development world, it comes down to your development environment, which is at the core of what a developer does everyday.
Re:let me get this straight ... (Score:4, Interesting)
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
Re:let me get this straight ... (Score:4, Interesting)
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.
Java Vs C# (Score:3, Interesting)
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
Apples and Oranges (Score:4, Interesting)
You can't compare the two. Try comparing Mono and Blackdown instead.
Not for me (Score:3, Interesting)
If people want an open-source, cross-platform environment, then there are plenty to go around. I use Gtk2-Perl, and I've written a number of Perl modules to assist database developers to connect their DB backend with their GUI. See http://entropy.homelinux.org/axis_not_evil [homelinux.org]
Gtk2-Perl isn't the only option out there. For Gtk2 ( which runs on Linux, Windows, OS-X, and an impressive number of other platforms ), there are bindings for PHP, Python and Ruby. That covers what most people are recommending for RAD these days.
Then there's QT. I haven't had much to do with it, but there are bindings for all the above languages and more.
There's Java.
I don't see the point in mimicking
And remember, as a wise man ( OK, it was Dubya, but anyway ) once said:
Re:let me get this straight ... (Score:1, Interesting)
I used JBuilder, and Eclipse to make gui's. Eclipse is really a catastroph, but still it isn't as easy as
And Even when you have a good GUI builder for Java, you still can't get around that it takes a lot of effort to make a swing-gui behave the same as a windows gui that the customers is asking for...
Re:Here we go again (Score:5, Interesting)
* 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.com]) Medsphere's products (Mono/Gtk# based).
* Otee's Unity game engine (http://www.otee.dk/index.html [www.otee.dk]).
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 [mono-project.com]
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 [mono-project.com]
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.
apt-get install is overrated (Score:3, Interesting)
It's very easy to download the Sun JRE or JDK from Sun's website and to install it. Not much more effort that typing apt-get install.
I've been using Debian, Fedora and CentOS recently after years of using Slackware and Solaris, and I can tell you that all the package managers have their advantages and disadvantages, but really, downloading and installing the Java distribution from Sun really isn't that difficult.
Sun may have some strange attitudes towards the redistribution of Java, but from what I can gather this is due to stupidity and ignorance rather than malice. The wheels of beaurocracy turn very slowly in Sun.
Re:apt-get install is overrated (Score:3, Interesting)
On the other hand C/C++, shell, perl, python and all other apps run fine out of the box (and you don't even know what lang it was written in before you examine it in more detail). It is a serious stopper and it could be why mostly only enterprise level apps are written in java.
Re:Why so many stories about mono? (Score:1, Interesting)
With Mono and
This is the true freedom Mono gives to me, today. My language of choice is C#, but I don't know if it will always be. Java and
Another poster mentioned projects such as JRuby, Jython, Groovy, etc., which are interesting. But Jython being around for oh so many years now, proving a stable and fast environment, has it really attracted many users from the Python community?
Java definitely has its strength and is _the_ major player in both "extremes": the server side heavy data crunching business applications, and the embedded system portable world. But in my opinion, for the common desktop applications, it has failed. How many commonly used desktop applications using Java do you know? I am no Java geek, but the only one that is really usable that comes to my mind is Eclipse and Azureus, and even thats an application only for developers or P2P users, respectively.
Please don't consider this a flamebait or something, I just express my feelings after developing two years on the Mono platform, which has saved me a large amount of time over my previous development environment (C, C++ on Linux).
Re:Apples and Oranges (Score:3, Interesting)
I know when writing python software when I need something outside the standard lib the first place I look is the debian package archives. If there is a package in the archive that can do what I need then it will get the first shot at me using it, if it works without problems I won't look further. The reason is simple I have a lot of work to get done and not enough time to do it all and if something works and was easier for me to get working then why look further especially if it got the job done?
Java has that problem, it takes a lot more effort to use it then to use something else that will still get the job done.
Re:let me get this straight ... (Score:4, Interesting)
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..
Why I worry about .NET (Score:2, Interesting)
But I really worry that Microsoft has opened a large lead here with .NET, at least in the medium term. Most people have simply compared C# and the .NET framework classes against Java and base their assessment of .NET as a platform on that. But I think it misses the point somewhat.
The Bourne shell is powerful because it allows entire programs--even ones not specifically designed to work together--to be connected together: the utility of the system as a whole increases dramatically because of this network effect. With .NET, it's the same, except with classes and objects across languages previously incommunicado.
On Unix, every scripting language, by contrast, is pretty much an island by itself.
If you need a binding for say, MySQL, you'd have to implement it for Python, Ruby, Perl, Tcl and whatnot. Although tools like SWIG try to automate this, in general, every new binding (N x M of them) is written from scratch. One might argue that doing it this way makes the binding conform best to the spirit of each scripting language, but in practice bindings for important libraries are often buggy and incomplete, perhaps because the cumulative effort is too great or too much language-specific expertise is needed. This is especially true for complex GUI toolkits like Gtk or Qt, which cause headaches with complicated data structures. .NET bindings, on the other hand, are only necessary if they're for unmanaged code; even then, they need only be written once.
Re-using code from different scripting languages is very difficult. Suppose if, for example, a PHP programmer doing screen-scraping is fed up with the PHP/Curl bindings and wants to use Perl's excellent LWP::UserAgent module. Or, say, someone writing a Ruby shopping cart would like to borrow one of the payment library bindings in PHP? How is that possible? Wrapping the functionality into a stand-alone program (and hence using the shell and IPC as glue) is often so much of a hassle that people simply don't bother and end up re-implementing it from scratch. In .NET, this is almost trivial.
Every scripting language has to implement its own interpreter/virtual machine/compiler. Making a thread-safe and efficient one is not easy; making a JIT fast enough to even come near the efficiency of native C/C++ involves a great deal of messy, architecture-specific work. The CLR, by contrast, is common to all .NET languages and any performance enhancement to it is inherited by all. It's well-tuned enough that, for example, PHP.NET actually runs faster than the native PHP interpreter, even with the Zend accellerator product.
Packaging, deployment and building are different in each language. This can be a major problem when trying to glue scripts written in different languages together into the same project or getting the mess to install on the target system. Suppose it was an application which needs Perl 5.8 for one component, PHP 4.3.x (with mcrypt an GMP support enabled) for another and Python 2.3 (with PostgreSQL or MySQL bindings present) for others? How does one deploy this if the target system does not have one or more of these installed? Is there a simple way to put such an application in a test harness or even build it without resorting to a hodgepodge of install.py, MakeMaker and PHPAR? On the other hand, the only prerequisite for .NET applications need be the .NET runtime itself. Everything is compiled into the same common executable bytecode, so no additional interpreters are needed. Any assemblies the application depends on can be safely bundled with it even if the target system already has different versions of those assemblies installed.
I believe, after putting seeing all of these advantages put together, that Miguel de Icaza was right and that we cannot afford to dismiss .NET as merely a Java work-alike.
Re:let me get this straight ... (Score:3, Interesting)
Re:let me get this straight ... (Score:3, Interesting)
Miguel, I have watched for several years this Mono project. At first I thought it was a bad idea. Now I know it is a bad idea. I don't understand why you continue to fragment the community as the Mono project does. I remember the blurb about MS barring Mono from some conference recently. I don't know why you continue to add momenteum to a platform that you cannot control. That only benefits one person - the same one who controls the platform.
In the mean time, I see businesses citing Mono if they decide to move to Linux. However my understanding is that if you attempt to run a MS
While I realize there is good ideas in
The good things are that it gives us a CLI, but we could already have done in the Java, Perl, Python, or Parrot VMs without strengthening MS.
Now do note that my support would be different had MS released _all_ of