Slashdot Mirror


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

14 of 465 comments (clear)

  1. RAD tools by BillsPetMonkey · · Score: 5, Insightful

    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
  2. Re:Will the coders use it though? by Random+Web+Developer · · Score: 5, Informative

    I am writing an app for mono that is supposed to run on linux mac and windows in the end. From what I see it's nowhere near just starting a .NET app on linux using mono.

    The app clearly has to be written with crossplatform execution in mind. (I know this goes for c and java too, but some people seem to think they will run office on mono in the future.).
    You need to steer clear of anything that depends on a platform.
    - if you define a path, make sure you use path.combine or path.directoryseparatorchar instead of a / of \.
    - don't depend on environment variables
    - pay attention to casing, don't say "file.ext" when it's "File.ext"

    I know it should be ovbious to any cross platform dev out there, but I just thought I'd bust some bubbles with some of the less informed.

    --
    Artists against online scams http://www.aa419.org/
  3. Re:Will the coders use it though? by Kithraya · · Score: 5, Insightful

    I certainly am. I am required to use C# in a Windows environment, and since I've discovered mono for my at-home-just-for-fun stuff, I'm able to leverage the experience and education from my day job. I find myself doing far more of this for-fun work in the linux environment now. For me, this has been the greatest boon of having mono, and hopefully other developers forced to work in Windows will also leverage mono to bring even more great software to other platforms.

  4. Re:Libraries by ajp · · Score: 5, Informative

    Uninformed slashdotters with tin foil hats should click this link.
    ECMA-335 Common Language Infrastructure (of which .NET, Rotor and Mono are implementations.)

  5. Why should "cross platform" always mean Java/.NET? by PommeFritz · · Score: 5, Interesting
    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?
  6. Just a bit biased.... by Anonymous Coward · · Score: 5, Insightful

    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.

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

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

    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.

  7. Re:Bull by cbiffle · · Score: 5, Informative

    And, of course, there's the fact that his latter two complaints are kind of sort of fixed in 1.5.

    So... :-)

    Personally, I think the C# folks make too much of a big deal about the mandatory exception handling in Java. Heard a fellow from Microsoft say "Frequently, Java folks just put an empty catch() block to catch the exception they know won't happen, so why make it mandatory?"

    I've got bad news for you. I find situations like that about once a week when auditing my programmers' code, and it's almost always a situation that -can- happen, but the programmer couldn't see it.

    Don't trust the programmer. I know, I am one. :-)

  8. And how is this better than wxWidgets/wxPython? by kollivier · · Score: 5, Insightful

    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?

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

    Anyways, time to go back to making my native, cross-platform apps. ;-)

  9. Re:Will the coders use it though? by caspper69 · · Score: 5, Insightful

    I'll bite, even though you're an AC. You must understand that everything evolves in the computer world. We do not simply make new things up. The tools available at our disposal are the result of an evolutionary process that has gone on for 50+ years.

    That being said, .NET is most certainly not any of those things you presented. .NET is the new version of Win32, which we all know, as a subsystem to a pretty amazing kernel (nt/2k/xp), really drags the entire system down. You should be excited that Linux is getting in on the ground floor of a fresh, robust, and USEFUL framework so early in the game. Heck, how many Windows apps are written in .NET right now? How many will be in 5-10 years? Exactly. How many years did it take to wean people from Win16? I can tell you that I still have a couple of apps that haven't migrated, and that it took a LOT of other apps more than 3-4 years after Windows 95 was released to make the switch.

    The lesson? MS is going to win, because they have the advantage, at least on the desktop. Paradigm shifts (unix->dos->windows->linux) don't happen very often, and you need a lot of geurilla tactics to even have a fighting chance. The best thing I can see is to support .NET on both sides of the coin (hey, you'll soon even be able to throw OSX in there too), and in three or four years, when someone says: "I can't switch from Windows, because app X won't work, or is too slow through Wine," or blah, blah, blah, you'll be able to retort that all of their favorite apps will run natively on Linux or OSX, thus freeing them from any sort of platform dependence.

    As an added bonus, .NET is a great tool. C# really does allow some very neat and timesaving features for development. That's the number one reason more people don't develop for Linux/Unix. Some people are too young to remember WHY we left Unix on the big-iron all those years ago, but if we insist on repeating those mistakes, let's at least provide an evironment that can muster some developer support. Not everyone is writing a Word/Excel/Photoshop. Some people like to site down and bang out a few lines of code, and be confident that it'll work as intended, where intended. VB has gone a long way toward keeping the Mom & Pop development shops on Windows. If we can begin to get these folks to consider making cross-platform apps, then half the battle will be over. Now we just need to convince the users of those apps that there are advantages to running them on Linux. Better hurry before Longhorn comes out, too... That may set OSS back 10 years or more, but at least MS has given us an extra three years to innovate in the meantime!

  10. Re:Will the coders use it though? by moonbender · · Score: 5, Informative
    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.

    Right. Of course that's all about to change - from the Java 1.5 ("5") new features site:
    Autoboxing/Unboxing
    This facility eliminates the drudgery of manual conversion between primitive types (such as int) and wrapper types (such as Integer). Refer to JSR 201.
    Varargs
    This facility eliminates the need for manually boxing up argument lists into an array when invoking methods that accept variable-length argument lists. Refer to JSR 201.
    You still need to deal with exceptions - that's a bad thing?
    --
    Switch back to Slashdot's D1 system.
  11. Re:Will the coders use it though? by dekeji · · Score: 5, Insightful

    Will they be concerned enough that Linux and OS X users are worthwhile supporting to make sure it is cross-platform?

    Unlike Java, Mono doesn't try to shove cross-platform development down people's throats. If developers want to use Mono to develop Windows-specific applications, that's cool. If developers want to use Mono to develope Linux-specific applications, that's cool, too. If developers want to develop cross-platform applications with Mono, that's cool, too, and Mono supports that, too.

    I suspect the biggest use of Mono will be the development of Linux desktop apps using Gnome/Gtk+. Many of those applications will be difficult to port over to Windows because they will rely on Linux-specific features. But that's no different from Gtk+ applications written in C or C++; Mono simply makes it easier to develop such applications by giving developers a choice of using C#.

    The second biggest use of Mono will likely be the deployment of applications and libraries developed for Windows on Linux machines. Those applications were not originally written with cross-platform portability in mind, but by supporting Microsoft's APIs well enough, those applications will either work out of the box, or port over easily.

    So, Mono gives the programmer the choice between writing cross-platform apps or taking advantage of platform-specific features. That's where the choice belongs, IMO.

  12. Evaluation applies to any VM language by David+Ishee · · Score: 5, Insightful
    There is nothing special in general about .NET that doesn't apply equally to Java. They are both VM languages that have good library support.
    The great power of Mono and .NET lies in the ONE line of code:

    bool matches = Regex.IsMatch( input, regex );

    .NET and Mono are actually a collection of libraries that form a framework which allows you, the programmer, to write the logic of your application. I can call one line of code to do input validation on a string which saves you possibly hours of time.

    The description of the power .NET here isn't .NET specific. Actually, any language with good library support will meet this criteria of "power".
    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.
    Give me a break! Autoboxing and the String.Format() comment are very trivial things to complain about. Enforced exception handling is a little more complex and the debate will probably never end on which is better.

    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.
  13. Re:Will the coders use it though? by dekeji · · Score: 5, Informative
    Strangely that assumption is quite widespread. I think I've tracked down the source [mono-project.com] though.

    Yes, you have correctly tracked down the source of that misconception. It's an easy misconception to have, given what the Mono project writes about itself.

    Now, dig down a little deeper and go to the downloads. What do you see? A "Mono Stack" on the left, consisting of OSS libraries and APIs, and a .NET stack on the right, consisting of .NET libraries and APIs. You can pick one or the other, or both. Neat, huh? Now, also note the relative sizes of the Mono and .NET stacks.

    Now, turn to the FAQ:

    Question 132: Is Mono only an implementation of the .NET Framework?

    Mono implements both the .NET Framework, as well as plenty of class libraries that are either UNIX specific, Gnome specific, or that are not part of the .NET Framework but people find useful.


    Question 50: Can mono run the WebMatrix?

    No. That requires System.Windows.Forms support which is not currently implemented.


    Question 40: Do you fear that Microsoft will change the spec and render Mono useless?

    No. Microsoft proved with the CLI and the C# language that it was possible to create a powerful foundation for many languages to inter-operate. We will always have that.

    Even if changes happened in the platform which were undocumented, the existing platform would a value on its own.


    What does that tell you?

    • A lot of Mono software (most, in fact) already is completely incompatible with Microsoft .NET, since Mono doesn't even implement important parts of .NET, but does provide extensive non-.NET libraries that are being used by Mono applications. So, .NET compatibilty just doesn't matter to most Mono developers.
    • People know that Microsoft could change .NET, and it generally doesn't matter to them.


    Why is the Mono project seemingly saying one thing and delivering another? Well, in part, it's because the term ".NET" is really ambiguous. In part, it's because where their money comes from and where their commercial interests are (they aren't doing this out of religion, they are in it for commercial purposes).

    So, your confusion is understandable. I wish the Mono project were clearer on their front page, too, but I suspect they have reasons for what they are doing. Either way, you should really dig a little deeper.
  14. Wrong, wrong, wrong by ultrabot · · Score: 5, Interesting

    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