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. "
IBM gave me mono... gross!
Sam
Given that Java was a new language, maybe the migration from MS developers wasn't all that great... but now, with Mono, MS developers can move right over.
Agile Artisans
I have a .NET Windows forms app that I'm looking to port to Linux using Mono. Anyone have any experience doing this? Is it something I should even bother trying to do?
But just use Java. Why play second class citizen in some one elses world. Java was designed to be cross platform from day one and is really supported on all platforms.
The difference between Canada and the USA is that in Canada healthcare is a right and gun ownership is a privilege.
Mono has been around and kickin' for almost as long as .NET has been. It still doesn't execute .NET 100%, but definitely something to check out if your a .NET person and want to use Linux.
i'm sysop of debian machines for network services, i also write or modified some apps in php, and them run on apache. but my better applications (standalone/web) are made in visual basic. once i used visual basic and cgi4vb for web developement. now i write apps in vbnet. is the more productive language for my. and i'm not scared about palladium or so for the next year, because i can be a developer fo linux applications. with vbnet, of course, and mono. is not a politic or karma choiche is only for
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
"maintaining cross-platform capabilities, using a variety of .NET-compatible languages." .. great! You can use Microsoft VC.NET, Microsoft C#.net, and Microsoft VB.net on any version of Microsoft windows. (Well recent)
.NET-compatible languages. One of the great advantages of .NET is providing an easier migration path to Linux .. " Is the poster on crack? He might as well say " .. using a variety of MFC based languages makes targetting to Unix easy.
maintaining cross-platform capabilities, using a variety of
Why do people even bother with Mono? I know I am going to be modded as a troll but I have yet to see a single app besides a hello world being cross platform? I think the developers looking at C# and Mono in a greater light than Java are ignoring the patent and copyright issues just because C# looks cooler. Thats pretty short sighted.
C# would be the lowest ranked languaged behind visual basic if you want to avoid vender lock in.
What will happen when C# 2.0 comes out? My guess is Linux will be playing catchup again and meanwhile windows will look like a better alternative to businesses standardizing on C# because their geeks mentioned how great Mono is.
http://saveie6.com/
They're doing a lot of Stuff with mono, they've got a windows client and supposedly have a Mono based Mac version on the way, their developers all keep blogs on the site about building applications in mono and .Net.
You keep using that word. I don't think it means what you think it means.
Don't think of it as a flame---it's more like an argument that does 3d6 fire damage
This is not new at all... Mono has been around, where have you guys been?
MONO conjugate verbs for Linux.
taken! (by Davidleeroth) Thanks Bingo Foo!
MONO is not portable to other architectures due to assembly language used.
Perhaps it is still better to stick with a cross platform C++ framework like wxWidgets or QT. They offer many of the benefits of Java and .NET, without many of the nasties.
Cyric Zndovzny at your service.
With Java you now have a complete implementation of all language APIs on Windows, Linux, Solaris, HP and so on, not an incomplete port of .NET (Mono) potentially subject to Microsoft patents.
If the Apache Harmony projects succeeds (and it has a lot of backing) there will be a complete open source cross-platform Java implementation. There are already open-source Java versions that are good enough for many applications (gcj, Kaffe).
Mono is a waste of time.
The problem is that the Mono team, and Miguel specifically, will absolutely not relent in using the term ".NET". The thing is that Microsoft *intentionally* created a brand around .NET that blends deep within the Windows platform. VisualStudio.NET, anyone? It is so unbelievably stupid to use Microsoft's brand in that it will always, always be very tied to the Windows platform. The day VisualStudio.NET runs on Mono is the day they can start even *using* the term .NET OR .NET Runtime, or whatever, in conjunction with Mono. The technology is OK from a pure technologists standpoint, but from a basic business/marketing standpoint it shows that Mono and Miguel are pathetically stupid. Again, the mantra should be that Mono is done when it runs VisualStudio.NET. NEVER GOING TO HAPPEN.
My .NET colleague has been using this for quite sometime on his SuSe box(in his VMWare).
Scott McNealy to Michael: "Suck my Sun!" Michael Dell to Scott : "Lick my Dell!"
A few years back, I had a serious Java epiphany. Try taking a JAR that runs on an IBM JVM (AIX) and, without a recompile or glitches, run it on a Sun JVM (Windows). It just works.
.NET runtime in Windows?
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
I read
I'm looking into wxWidgets vs. Windows Forms at the moment for a project I'm working on at the moment. It's my thesis research.
.net or "managed C++" thing, my project is pure C++. I haven't investigated wxWidgets close enough yet to see if they mandate all of my code has to be GPL yet. If not I will give it a serious look. The sample code didn't look quite as clean or object oriented as Windows Forms did, however, which I do value. One cool thing about Windows Forms is that you can keep the "old" C++ code seperate from the Windows Forms program and just call the classes without converting them to "managed C++" or .net.
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-
ANSI controls it. No changes can be made without submission to ANSI, and those chances will be made public. Sure, MS could make another language based on C# but not compatible (so could anyone else) but then it won't be C#.
Javascript/AJAX is an awesome combination. Scripting languages provide very awesome RAD, whilst using a web browser + javascript + xmlhttprequest provides a very smooth professional appearance to your application. .Net and ASP .Net are cool, but my personal experience is that development times tend to be quite long, compared to the same application in Javascript/XMLHttpRequest.
.Net provides web form widgets that work along similar lines to VB forms elements. However, plain old html is much easier to work with, more dynamic and more flexible than VB-type widgets. The .Net widgets do provide the illusion that the application is client-based, but AJAX does this too, and is much easier to use. ASP .Net provides a form editor but it tends to work uneasily with custom-edited HTML.
One issue is variable declaration. Declaring a variable as an XMLElement rather than simply typing var takes a half second or so longer each time. Certain results need to be cast to be useful, for example, SelectSingleNode often needs to be cast into an XMLElement. You can't easily write a function that can handle many datatypes, and the datatypes tend to be purvasive throughout your project, difficult to change, at least without using typediffs, which has its own overhead.
ASP
Javascript/XMLHttpRequest rock totally. They provide the separation of display and code that ASP.Net provides. They're lightweight, readily maintainable, easy to read, and very flexible and powerful.
Obviously, it would be unwise to state that AJAX is the best solution for every scenario, but it's certainly a highly optimal solution for a wealth of functional, technical and user specifications. So much so that Microsoft is currently trying to move ASP.Net to use AJAX, the Atlas project!
Hugh
The only purpose Mono actually serves is to feed the myth that .NET is any more portable than ordinary Win32 programming.
Why does Mono show up so many times on slashdot?
.NET). I'm sure someone has written a decompiler for PDK binaries but the same thing could be done for .NET applications.
Why use Mono/.NET when you have ruby, perl, php, and python? All of which are cross platform? As far as only being able to give binary code to your customers ActiveState's Perl Dev Kit allows you to do just this (even though it's not free, but still less expensive than a license for Visual Studio
But honestly can someone who has done development in Mono and and the other aforementioned languages convince me or anyone else for that matter to learn C#/Visual Basic.NET, and enjoy what it has to offer? What does it offer that the other aforementioned languages do not?
details. I will not use java, for anything, so long as licenses like theirs are forced upon it. With java, you are always a second class citizen.
GENERATION 26: The first time you see this, copy it into your sig on any forum and add 1 to the generation.
This is by far the most hyped feature of C# but it's also present in Java. If you look at the large incompatibilities between Visual Basic and VB.NET you'll see that .NET is not really that language independent and that each language is really more of a "skined" version of C#.
As far as alternative languages go in Java there are many. Among the most popular are: JRuby
# interpreter written in 100% pure Java
# Most builtin Ruby classes provided
# Support for interacting with and defining java classes from within ruby
# Bean Scripting Framework (BSF) support
# Distributed under a tri-license (CPL/GPL/LGPL)
Jython (Python)
Jython is an implementation of the high-level, dynamic, object-oriented language Python written in 100% Pure Java, and seamlessly integrated with the Java platform. It thus allows you to run Python on any Java platform.
Groovy
Groovy is an agile dynamic language for the Java 2 Platform that has many of the features that people like so much in languages like Python, Ruby and Smalltalk, making them available to Java developers using a Java-like syntax.
There's a lot more smaller projects like JavaScript and Rhino, Jelly, BeanShell, Tcl/Java, Sleep, ObjectScript, Pnuts, Judoscript. Some people event think there are too many alternative languages for the Java Virtual Machine.
While Java is often suitable for enterprise apps or web based apps, it just isn't useful for consumer-grade application development. That's why we haven't seen any serious and widely-accepted office suites or web browsers written in Java, for instance, even after ten years.
Cyric Zndovzny at your service.
Why Mono? The answer is extremely clear: outstanding tools.
.Net. That being the case, and seeing that windows developers largely use MS tools, it stands to reason they'd find targeting Linux via Mono the path of least resistance.
Microsoft has some of the best development tools around, and the best of their stuff targets
"One of the great advantages of Mono for current .NET developers is providing an easier migration path to Linux."
.NET]
.NET to Mono]
You have that backwards
[Mono to Windows
Addition of various Windows specific code.
[Windows
Removal of various Windows specific code.
So basically a pure Mono app that becomes popular, will run easier on Windows, but the reverse will not always be true.
Can you provide examples of the patents? Thought not.
If something exists that does not need a creator (god) then why must the cosmos need one?
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.
I've been working with C# since .NET 1.0 Beta 1 and with Java since 1.2. When it first came on the scene, my initial reaction was very favorable to C#. Creating and consuming Web Services was incredibly easy (this was 2001, when SOAP had just arrived), and the builtin event/delegate model of .NET made event handling much more intuitive then Java.
.NET enhances productivity in .NET programming, although it is far inferior to Eclipse by way of refactoring tools, incremental compile, and plugin support. Even so, any productivity benefits reaped from using Visual Studio cannot be experienced in Linux, because Microsoft will not port Visual Studio to it.
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.
.Net was created basically for creating appliacations for Windows Platform only. Yes, Mono is a great idea for non-windows users to use C#. But, .NET in my opionion its best advantage is to create software/ webservices/web applications that are linked to Windows OS.
Corporations, mid-level business, small business and e-commerce that use Windows will benefit more in .NET than Java. But, in the long run .NET will be the dominate player for Windows applications, Windows Vista, Pocket PC, and I.E and Windows Webservices. Java is great for all O/S and .NET is great for Windows O/S, In reality, the Windows O/S is the dominate O/S in business, corporations, small business.
The best bet is to have Java and C# in your resume. Than you have both of both worlds.
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
Great IBM plants on slashdot to go with the IBM plants on osnews. Are you people stupid - IBM are only interested in open source to expand their consultancy business.
It it too bad that Mono's chief IDE, Monodevelop (http://www.monodevelop.com/), has hardly been updated in a long time, let alone support any of the nice code completion and autodocumentation that MS VStudio supports.
Furthermore along these lines, it is just too bad that KDevelop does not support extensive code completion for other self-documenting languages like Python.
Mono will always be on the fringes of acceptance like WINE... Never quite compatible and necessitating that you keep returning to Windows at least semi-frequently for that last bit of missing compatability.
No thanks.
Oh and MonoDevelop vs Visual Studio? Don't make me laugh. Well maybe one could run VS under WINE to get a decent IDE.
Sure they'll do it.
...to pad their resume. Read the classifieds lately? There's a lotta .NET jobs out there. It's nice to learn .NET without having to boot "that other OS", y'know.
Weaselmancer
rediculous.
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.
Linux: Creating .NET C# Applications for Linux
And tune in tomorrow for our feature on how to mount a Vespa motorbike engine in your Ferrari.
forma3
What exactly is the point of Mono? Here I am running a Linux distro. In order to get with the C#/mono/whatsit scene I have to installed about 20 megs of libraries and stuff just to get - what? A photo sorter, note-taker, a file searcher and maybe a couple of other utilities, all of them matched or bested by conventional gtk/QT apps. Is this all Mono has managed to get together? It seems rather a lot of work with not much to show for it. At least with Java I get Azureus which is a solid and extremely useful program not bested by Gtk/Qt one (as yet).
Las qué passoun
tournoun pas maï
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
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:
to say this, but C# isn't the only language which runs on the Common Language Infrastructure, which is to say, .NET on Windows or Mono on Linux.
But still, you say, evil Microsoft owns the standard! Vendor lock-in, oh no!
Actually, it's an open standard maintained by ECMA. That's right, those same evil people who maintain things like the standard for javaScript.
Just because you can't change a language like c# without permission from a standards agency does not free it from the influence of Microsoft. If they changed the language, then they would have to tell you for you to write with it, wouldn't they? The language syntax is not the part of .Net which is proprietary, the framework is. Microsoft is in complete control of all of their classes, namespaces, etc. They can change the setup, or expand it, and any time. More importantly, they have never and will never implement this framework themselves.
In my opinion, trying to implement .Net as a cross platform language is like trying to dig with a spoon. Microsoft has never been known for it's elegant (or even competent) designs. Compare any part of the .Net framework with a better implementation, like Java, and it is clear that once again Microsoft has made something which is needlessly over-complicated, inflexible, and just designed badly. I feel more sorry for the poor fools who are trying to copy Microsofts implementation than those who are dumb enough to choose it for cross platform development over better alternatives. In my opinion, of course, speaking as someone who has spent a few years working with ASP .Net.
Java doesn't run in a sandbox; the virtual machine is a process with access to all the system for the user it's running for.
Only stupid Java applets run in a sandbox... and they're designed to run in web browsers, where a sandbox actually makes sense. But this is a far cry from your C device drivers.
Who cares about portability when mono is being used to make really sweet apps for gnome. I don't care about whether these programs run on Windows, I'm just happy they run on Gnome now. Examples of sweet mono apps for gnome Beagle, F-Spot (My personal favourite), Muine, iFolder. So what does it matter that Java is more portable than C#/Mono if mono means sweet apps for Linux now?
I confess I haven't tried MONO but I hope that the web pages it's used to generate are valid XHTML/CSS. Those that are generated by ASP.NET tend not to be.
-- Holerith
Since MONO will always play catch up with the real Microsoft .NET platform. MONO is only a subset of the Microsoft .NET Framework with fewer functionality and poor performance. I feel uncomfortable when I know there is a better implementation out there.
Another approach would be to use the unmodified Microsoft .NET Framework directly on Linux. I did some prototype, and it should work, but the it will limit to x86 platforms.
Someone who is writing that article is either a genius or an idiot, more likely the later. Have you written any complex win apps ? Maybe not, developing and testing will be a hell... maybe ask my director he will tell the best way to run deploy them. LOL
From the article:
I decided to give Mono a go (no pun meant) one day and tried running a small daytime server I'd writtin in C# with it, and all Mono would do is spit out an error about TcpListener not having any Start() method. Thanks, but I think I'll stick with .Net and plain vanilla C++ for now.
See Microsoft's patent application 20030028685, "Application program interface for network software platform" covering the whole of the .NET API:P TO1&Sect2=HITOFF&d=PG01&p=1&u=/netahtml/PTO/srchnu m.html&r=1&f=G&l=50&s1='20030028685'.PGNR.&OS=DN/2 0030028685&RS=DN/20030028685
http://appft1.uspto.gov/netacgi/nph-Parser?Sect1=
If I have a Windows C++ .NET app running on a W2K3 server, what's it like to port that to, say, Debian 3.1? Leaving the MS-SQLServer parts aside (maybe leaving them on the SQLServer, or a separate DB porting project), how much of the original app will "just work" under Linux/Mono? Or does that depend on which .NET API is being used?
--
make install -not war
In another post, I asked about the practicality of porting a W2K3Server .NET/C++ app to Mono. Have you seen any good examples of enterprise class porting projects like that? Do you know any consultants who specialize in that, preferably for HA/telephony, preferably in USA/NYC? We have to port that app, but we've been thinking of going to Java/Solaris. I'd love to have an "authorative" voice support my recommendation for Mono/C++/Debian, on the basis of completion time, supported by reliability (and reportability).
--
make install -not war
NO C#'s ".HTML" documentation => NO C# programming.
monodoc DOESN'T WORK IN MY linux, IT requires HEAVYFUL GNOME libraries.
Bad thanks novell by his evil plan.
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.
Stick Men
Argument In Brief
;-)
1. Microsoft's C#/CLI licensing people, at high levels, are aware of us.
2. Microsoft can choose to do damaging things in the current C#/CLI licensing ambiguity.
3. Microsoft considers the free software / Linux community to be a major competitive threat
4. Microsoft does not "compete" gently
5. A + B + C + D = ?
The word pile amassed below defends points (1) and, in particular, (2). I take points (3) and (4) as given. I leave point (5) an exercise for the reader.
Stupid Disclaimer
Since I'm not a lawyer, I don't know if these disclaimers are important. But given the nature of the topic, I'll play it safe and write one. I'm not a lawyer, and this ain't legal advice, its just a dump my current thinking on an issue. It does not represent my employer's opinion. It may represent my cat's opinion, but only on the second tuesday of summer months.
Restatement of the Issue
Miguel has repeatedly stated that the patents necessary to implement the standards ECMA-334 (C#) and ECMA-335 (CLI) are available from Microsoft "RAND + Royalty Free". This seems like an effective open patent grant and encouraged me initially that we could do Mono. I really like Mono. Its terrific technically, and I'd love to be able to use it. But two problems upon further consideration the past couple months:
1. I've not seen an official statement by Microsoft that will let me trust the royalty free assertion. I think we are remiss if we do not assume Microsoft is looking for ways to, quite frankly, screw us. So unless there is a statement from Microsoft that they will have to stick to in a court, I feel (at the very least) uncomfortable.
2. "RAND + royalty free", can still seriously screw Free Software. I think this is more important than the first point. Even with RAND + royalty free you still have to execute a license agreement with Microsoft, and license agreements can stipulate things that are RAND from a corporation perspective but still screw over Free Software. Also, there is evidence that key Microsoft people are already aware of (or planned?) incompatibilities between the licensing scheme for C#/CLI and, at least, the GPL. The eye of Sauron is upon us. RAND + royalty free is very different from a patent grant.
In short, we are in an adversarial situation. Microsoft does not want us to succeed. Thus we cannot trust Microsoft, even if we'd like to, and must consider Mono based upon the question "What is the worst thing MS can reasonably do?". We can only trust Mono if we are convinced Microsoft doesn't have weasel room. The current situation appears, to me, to have lots of weasel room. The technical merits of Mono are basically irrelevant if its a trojan horse in the long term.
The Horror Story
So here's the obligatory horror story based upon what I see as our current course. Actually, I don't think this is taken to extremes at all. The GNOME actions look to me like the path we are currently on, and the Microsoft actions are not out of character, and look legally tenable based on what I know today. Microsoft can choose to not exercise these actions, but they will have the possibility (and will be more likely to the more successful the Linux desktop is).
* Act 1 - Novell hackers continue to push Mono. Novell hackers code most new independent programs/functionality in Mono and gradually start writing extensions to software like Evolution in Mono. Evolution's core continues to remain Mono free, but if you want features X, Y, and Z you have to use Mono. A few GNOME hackers write apps in Mono, some as toys, and perhaps a couple more serious. Red Hat hackers complain. Some try to weakly push Java and some stick with working in C & Python. Sun makes noise, and does their own thing, starts some wacky projects, tries to push Java with OpenOffice.org, and
However, these days I favour C# for my own work. It feels like a cleaner, better thought out Java - with much nicer XML and XSLT libraries.
The good thing about Mono is that it gives me the opportunity to port my Windows-focused open-source project (Perspective a GPL-ed WYSWIYG Wiki that can search MS Office documents) to Linux. You may ask why I wanted to focus on Windows? So that plenty of people will use it.
Java is good, but I prefer C# - simple as that.
It already works.
Another C dialect. To go along with C, C++, Objective-C, C-99, ANSI-C, C-for-dummies, C-with-low-carbs-and-just-one-calorie, Lemony-fresh-C, tartar-control-C, low-milage-hybrid-C, son-of-C, As-the-C-turns, Sesame-Street-C, and Freddy-vs-C. And we still have a whole alphabet to go through!
I come from a Windows Delphi background. I have looked at Java and from my brief experiences with it I have found it very "foreign". The learning curve, for me, is be very steep.
.Net on windows and now Mono with Linux I can create applications with a very small learning curve. C# has been influenced by Object Pascal, and a lot of the design decisions or it was based off the Delphi experience.
.Net and vice versa.
Using
As a bonus, the applications I create with MonoDevelop and Mono run on Windows. I can also easily port my Mono work to Windows
For Windows there is a free IDE called SharpDevelop and for Linux there is MonoDevelop and Glade.
I belive that Mono has a bright future on the Linux platform.
Don't make your problems my problems!
For my mind, they are somehow equal - they are both interesting languages, good for developers, allows to produce code fast and without big gliches. There are some problems with distribution of support for them - which I find quite sad. For Java - hell, Java is good, I have to admit now when I have coded in it for some five months - there is distribution problems. I know that Sun maybe have good reasons not to allow distribute it's JRE for thirty party, but I would like to see this thing sorted out. For those saying that Java is not open standard - what make 'open standard'? For me, Java is good in that level that every aspect of language is clearly thought try. I would like to check Mono - and see if it goes the same way. If it is so, good for non-MS business, because they have modern, portable, cross-platform languages to choose from.
:)
One biggest problem with Java that I haven't seen descent IDE with graphical GUI desginer for it. If there is someone, Sun or someone else should market a hell out of it - because it could draw novices to Java. If it is done so, they will discover that Java is one good language - and will stick with it.
I also don't get rants against Mono and C# in Slashdot - yes, I know, legal thingies and Microsoft with all that army of layers makes geeks to shake a bit (to atmit, me too), but actually it is time not to be afraid anymore. Fight and adapt, or stay away. Or code in Python/C++/C
In the end, your choice is all what matters.
user@ubuntubox:~$ stfu This server is going down for shutdown NOW!
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.
For some people its about the licensing, java is owned by sun, so you can make free software, but its still dependent upon non-free libraries, while mono is open source, because MS put out the specs as an ECMA standard, while Sun wants to totally own java. So it depends, if you want to write open source software, you're only choice would be mono, because everything is free/open. Sun doesn't force you to sell your software, you can give it away, but the underlying platform is closed.
Write a simple Java 'hello world' program, and you will find it can run in just a few megabytes (use the -Xmx switch to set the max usage).
Java 5.0 usually came within 5-10% of optimised C++. Within 5-10% is still slower....
Just the concept that ANYONE would think that it is reasonable for a "hello world" program to need a few megabytes is disgusting. What ever happened to efficient code.
I have yet to meet a Java program that I would use if I had another choice. For utilities, the time it takes for the java version to get started is less that the total run time for the equivalent program in a real language. As for full blown applications, even though there have been moderate improvements, there is a long way to go (not that some apps done in other languages arent as bad or worse)
Benchmarks are NOT real world. In the real world, the time it takes for an app to become useable means something, and in a few cases it means a lot more than the raw speed of the app after launching.
It's a sad state of affairs when it's faster to load up a saved virtual machine running a java app, than to load the actual app itself on the host.
Java 5.0 usually came within 5-10% of optimised C++. Within 5-10% is still slower....
That was for just this benchmark. In some others the IBM JVM is faster than C++.
I'm afraid that I can't take a complaint about a 5-10% speed difference seriously, as the difference in performance between different C++ compilers is more than that!
Just the concept that ANYONE would think that it is reasonable for a "hello world" program to need a few megabytes is disgusting. What ever happened to efficient code.
Of course it doesn't need a few megabytes! It is the runtime that needs a few megabytes. Even the simplest C program will dynamically connect to the libc and other stuff. Even the simplest PERL or Python program will require the interpreter.
Funny how people are prepared to neglect this for those languages, but not for Java.
In fact Java can be pretty efficient in memory as it selectively loads only the required classes into memory and not the entire library file. This is why Java can run in low-memory environments such as embedded device controllers and mobile phones.
Benchmarks are NOT real world. In the real world, the time it takes for an app to become useable means something, and in a few cases it means a lot more than the raw speed of the app after launching.
OK, so let's time it. An non-GUI java app can start up in a fraction of a second. A Swing app can start up in a few seconds.
I have just opened the Java 5.0 jsf example Notepad. On my 2GHz machine (512MB memory) it started in 2.5 seconds.
So let's try another app - something more complicated: SwingSet2, the full Swing GUI demo. It starts up in 7 seconds.
Sorry, but I can't see a problem.
It's a sad state of affairs when it's faster to load up a saved virtual machine running a java app, than to load the actual app itself on the host.
As I have just demonstrated, there are no speed issues with loading apps. Why don't you try the tests yourself and report back the results.
By the way, the full SwingSet demo ran in 10MB (-Xmx10m) of memory, and the Notepad example ran in 3MB.
No sign of slowing down the machine or causing swapping there!
Even 2.5 seconds is an unreasonable amount of time for a simple application such as the notepad example, especially on a modern machine like yours. I should note that Microsoft's Wordpad opens in less than a second loading from disk. Subsequent (cached I/O) loads occur effectively instantaneously. Amazingly, Microsoft Word behaves identically. This is a Pentium M 1.4GhZ laptop with 768MB RAM. I believe these applications are quite a bit more powerful than the Notepad example, and they load much faster (well, presumably -- unfortunately, I do not have any Java GUI applications on this specific machine to provide comparison test results.)
.NET do this?), Java has no place on the desktop.
There really is no excuse for Java's kind of bloat in a desktop application; a language with just as much abstraction, expressive power, and (source) portability as Java could be natively compiled without much trouble (see academic languages, such as Lisp, ML, etc. for examples). The result would be applications whose startup times are measured in milliseconds, not seconds. With proper design, Java can achieve decent response times *once the application is loaded*. However, load times are critical when you are running a multitasking GUI.
Unfortunately, nobody seems interested in native code compilers for high level languages these days. VMs and JITs are all the rage. They seem well suited to long-running server processes, but until the load time issues are solved, perhaps with a JIT code cache (doesn't
Even 2.5 seconds is an unreasonable amount of time for a simple application such as the notepad example, especially on a modern machine like yours.
It is not unreasonable, and saying this is just plain silly. Applications like FireFox and Thunderbird are C++ start up in tens of seconds. Where is the huge outcry?
There really is no excuse for Java's kind of bloat in a desktop application;
What bloat? I keep posting the fact that Java can run in small memory environments, but this keeps being ignored.
a language with just as much abstraction, expressive power, and (source) portability as Java could be natively compiled without much trouble (see academic languages, such as Lisp, ML, etc. for examples).
There are extremely good reasons why Java is not natively compiled. It is portable between systems not just at start-up time, but dynamically - for example, updates to code can be distributed between clustered mixed systems while applications are running. Not being compiled also hugely improved security, as classes and what they do can be dynamically validated when the program load them and while a program is running.
However, load times are critical when you are running a multitasking GUI.
Utter nonsense. The idea that someone sitting at a desktop seriously can't wait two seconds for an application to start is such outrageous exaggeration that I am starting to think that this is nothing more than an anti-java rant! I try to argue back calmly, but honestly!
Even though it is-preloaded when Windows starts, MS office can take many seconds to open a document from disk. Do we see a mass migration away from MS office based because it does not meet your 'critical load time' criteria?
I am currently using GNOME. On my 2GHz machine opening the file manager took 7 seconds. Opening the character map took 1.5 seconds. Opening Evolution took 5 seconds.
By your criteria we should abandon C++ and GNOME because they take too long to load!
Why should I have to wait 7 seconds, or 2.5 seconds, or 5 seconds, or whatever? That's absurd! Once I have made a decision to do something on my computer, I want that action to be carried out as quickly as possible. That's why we buy faster and faster computers. If you plan to open applications just once and leave them open all day, maybe slow startup times are fine, but that's not always desireable.
Besides, I have already identified Microsoft applications that have very short load times, so we know it's possible to create efficiently loading applications. Whether or not GNOME's programs load quickly is irrelevant (note, also, that there have been articles recently on improving GNOME's startup time and general performance). If GNOME performance doesn't improve too, we should abandon it for something better. Also, the fact that Java runs on low-memory systems is a red herring; what matters is the behavior of real applications under the real desktop JRE. And in those, we see slow startup time and high memory use.
Look, I have programmed server-side stuff in Java professionally. I am familiar with Java's strengths. However, Java's load-time performance cannot be excused just because you have a hard on for cross-platform binary compatibility. (I happen to think that Java is an awful language, too, but this is orthogonal to discussions of its runtime environment).
Besides, I have already identified Microsoft applications that have very short load times, so we know it's possible to create efficiently loading applications.
That simply isn't true, as Microsoft applications are basically just skins over libraries that are pre-loaded when the OS starts. In effect, the applications are already running - you are only opening windows on them.
However, Java's load-time performance cannot be excused just because you have a hard on for cross-platform binary compatibility.
There is no load-time performance problem. A start up time of a few seconds simply does not matter, as this is the case for almost any other application as well - as I have clearly demonstrated!
And in those, we see slow startup time and high memory use.
No, this is false. We start up times of a few seconds and apps that can run in what is a minor fraction of the memory of a modern machine.
I have NetBeans running in 64MB. That means I could run 4-5 copies on a modern machine. That is NOT high memory use by any standards.
I would be interested if you could give a single example of where having a start-up time of 2-3 seconds for an GUI application is likely to be of any significant disadvantage to anyone.
(I happen to think that Java is an awful language, too, but this is orthogonal to discussions of its runtime environment)
I think it would explain why you keep repeating what I believe to be completely mistaken and spurious arguments in the face of conflicting evidence.
I have stated that I do not want to wait even a few seconds for an application to load. It's obnoxious to me and, I would venture, most other users. I don't understand why you are supporting the idea that latency is good. You may only open NetBeans once or twice a day, so it doesn't matter for you. But imagine if all your applications took a couple seconds to open. Even notepads or terminals or calculators or system monitors. It would change the way you used your computer. You would demand applications with more integrated features so that you would not have to suffer the short delays dozens of times throughout your day. Every time I have to way 3 seconds to open a calculator, I lose my train of thought. Better include a calculator in my IDE. No thanks, I like the idea of small, fast, quick loading applications.
Small, orthogonal tools. That's the UNIX philosophy, right?
Also, please note that the bulk of Microsoft Word's libraries are NOT preloaded with the operating system. Your statement's only grain of truth is that IE's rendering libraries are indeed preloaded (they are used within the Explorer shell). It is also, of course, true that the native Windows support libraries like GDI, etc. are "preloaded" i.e. already in memory, just like they are for almost any graphical system. However, this only saves on I/O time. The JVM startup seems to be slow for reasons other than I/O.
My distaste for Java the language has nothing to do with my distaste for the Java VM. They are completely separate concerns. One does not have to write JVM-targeted applications in Java. One does not have to compile Java to the JVM. So we really have four options: Java -> JVM, Non-Java -> JVM, Java -> native, Non-Java -> native. Because of the JVM's failings, I dislike anything -> JVM. Because of Java's failings, I dislike Java -> anything. Does this make sense?
But imagine if all your applications took a couple seconds to open. Even notepads or terminals or calculators or system monitors. It would change the way you used your computer.
That is exactly the situation on all my workstations right now, and I have never seen a system that is faster. It changes nothing, of course.
I have stated that I do not want to wait even a few seconds for an application to load. It's obnoxious to me and, I would venture, most other users. I don't understand why you are supporting the idea that latency is good.
I am not. I am just saying that below a certain point it is completely irrelevant and has no impact on the user. I have been in IT for 25 years and have never seen anyone ever complain or have any issues with a 2 or 3 second load time. When you say that this is obnoxious to most users, I have good evidence from decades of IT support that you are just plain wrong.
If this really is annoying to you, you must find the majority of applications on any workstation intolerable! I use both GNOME and KDE routinely and I can't think of a single application that starts up in less that 2 seconds.
Small, orthogonal tools. That's the UNIX philosophy, right?
Sure. I agree. But that has never ever applied to GUI systems; they have always had some lag.
Also, please note that the bulk of Microsoft Word's libraries are NOT preloaded with the operating system.
Fair enough, but you mentioned Notepad. I would be very interested to see a 2 second startup for any Office application anywhere - Microsoft or otherwise!
Your statement's only grain of truth is that IE's rendering libraries are indeed preloaded (they are used within the Explorer shell).
Wrong. The text editing controls are preloaded (hence Notepad's speed), the menu and GUI controls are loaded, the file browsing tools are preloaded. (This is the advantage of a common GUI library in Windows).
Because of Java's failings, I dislike Java -> anything. Does this make sense?
No. Because as far as I can tell, what you are labelling as failings simply would not even be noticed by the majority of users, so I don't believe it is fair or sensible to call them failings.
Yet again, I would be interested in proof that a start-up time of a GUI app of a few seconds has any ergonomic impact on anyone anywhere, other than being annoying to you.
You are imposing a requirement on GUI software that almost no major GUI application meets. If such applications, written in supposedly high performance languages like Delphi, C and C++ can't do this, why should Java be any better?
I'd rather they stayed away.
To be honest, as far as platform independence goes, I think that Java is really the way to go. I've heard whining over GUI's and native library integration. I think that development is moving to a point where legacy integration means something completely different. Legacy applications should be exposable on a service bus, accessible from Java Land, .NET, Perl or whereever. If you need to integrate with C libraries on your platform, you have JNI - but that's ugly. It's ugly in C# and it's ugly in Java. We should change the way we view code. Mono on Linux is a good idea, if you want to write C#, but if you're after code which is truly universal from platform to platform, you're really looking at Java - or Perl6. If you're looking at writing the best solution, in the best langauge, on the best platform for that specific task, you're should be exposing your applications over a service bus. I don't care where it runs or what it does, as long as it fulfills the contract of its service.
Maybe you should find an example where JAVA has replaced OpenGL for graphics output, and then you would have a comparable argument, until then. Bzzz....
here is an example:
Swerve client.
It is a 3D engine for mobile devices. It implements a Java standard for mobile 3D (M3G). There are two versions: OpenGL accelerated, and a Java-software-only version.