Ars Technica Tours Mono
Kevin Francis writes "Over the coming weeks, Ars Technica will be taking a look at Mono, including a basic introduction to Mono, MonoDevelop, and C#, and then branching out to GTK#, database access, ASP.NET, advanced C# topics, and conclude with a discussion of the future of Mono, and the C# standard. All the examples will work on Windows and Linux, with OSX support coming shortly. Part 1 of the series is online now."
As you can clearly see, Mono brings almost limitless possibilities in breaking down the barrier between desktops: a commercial software provider would target Mono and it would "just work" on all platforms that Mono supported. How is this different from Java? In my opinion Java makes things harder than it needs to be. For starters, enforced exception handling can't auto-box/unbox primitive types and doesn't support arbitrary length parameter lists String.Format() style.
The framework of Mono provides the ability to make a very tedious task in C/C++ almost trivial in C#. As the above example, RegEx, shows, it helps the programmer concentrate on the program itself, rather than the logic supporting the code.
Yes, it is very exciting to have developers be able to easily write code that will work both on Linux, Windows, and OS X (obviously with the correct libraries) but will the coders utilize Mono when doing their work? Will they be concerned enough that Linux and OS X users are worthwhile supporting to make sure it is cross-platform?
Time for coders to take a closer look!
:)
What are the methods currently used by GIMP, OpenOffice, Mozilla among others that already support multiple OS's?
Maybe Ill start learning coding with this and kill more birds with the same shot
What mono needs is a good RAD tool for developing GTK# based apps. I know you can reference GTK# libraries in VS.NET but there's no support for cross platform forms design.
The syntax for building Winforms is completely different to GTK# (as one might expect) but the documentation I've found doesn't really map types and methods for developers familiar with existing RAD tools such as MonoDevelop and the excellent SharpDevelop.
Tool designer support for GTK# is crucial.
"It's not your information. It's information about you" - John Ford, Vice President, Equifax
As you can clearly see, Mono brings almost limitless possibilities in breaking down the barrier between desktops: a commercial software provider would target Mono and it would "just work" on all platforms that Mono supported. How is this different from Java? In my opinion Java makes things harder than it needs to be. For starters, enforced exception handling can't auto-box/unbox primitive types and doesn't support arbitrary length parameter lists String.Format() style.
I find this kind of claptrap irritating. Java is one of the easiest platforms to jump into. If you found it harder than it needed to be, you needed more coffee.
*** *** You're just jealous 'cause the voices talk to me... ***
Uninformed slashdotters with tin foil hats should click this link. .NET, Rotor and Mono are implementations.)
ECMA-335 Common Language Infrastructure (of which
Ars Technica will be taking a look at Mono...
:P
...because most geeks no nothing about it
Novell is banking on making Windows->Linux migrations simple as a selling point for their tools. Providing a viable supported .net platform is a key. Do I think that this will become the de facto Linux dev kit? No. Too many users love their kit of choice (perl,pythong,java,etc) and in any case the open source community abhors being told how to develop. Nonetheless having one more option is a benefit. The only downside is potential bloat of distro CDs, but hey we crossed this line a long time ago and its what you have to do if you want to support N dev toolkits.
What was the reasoning behind making the first letter of the method names upper case?
...and .exe on my executables?
When is Miguel going to port the windows registry?
I'm sorry but the thought of microsoft's mangled conventions polluting the linux/unix world is making me ill. :-(
I mean, take Python! (my favorite high level cross-platform programming languate)
- Python has been around longer than Java (it's from 1991)
- Python has been ported to a lot more platforms than Java (and certainly
.NET!)
- Python has various powerful language features that Java, C# can only dream of (metaclasses, generators, list comprehensions)
- Pure python programs will run everywhere a suitable Python is available
What's so special about Java orIt will be a sad say indeed when developers are tied to a specific language for a specific platform just because that is what someone has mandated from on high.
I look forward to the legal and security issues with .NET, Mono and .GNU. We live in interesting times.
Stick Men
The Mono project was conceived in the Summer of 2001 as an Open Source alternative to Microsoft's .NET development platform. Since then, it has come all the way to a 1.0 release among a flurry of controversy from mostly inside the Open Source community itself. Although we will not outline the reasons here, most of the criticism stems from the fact that .NET is Microsoft, and "we" don't like them.
.Net are not satisfactorily answered. What about MS total control of the standard? What good will the standard be if the company that owns 95% of the desktop starts shipping a .Net that deviates from the standard? What about the parts of .Net that are not covered by the the standard, and in fact have intellectual property encomberances?
.Net is essentially the Java runtime environment, with MS additions. Why is .Net any better than Java for application development. Is its speed any better? Is Mono's speed any better than Java's?
What a stupid simplification!! There are legitimate concerns over how MS exerts it monopoly power, and many of the resultant concerns with Mono and its support of MS'
Mono's main pull for developers is that it is cross-platform and makes writing applications very fast because of its extensive framework. Mono also has the concept of garbage collection. Gone are the days of using malloc() and free() and recording where you allocated memory and making sure you free() it. Java has GC as well, but Java never really caught on as an application language.
Another biased statement; has C# caught on as an application language? Why not point out that C# is pretty close to a clone of the Java language, and that
I don't mind a review of Mono. I was interested in reading it, and would like to know more about it. But, when the author so casually dismisses the concerns with MS and Mono, or dismisses the legitimacy of Java, I question his objectivity.
Comment removed based on user account deletion
I've already been doing this sort of cross-platform programming for years with wxWidgets/wxPython. I'm not waiting on Mac support - I'm already using it (and improving it!). What amazes me is that the authors act like Mono is breaking new ground by having a portable programming language that can do GUIs but is easier than Java. Hello? Apparently no one ever told them about Python/wxPython?
.NET experience comes from using Windows. And as the Ars Technica article shows, it's going to be a while before anyone can really write sophisticated cross-platform GUI apps using this toolkit. (And will it be GTK# on Mac? Does that mean X11 is needed there? Ugh.)
;-)
And not only can I use it today, I get better results than I would with GTK# or Java in terms of cross-platform interfaces. If you've ever seen the GIMP on Windows, you'd know that GTK apps don't quite look like professional Windows apps. Emulated interfaces will always look out of place, particularly as themes get more common.
I'd encourage anyone who is interested in cross-platform programming to download Python and wxPython, then run the wxPython demo on Windows, Linux or Mac OS X, and then explain to me exactly how it is that Mono is breaking new ground. (Note also that the wxPython 2.5.2 release on Mac will sport a number of nice improvements and is due out soon.)
The only new and unique thing that I see about Mono is that it uses and is compatible with APIs designed by Microsoft. As a compatibility layer, that has some value, but they will always be two steps behind Microsoft and MS will always ensure that the best
Anyways, time to go back to making my native, cross-platform apps.
First off, realize that I'm not anti-Linux. I've used Linux both professionally and at home. UNIX, too. And I also know C++ and C#, among other languages.
.net, C#, and okay Java too, is that they're essentially playing catch-up to what's already out there. People who've only used C++, and the people who can't shake the "everything has to be optimized down to the last microsecond" mindset, tend to really like C# and .net. After all, now they finally have real modules, a clean string syntax, hidden memory management, and so on. Just that the article makes a big deal about the power of this line:
.net and C# appear to be coming from people who spent the nineties thinking that C++ was the pinnacle of software development. If you look at Perl and Python, though, they still have lots of wins, like no noticible compile times, no need to jam everything into an object framework, less bulky syntax, a lot less fussing about types, and generally more malleable ways of programming. From that point of view, C# doesn't offer much, unless again you stay up late worrying about shaving cycles out of your button handler callbacks.
.net and C# are what they came up with, a solution that's still far behind what was already available. A solution that feels like something that would have been stunning in 1990 or 1992, but now is mired in an earlier generation of software development. The weird part is that dragging this over to Linux, making it an across the board cross-platform solution, is looked at as a good thing. The effort would be better spent elsewhere, like coming up with a lighter weight GUI toolkit for Python that breaks from Tk and behemoths like WxWindows.
What has always struck me about
bool matches = Regex.IsMatch( input, regex );
is telling. After all, you could do this--with a cleaner syntax, mind you--in Perl fifteen years ago. Don't like Perl? Well, Python then. Or even old clunky TCL. And so to me, the furor over
Perl and Python have always been better supported under Linux than Windows, and I'd even call them the Linux way of approaching software development. Leverage the best tools available so you can achieve more in less time. Microsoft has been playing catch-up here, and
The article mentioned that the C# makes things simple that would be complicated in C/C++ (the example was RegEX). This is kind of a screwy way of looking at things, and not much of a selling point for C# in my book. Something like RegEX is provided to C# through a library (or framework if you prefer), and isn't part of the actual language. If you want such a simple interface to a RegEX, it would be easy to get a similar thing for C or C++.
Overall I thought the article was pretty devoid of any meaningful reason for why we should use mono. It doesn't sound better than Java (not worse either), and it isn't a replacement for C/C++.
While an interesting (if very simple) article, it never adresses the elephant in the room - why not Java?
.NET lies in the ONE line of code:
With Java you can do everything in the example, with ease. From the article:
The great power of Mono and
bool matches = Regex.IsMatch( input, regex );
Wow! Well, in Java it looks like this:
boolean b = Pattern.matches(regex, input);
Is the great power of Mono then that they have screwed up the name of the matching method to FunnySound?
Or what about GTK support in Java - you could use Java-Gnome. Or you could use AWT. Or you could use Swing. Or you could use SWT if you prefer native performance.
And using all this, you don't have to wait for OS X support - it's here now! Chances are you don't have to wait for support on whatever OS you are using in fact, as the JVM is now pretty much everywhere.
So why ignore the elephant? Why does this article not go into the reasons why you would want to consider a platform years behind an exisitng one with similar capabilities, better cross-platform support, and way more tools. Instead it just pretends that corss-platform wasn't even possible before MONO.
"There is more worth loving than we have strength to love." - Brian Jay Stanley
So people keep saying, but I don't really see much evidence. You must have heard of gcj and GNU Classpath? What about IBM Eclipse and SWT?
These all address various "issues" that people have with plain Sun Java and tools.
I think Miguel's decision to go for a .NET clone had a lot to do with his personal admiration of Microsoft. Couple that with the fact that Microsoft is pushing .NET heavily as the new official way to develop for Windows, you get the Linux zealots and the Windows people together, hence the apparent explosion in popularity. I say apparent because the hype is bigger than the statistics.
Stick Men
I think the success of Java vs .NET will depend on how it is distributed and the "user experience" of installing and using .NET vs Java applications. Sun doesn't have the same level of control over the desktop experience that Microsoft has for desktop applications so that may be a deciding factor for most users.
On the server, Java is already very popular and installation/launching headaches are tolerated more because admins are willing to put in a little more effort than most users.
Other issues such as relative performance and the "look and feel" will also play a big role with users.
In the general theoretical sense, there isn't much difference between Java and .NET. The success of each will depend on the implementation.
Your password has expired, please login to change it.
I suspect that what he'll end up with is a bytecode interpreter and a C# compiler that conform more or less to the standard, and not much more. The rest will be pretty Mono specific. What might be possible, though, is for the Windows people to use the Mono class library...
How does this get people off of Windows and on to Linux/GNOME?
Stick Men
Mono isn't all about cross-platform development, it's about giving you a more modern general purpose programming language than C/C++ and providing lots of useful bindings for it. Some of those bindings happen to be cross-platform, others don't. You really just get a choice.
As languages, C# and Python are simply different. Both have their uses, and neither is better. C#, for example, lets you do pointer manipulation and its implementations are efficient enough even for writing low-level loops. Also, people find C#'s static type checking useful for long-lived, multi-programmer projects. If all your needs are met by Python, consider yourself lucky; other people's needs are not that simple.
In terms of libraries, you can have Python/Gtk+, Python/wxWindows, C#/Gtk+, and C#/wxWindows, and all four exist (C#/wxWindows isn't all that far along yet, but people are working on it). So, your choice of toolkit and your choice of language are orthogonal.
Python and Java are both languages and run-time thingies.
.NET.
Not necessarily. People have targetted other languages for the Java runtime, including Python (Jython) and Scheme (Kawa). Basically, as long as you can spit out Java bytecode it doesn't matter language what you compiled to get it. Same basic idea with
You can find a product here to convey IL (.Net bytecode) into bytecode for the JVM.
You can also find a Powerpoint on this here. Note that they even talk about supporting ASP calls via a servlet library they have built!
"There is more worth loving than we have strength to love." - Brian Jay Stanley
No, Python is a SCRIPTING languate [sic].
No, it's a programming language. It's just productive enough for scripting. "Scripting language" doesn't really mean anything.
I would also add that the Java SDK supplies developers with FAR more common libraries than Python does which tends to cut development time.
Python libraries generally have better (simpler) design and are easier to use. And there are lots of them, both in the standard library and available separately.
Semantically, Java is a pure-OO language. Python is not.
It's exactly the other way around. Python is pure OO language, java is not. Does 'int' ring a bell for you? Python provides functions, but they are objects, just like ints, strings and, say, sockets.
Not that being pure OO language is the end-all and be-all. It just makes the language semantically cleaner while trading off some performance.
Opening a file in Python is a one liner. In Java you need 2 or more objects and 3+ lines of code. But you have much greater control over how the descripter is read.
You can have all the control you need, all the way down to file descriptor level. People just don't seem to need the control. Nothing prevents you from writing wrapper objects with different buffering policies.
Maybe because nobody has a mainstream cross platform app that is written in a scripting language?
Bittorrent? And quit with the "scripting language" term, it's ignorant or intellectually dishonest, take your pick.
Save your wrists today - switch to Dvorak
"The only thing that Mono/.NET has going for it, as far as I can see, is that it is designed to be targetted from multiple languages."
So is parrot. But what is the point anyway? Are you going to have a project where each member of the team is going to program in a different language? Are you going to have an open source project which accepts patches in 10 different languages?
I never did understand why this was a desirable thing. It sounds like a nightmare to me.
evil is as evil does
Different projects may like to use different languages but to target the same VM.
Stick Men
So instead of targetting the Windows platform, or the Linux platform, or the Java platform, I can now target the Mono platform, which has *GASP* a regular expression library.
Excuse me if I'm not a little underwhelmed by this. We're supposed to get excited about Mono because of the libraries? As if a good C or C++ coder couldn't write a regular expression parser in less than a week?
But no, I'm converting to Mono because (pick one or more):
I really don't see the big deal here, folks. The fact that the binaries are portable without recompile isn't going to make up for the fact that C++ is a mature, very powerful, fast, portable language.
Okay, if you've got counterexamples of the points above, I'd like to hear them. But save it if you're going to flame me for broiling your sacred cow. I'd rather see a few good reasons to switch from C++ than a flame war, and right now, Mono isn't making a compelling case. To me, it seems like its Yet Another Algebraic Language With Libraries.
The society for a thought-free internet welcomes you.
In short, Python can do pretty much anything Java or Mono is likely able to do. In addition, it's faster and easier to code in than most "programming" languages, largely due to dynamic variable typing.
For developer friendliness Mono and Java are a step up from C/C++, but languages like Python (and probably Ruby, though I haven't used it) have potential to be even more.
The ultimate plays for Madden 2006
Java compiles to bytecode, Python compiles to bytecode. If being a "scripting language" means that you're not *forced* to compile to bytecode to run a program, then aren't scripting languages simply a superior form of "programming languages"?
Verbosity in Java doesn't translate to flexibility. It may occasionally translate to more control, but that's rare. Most of the time, it's just due to the inflexibility of the language. Conversely, just because Python provides an easy way of dealing with files doesn't mean that it lacks flexibility. What kind of low-level things can you do with Java that you can't do with fileno and fcntl in python?
Commercial applications use Python and Java. Both are extensively used on servers (like Google uses Python for example). Java may have more desktop GUI use, but Python is used as a scripting engine in many applications, including games.
As for Java being pure-OO and Python not being pure OO? Mwhahahahahaha.
Although the syntax may be somewhat ugly, even integers in Python are objects. Try that in Java. Java has Integer objects and 'int' types. That's not even slightly OO, let alone "pure" OO.
Having said all that, I don't even like Python. I happen to be a big fan of Ruby, and am not at all used to defending Python. I think Python's syntax is ugly. I think significant whitespace for indentation of loops and conditionals is a huge mistake, making the code really inflexible when it comes to copying and pasting. I think it's requirement to pass around self when defining methods within a class is simply stupid. And the few remnants of non-ooness bug me, like len(str) instead of str.len() On the other hand, there's even more I dislike about Java. Java is way too verbose, and incredibly inflexible in a lot of areas. By making things like 'int' types rather than classes, it defeats a lot of the purposes of object orientation. At the same time, it makes things more difficult for programmers by lacking a simple printf/sprintf function. Of languages with a C-like syntax, I guess Java is the best option in most cases, but it's lack of true OOness, and its static typing really annoy me. Misinformed people who think that there is something inherently superior about languages which you have to compile to use just make it worse.
1.) .Net was and imho still is - to a large extent - a joke. What MS did was rename the .obj files from all their developement stuff to .net and start a big marketing boohey. Those laughing the most about .Net weren't the OSS people, it was the veteran MS developers, noticing all the vaporware about it. MS added a nice and neat VM, which in parts is so close to the Windows lowlevel stuff that it's hardly a VM and they 'invented' C#, pronounced C-Hash or Cash (=$$$) for short, a nice PL that rids some downsides of Java and C in one stroke. Well big fat hairy deal. The OSS community invents neat and inovative PLs every other week. Nothing new here, move on.
.Net disapears to were it came from and Mono becomes the one-size-fits-all technology for future OSS products. Who knows? I wouldn't be suprised. Just as I wouldn't be suprised if the Mono project at one time decides for themselves that they can do things better than MS (which they evidently can) and screw .Net compatability alltogether. After all, .Net was and still is mostly just a marketing gag anyway.
2) A group of OSS people saw some nice things to the whole 'plattform' and started programming it themselves. More power to them. I would've considered their time more worthwhile spend on a proper Font system for X or a layer that leverages Motif, QT and GTK into one big engine as to rid the Toolkit bloat of OSS, but it was their decision.
3) Mono is 'finished' into a solid 1.0. Great. People say it sports some cool stuff. That's nice. Thanks for the great work. I'm going to look at it sometime. NOT because it is a redoo of MS stuff. I for one don't give a doo-doo about Mickeysofts software products anymore since... well a very long time.
But I do like new tech-frontier OSS software so I'll probably support it. Looking at the way things are going just now it could very well be that
We suffer more in our imagination than in reality. - Seneca
Gtk# is a ridiculous idea and only exists because some elite coder quickly hacked it up before Mono could get serious enough to implement Windows.Forms.
Windows.Forms really needs to be *the* standard implementation. I can't imagine many people taking Gtk# applications that seriously on Windows...
And as for the runtime itself... Why write a VM for a garbage collected language and not do proper garbage collection??!
It appears that Novell may have helped Mono pretty up the signs on the outside, but I am much more interested in something that is engineered well from the inside....
White is the hyperlink color. Clicking the big white link named after the article takes me to the same page.
The phrase we've got other stuff lined up inside would imply the link goes to the other stuff. The url for it seems like it'd show an index of all their linux content. But the word 'inside' actually shows the article.
.NET is not about C# vs. Java. You can code in C++ and compile to .NET's IL (byte code) in many different languages. You can also write .NET applications in these languages as well:
APL, AsmL, BASIC, Cw (C-omega), COBOL, Eiffel, F#, Forth, Fortran, Java (yes seriously), ML, Mercury, Mondrian, Nemerle, P#, Oberon, Pascal, Perl, Python, RPG, Ruby, Scheme, S#, VB.NET, etc... So please, quit the C# vs. Java or Perl is so much better arguments. Because, pick your language, and there is probably a compiler out there that can spit out IL.
Are you going to have a project where each member of the team is going to program in a different language? Are you going to have an open source project which accepts patches in 10 different languages?
.net library and not having to worry about what language it was written in. The alternatives are to either write the library for every language (SVG rendering for VB, C, C++, Python, Javascript, etc), or to write your libraries in one language and try to maintain wrappers for each other language (GTK# ??).
.net approach is a good one. This is why (IMO) JNI sucks. I shouldn't have to write C code to access extra keys on my keyboard. It just adds more complication to my Java program to have to maintain C code along with it. In .net, all languages have access to roughly the same features (although there are some language specific feature differences they aren't API based). If C# has access to the keyboard, then everything else in .net will too. So .net isn't encouraging you to use multiple languages... it's encouraging you to use the language of your choice.
Maybe you will, but not likely. What's more likely is VB programmers using a
Personally I think the
"Maybe you will, but not likely. What's more likely is VB programmers using a .net library and not having to worry about what language it was written in."
You mean like using activeX controls in VB while not caring about what language they were written in. Or maybe you mean using DLLs from VB while not caring about which language they were written in.
evil is as evil does
It did actually, despite what Microsoft, the Slashbots and the Linux (and Windows) press would have you believe. There are millions of Java developers across the world, there are billions of devices from phones to high-end servers running Java. The number is growing despite what the Redmond Marketting Machine tells you. Even IBM likes Java.
Stick Men
You don't know the first thing about it, do you? Go read.
NET langages compile to plaform-independant bytecode. Shure it's ripping off Java, but it shows good taste in plagarism.
My Karma: ran over your Dogma
StrawberryFrog
Going from C++ (or C) to Java offered some real differences. It offered standard GC, great standard libraries that came with the platform (instead of paying the mandatory RogueWave tax for decent C++ collections) and real gains in productivity over C++ or C.
.Net. It's the largest attempt at cross-migration in the history of languages.
.Net.
Now with C#, the situation is much more murky. C3 over C++? Sure. But C++ over Jvaa, there are just not enough distinguishing differences to make it worth shifting over the whole platform. Furthermote a lot of effort has been put forth just to move sideways - porting things that already exist in Java to
I would have WELCOMED a Microsoft language with real improvemnts over the status quo. Perhaps a functional language, or something with deep Aspect roots. But since C# is just a shallow clone of Java, instead ew all have to suffer through years of language wars instead of advancing the state of computer languges themselves.
My whole thing is I HATE duplciation of effort, and I see C# as the largest single waste of programming manpower in the history of computing. That is why I loathe C# and
I am not so much dead set against Microsoft, I use Microsoft products on my Mac and they are just fine. It's when Microsoft takes up the flag for utter domination at the expense of the industry that I get unhappy and point out what they are doing.
"There is more worth loving than we have strength to love." - Brian Jay Stanley
You missed the point entirely.
.NET. You could have already called COM objects written in one language from another language.
.NET. It's just a ripoff of java. The only reason MS wrote it is because they wanted to spite SUN by building their own version of java and JVM.
There was never any need for
There is still no need for
What a collasal waste of money and time.
evil is as evil does