Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×
Programming IT Technology

Ars Technica Tours Mono 465

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."
This discussion has been archived. No new comments can be posted.

Ars Technica Tours Mono

Comments Filter:
  • by AliasTheRoot ( 171859 ) on Thursday July 15, 2004 @02:01PM (#9709386)
    Clearly one of the biggest concerns is the degree of compatability between .NET and Mono & the lack of many of the API's that exist on Windows - which face it will be the primary development environment.

    I'm sure someone will point out that MS will extend .NET beyond the standards thus marginalising Mono, but i'm sceptical of whether this will happen - it's in their interests to keep the core platform and language specs consistent, the API's are another matter...
  • Libraries (Score:1, Interesting)

    by vontrotsky ( 667853 ) on Thursday July 15, 2004 @02:04PM (#9709413)
    Even though C# is a standardized language the .Net framework is not. I'm not sure we can be confident that Microsoft can't legally stop open source implementations of the the framework. Does anyone know what protection mono (and .gnu) have against legal threats?

    Jeff
  • by Graelin ( 309958 ) on Thursday July 15, 2004 @02:14PM (#9709550)
    What are the methods currently used by GIMP, OpenOffice, Mozilla among others that already support multiple OS's?

    Those projects are all written in C++. They all use libraries that are cross-platform but they're littered with #ifdef WINDOWS ... do_win32_specifics(); #endif.

    The theory is that with .NET you won't need ANY platform specfic code. If that turns out true, I will be completely amazed.

    Maybe Ill start learning coding with this and kill more birds with the same shot :)

    That's a really good idea. Mono and DotGNU make .NET really cross platform (which is neat) but a lot of companies will switch to .NET platforms. I know some pretty big ones that already have and are loving it.

    What I *really* want to see is mod_mono with class wrappers for the identical IIS hooks. Imagine being able to develop web apps on your WinXP laptop on the road and push up to your Linux server farm without any worries. I'm crushing already.
  • by iseff ( 797269 ) on Thursday July 15, 2004 @02:25PM (#9709660) Homepage
    I'm currently building a nice web server, much like Tomcat for .NET in C# (yes, I realize a lot of it could be done currently using ASP.NET and/or Apache with mod_mono or XSP -- but this server has some features I really like; plus it's a good exercise). I hope to build some web app's for the server after it's complete (I'd say its just about ready to enter alpha stage), but so far developing between VS.NET during the day in my office and MonoDevelop at home at night on FC2 is a really fun process. They both have their quirks, their plusses, and their minuses -- but really if you're just careful how you program there's no worrying about whether or not it will work cross-platform -- it will. Of course, this isn't including Winforms or GTK#.
  • by PommeFritz ( 70221 ) on Thursday July 15, 2004 @02:29PM (#9709697) Homepage
    What I don't understand is that when people are talking about "cross platform" programming, it almost always is about Java or .NET/Mono. What is it that those 2 seem to be mutually connected to "cross platform"?

    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 or .NET that makes them the talk of the day, while other much more interesting languages seem to be ignored in this matter?
  • by Junks Jerzey ( 54586 ) on Thursday July 15, 2004 @02:51PM (#9709931)
    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.

    What has always struck me about .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:

    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 .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.

    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 .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.
  • Re:RAD tools (Score:3, Interesting)

    by dominator ( 61418 ) on Thursday July 15, 2004 @02:56PM (#9709977) Homepage
    Yeah, just to re-iterate, Glade works great on Windows.

    http://gladewin32.sourceforge.net/ [sourceforge.net]

    GTK# ships with Glade# [hispalinux.es], so yes, there is a libglade for Mono.
  • by SuperKendall ( 25149 ) * on Thursday July 15, 2004 @03:00PM (#9710027)
    While an interesting (if very simple) article, it never adresses the elephant in the room - why not Java?

    With Java you can do everything in the example, with ease. From the article:


    The great power of Mono and .NET lies in the ONE line of code:
    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 [sourceforge.net]. 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.
  • by dekeji ( 784080 ) on Thursday July 15, 2004 @03:11PM (#9710131)
    Clearly one of the biggest concerns is the degree of compatability between .NET and Mono & the lack of many of the API's that exist on Windows - which face it will be the primary development environment.

    You are operating under the assumption that the main use of Mono is going to be to allow people to write .NET software. If it were, that would be a serious concern.

    But most Mono software will likely be developed using OSS libraries for OSS platforms. It makes no difference to that kind of development what Microsoft does with .NET. Mono is simply a good implementation of a good language that allows them to reuse vast amounts of OSS software with less hassle than if they were writing C/C++ code.

    The fact that Mono can also be used to easily port .NET software to Linux is an added bonus.

    I'm sure someone will point out that MS will extend .NET beyond the standards thus marginalising Mono

    There is no "standard" for .NET; the only standard there is is ECMA C#. Mono's effort to re-implement the .NET APIs is analogous to the Wine/Willows efforts to re-implement the Win32 APIs: it's tracking a moving target. Everybody working on, and using, Mono knows that, and it just is not a problem for the uses people put Mono to.
  • by Cereal Box ( 4286 ) on Thursday July 15, 2004 @03:35PM (#9710373)
    Perhaps .NET allows for directly getting environment variables, but Java doesn't, and this is one case where I think it's a good idea. Instead of obtaining environment variables through a method call, you have to pass them as arguments to the VM, and then you can use System.getProperty() to obtain them. So for instance on Windows I could define the property program.home to %HOMEDIR% and $HOME on Unix and you'd never know the difference in the code because on both Windows and Unix you'd be called System.getProperty ("program.home"). Maybe it's just my Java background talking, and that's why I don't see a problem with environment variable handling.
  • Yep, here it is... (Score:3, Interesting)

    by SuperKendall ( 25149 ) * on Thursday July 15, 2004 @04:32PM (#9710909)
    You can find a product here [halcyonsoft.com] to convey IL (.Net bytecode) into bytecode for the JVM.

    You can also find a Powerpoint on this here [cit.co.cr]. Note that they even talk about supporting ASP calls via a servlet library they have built!
  • Wrong, wrong, wrong (Score:5, Interesting)

    by ultrabot ( 200914 ) on Thursday July 15, 2004 @04:39PM (#9710976)
    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.
  • But, why? (Score:5, Interesting)

    by gillbates ( 106458 ) on Thursday July 15, 2004 @05:17PM (#9711408) Homepage Journal

    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):

    1. I hate Microsoft. But I like their software. So, instead, I'll use a cheap knockoff of .NET, and won't pay Microsoft any money. And I'll never admit that they had a good idea with .NET, even though I'm using what amounts to a copy of it. Instead, I'll call them all sorts of names and say that .NET sucks, just because it's made by Microsoft.
    2. I love to reinvent the wheel with every new project. I'm going to throw out all of those C and C++ function libraries and classes I've built so I can now reimplement them in Mono.
    3. I hate fast code! How am I supposed to write slow code in C++ when my users have a 3 GHz Pentium 4s? Oh, I know, I'll use a virtual machine!
    4. I love to learn. In fact, now that I've mastered C and C++, I'm going to throw away all of my effort invested in these languages and learn a new one.
    5. I hate to write clean code. All my programs have memory leaks because I could never be bothered to actually follow good design principles, nor keep track of the memory I'm using. So instead, I'll just switch langauges, where I can continue to write sloppy code.
    6. I love to file bug reports. There's nothing like using a new technology before it is fully debugged and tested. In addition, I'll complain that the garbage collector slows my program down too much. Granted, if I understood how it worked, I could write code that would minimize the work it had to do. But that would require effort, and I'd rather complain about than clean up my coding style.

    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.

    • I can't write kernel drivers in Mono. Only apps.
    • I couldn't write an OS in Mono, but I could in C++.
    • I can target Macs, Linux, and Windows now with C++, but I'll have to wait if I want to use Mono.
    • Mono is not sufficiently different in terms of ease of programming to justify the switch from C++. In fact, as the example code demonstrated, Mono apps often involve more lines of code simply because every single detail of the GUI can, and must be, set by the programmer. In Windows, 9 times out of 10 I can simply use the defaults and everything comes out fine.

    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.

  • by Qbertino ( 265505 ) <moiraNO@SPAMmodparlor.com> on Thursday July 15, 2004 @06:59PM (#9712184)
    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.

    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 .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.
  • by zyridium ( 676524 ) on Thursday July 15, 2004 @07:28PM (#9712379)
    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....
  • by I_redwolf ( 51890 ) on Thursday July 15, 2004 @07:48PM (#9712480) Homepage Journal
    Simply because most applications will be using the native Microsoft forms and extensions. Mono has yet to support any of them natively without problems. It's forseeable into the future that they will never be able to fully adopt or engineer such compatibility without help from Microsoft themelves and/or an open spec. That is why.
  • by kaffiene ( 38781 ) on Thursday July 15, 2004 @08:27PM (#9712714)
    The ironic thing about this is that Java actually offers a more fully featured API for writing code on Windows than .NET does.

    Let's see... off the top of my head:
    * although windows allows icons in menus, .NET doesn't, Java does
    * .NET doesn't have a general purpose table component (DataGrid is designed to attach to Databases and just does not do some of the things you want tables to do)
    * .NET doesn't support double buffering (you have to implement it yourself)
    * .NET doesn't support transparency (no transparent backgrounds for labels, for example)
    * .NET doesn't have an Action component (ala Java and Delphi)

    The reality is that Java has a very well developed, secure and fully featured API. .NET's API is extremely thin and of patchy quality.
  • by Anonymous Coward on Thursday July 15, 2004 @08:41PM (#9712784)
    Well, then you get into murky legal territory.

    When Microsoft standardized the .NET CLR, the include a large number of libraries. Go ahead and write all the code for any platform you want that use System.Threading, System.Security, System.Regex or basically all of the framework that lets you develop the core of your application (about 95% of .NET as a whole), and never worry that Microsoft can take legal action against you for it - they've released their right to prosecute those patents.

    The problem is that System.Forms was not in the standard - In theory, Microsoft could issue a cease and desist order to the Mono group ordering them to remove support for the System.Forms library from Mono.

    Now, Microsoft has never done anything akin to that before (for instance, they've never attempted to prosecute their patents against the developers of Wine) but that doesn't mean if backed into a corner, they wouldn't. If Mono is to become an integral part of the Linux Desktop, we must use only libraries that the community has an unimpeachable legal right to use.

    Besides, seeing as there aren't that many System.Forms apps in the Win32 world yet, if we get GTK# right, get good support for it in MonoDevelop and get strong Win32 support for it, we can talk even developers targeting Windows to use it. I think Microsoft's worry about that is one of the reasons they're moving to release free versions of Visual Studio .NET.
  • Mono? WTF? (Score:1, Interesting)

    by Anonymous Coward on Thursday July 15, 2004 @10:02PM (#9713180)
    Guys, I hate to say this, but Mono offers absolutely nothing new. It's essentially a clone of .NET, which is essentially a clone of Java, which is fuller featured, more mature, and more system independant than Mono/.NET will be in a long time. I've heard C# is nicer than Java. Ok, that's great.

    But why is no one talking about Python and Perl?

    Python and Perl are capable of doing everything that these languages can do, and they essentially do it better. And with the introduction of Perl 6 and the Parrot VM, Perl 6 and Python will both run on the same framework, leveraging the two most successful free languages created.

    See, Parrot, Python, and Perl are 100% free software innovation. They aren't a reimplementation of some crap Microsoft put on the table. Why are we always trying to play catch-up? Why do we ignore the good stuff we have going for us?

    Why use .NET? Why even bother? According to the Mono FAQ, stuff written in Mono won't even necessarily run on .NET. They claim it's not even intended to. Fine, but look how many people are already confused about this. Developers are going to think (mistakenly) that they can write Java-style write once run anywhere code with Mono and they will be sorely, sorely mistaken. Then they (and their managers) will get upset, and Mono will be assumed to be broken, because it doesn't do what the PHBs thought it was supposed to do.

    And this will be bad PR for Open Source. First, it looks like we're ripping off MS's ideas, because, well, we are. Then, it looks like we can't even get it to work. Then, people rightfully wonder why when we have two systems that are essentially very similar, ie, Java and C#, we decide to back MS technology instead of more mature, more widely available Sun technology.

    I say fuck 'em both. If you want a statically typed language, write one to run on Parrot (it's already been done, from what I understand). Why go with some proprietary BS?

    Oh, did I mention Parrot is FAST?
  • by Anonymous Coward on Friday July 16, 2004 @12:42AM (#9713828)
    The point of Mono seems to be to have a cross platform framework.

    No. The point of Mono is to have a modern programming platform for Linux that is (1) open source, (2) not controlled by a big company, and (3) doesn't suck technically.

    Yet Another Framework with a small user base would stand by itself.

    Yeah, I know. It's also naive to think that Yet Another Operating system with a small user base would stand on its own, like Linux. And it's naive to think that Yet Another Gui Library with a small user base would stand on its own, like Qt or Gtk+. In fact, we should just all roll over dead an pay a few thousand bucks to Microsoft and Sun each.

    Alternately, MS could just claim the whole thing under its patents and then just sit on it to keep lock -in.

    No, they couldn't because Microsoft doesn't have "patents". Microsoft has a patent on .NET, a patent that clearly does not affect most Mono users because they aren't using .NET.

    And I'll take a hypothetical threat of a possible Microsoft lawsuit over a platform that comes shipped out of the box with lock-in, like Sun Java. With Sun Java, we don't have to guess whether Sun claims ownership, they already own it.
  • by WWWWolf ( 2428 ) <wwwwolf@iki.fi> on Friday July 16, 2004 @11:52AM (#9717032) Homepage
    Python is pure OO language, java is not.

    Well, Python isn't exactly pure OO either, far less so than Java. There's no true data hiding, for example. There's some inconsistencies that look bad (why str(foo) and not foo.str()?). Not to even mention that deep down many types aren't really objects at all, even though they may be used as though they were.

    Anyway, Java was designed as a OO language with as little non-OO stuff as possible. Python is a programming language that happens to feature object orientation, and does frequently use it as one possibility of building things - and one of Python's strengths is that you don't need to use OO in your own design, but you can if your design needs it.

    Not that being pure OO language is the end-all and be-all.

    Correct. Purely functional programming is the one true Holy Grail. =)

  • by SuperKendall ( 25149 ) * on Friday July 16, 2004 @12:20PM (#9717454)
    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.

    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 .Net. It's the largest attempt at cross-migration in the history of languages.

    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 .Net.

    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.

I've noticed several design suggestions in your code.

Working...