Stories
Slash Boxes
Comments

News for nerds, stuff that matters

Slashdot Log In

Log In

Create Account  |  Retrieve Password

Mono's WinForms 2.0 Implementation Completed

Posted by kdawson on Tue May 13, 2008 10:21 PM
from the do-not-confuse-with-wind-farms dept.
adrian.henke writes "After four years of development, 115K lines of source code, and 6,434 commits, Jonathan Pobst announces that Mono's WinForms 2.0 implementation is now complete. This announcement has been long awaited by any .NET WinForms developer who has ever tried to get an applications to work on Linux using Mono."
+ -
story

Related Stories

This discussion has been archived. No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More
Loading... please wait.
  • by Pikoro (844299) <init.init@sh> on Tuesday May 13 2008, @10:35PM (#23398946) Homepage Journal
    Currently working on a C# implementation of a web based in house CRM system.

    Going to be nice to finally be able to support our Linux desktops as well.

    We'll see how porting goes and if it's really worth the trouble.
    • So the requirements of your business problem required cross-platform support, yet you chose a tool which is decidedly not cross-platform? Why?
      • by Anonymous Coward on Tuesday May 13 2008, @11:27PM (#23399166)
        Where did he say that cross-platform support was required? There's a big difference between something that's required and something that's nice.
        • So you don't think it's a bit odd for any organisation that has Linux desktops as well as Windows desktops to deliberately choose a potentially-Windows-only system for developing corporate tools? Particularly one that's practically indistinguishable from Java, which runs perfectly on both Windows and Linux by design.
          • by ushering05401 (1086795) on Wednesday May 14 2008, @04:05AM (#23400324)
            "Particularly one that's practically indistinguishable from Java, which runs perfectly on both Windows and Linux by design."

            Except that Java doesn't run perfectly on Windows and Linux. Many people see C# as a language that set out to be a better Java than Java, and many people feel that on the Windows platform it succeeds. Combine that with the existing Windows install base and you have a pretty compelling reason to develop in C# over Java.

            Ten years down the line, however, I could see C# facing extinction if it does not become truly cross platform.

          • Particularly one that's practically indistinguishable from Java

            Knock knock.

            Who's there?

            ...long pause...

            Java.

            The only reason, ONLY reason, to use Java is because you are psychotic and have a deep, long standing hate for your users and wish to inflict some of the most insidious pain and torment upon them.

            • The only reason, ONLY reason, to use Java is because you are psychotic and have a deep, long standing hate for your users and wish to inflict some of the most insidious pain and torment upon them.

              Well, I do hate my users and wish to inflict pain on them, but I don't want to use Java.

              Is there a way I can inflict pain and torment in a platform agnostic way? ;-)

              Cheers
  • by beoba (867477) on Tuesday May 13 2008, @10:53PM (#23399028) Homepage
    ..and still nothing on whether WinForms is legally safe to use.
    • SCO still has a few law schools worth of lawyers on retainer, and a new group of big bucks sugar daddies to fund a few more rounds of lawsuits.

      These extremists are not going to surrender. They see open source/free software as a form of communism. These are not the sort of people who call off an already declared war. They are going to keep on filing new lawsuits until they manage to land their lawsuit in the courtroom of a judge who is just as warped and extreme as they are.
      • Worse, call the layers.

        The police are to busy raiding trailer parks, writing traffic tickets, busting drug users, and harassing kids.

        • by Vectronic (1221470) on Wednesday May 14 2008, @12:59AM (#23399558)
          "Worse, call the layers"

          Which layer? does Mono have a self-destruct layer?

          using System.Microsoft.Infringement;

          public static void Main(string[] args)
          {
                If (Patents.Count > 0)
                {
                      ForEach(Match match in Patents
                      {
                            Console.WriteLine(match.patentname + ": " + match.patentcode);
                      }
                }
          }

          Error Buffer Overflow

          Yeah, yeah... you meant "lawyers" I know... and I dont code in C# so it might not do anything anyways...but... "call the layers" made me laugh...
  • ...by any .NET WinForms developer who has ever tried to get an applications to work on Linux using Mono."

    All five of them.
    • Some people realllyyyyy like .NET. I use .NET all the time, but I can't say I like it half as much as Python.
      • Re: (Score:2, Informative)

        by Anonymous Coward
        Any language that requires me to pay attention to white-space as much as Python should be dragged into the streets and beaten.

        Sorry.

    • Five? I think you should stop rounding up to a whole hand!
    • Come on now, this is a pretty significant step. Lots of Slashdotters must be stuck developing Windows .NET applications and would love to find a way to deploy them on Linux. If you haven't tried it, Mono is pretty cool: copy your .NET executable to Linux and run

      % export MONO_IOMAP=all
      % mono my_program.exe

      You might be surprised how well it works.
  • Very nice (Score:5, Funny)

    by nuzak (959558) on Tuesday May 13 2008, @11:25PM (#23399158) Journal
    > I use .NET all the time, but I can't say I like it half as much as Python.

    I know what you mean -- ELF just doesn't hold a candle to Perl.

    • Re: (Score:2, Informative)

      I can kind of see the point you were trying to make, but .NET doesn't just refer to the bytecode interpreter - it also refers to the runtime libraries etc, which is I think the point that the GP was trying to make.

      The fact that python can run under .NET confuses the issue a bit too... but I think most of us can get our heads around it :)
  • SWF GUI builder? (Score:3, Interesting)

    by IBBoard (1128019) on Wednesday May 14 2008, @02:26AM (#23399928) Homepage
    Does this mean we can finally get a SWF GUI builder in MonoDevelop on Linux?

    I've got a couple of apps I wrote while I was using Windows and now I use Fedora Linux. The back-end library code and my newer apps that use GTK# are fine to edit in MonoDevelop, but I've got a VirtualBox install with WinXP and Visual Studio in it for now so that I can update the System.Windows.Forms layouts when I need to.

    Hopefully the "API complete" also means they'll fix some of the odd rendering I've seen at times :)
  • by master_p (608214) on Wednesday May 14 2008, @02:41AM (#23399990)

    From the blog:

    You can use handles in Winforms, they just do not map to an actual HWND on non-Win32 systems, but you can definitely use them, and you can even override WndProc methods on derived classes from Control and process a pile of WM_ messages that Mono's Winforms actually builds on.

    Why WndProc, HWND and WM_ messages are still there? I understand Microsoft built a software monopoly by mixing Window System management and a GUI toolkit together (and transferring it to .NET ensures that monopoly), but isn't .NET supposed to be one of the most advanced toolkits out there? Having to rely on WndProc, HWND and WM_ messages seems a very bad design for me (I've been developing MFC apps for a decade now and I know of the numerous problems that might come up), and unfortunately Mono WinForms copied that in order to be compatible with .NET.

    Initially I thought 'wow, a contender to Qt/Java for building cross-platform apps', but after reading the blog and being an supporter of anything but Win32 (the ugliest API ever written), I will think twice before using Mono or .NET for cross platform development.

    • Re: (Score:2, Insightful)

      What platforms? .NET is very clunky, but it still seems very popular.
      • Re: (Score:2, Interesting)

        by Anonymous Coward
        I'd be interested in knowing what .NET is clunky in comparison to. If you mention Apple's Objective C approach, you probably don't deserve to have an opinion here.

        WinForms as a library is a little old fashioned, but in combination with Visual Studio it's very slick and one of the most productive GUI environments around for building desktop applications. If you want to build fruity super-slick GUIs, you have WPF to do that (but the Visual Studio designer isn't as nice).

        There isn't a better platform on Window
    • by DigitlDud (443365) on Tuesday May 13 2008, @11:16PM (#23399112)
      I'm also very interested to hear what these platforms are.
    • by nguy (1207026) on Tuesday May 13 2008, @11:40PM (#23399220)
      It is interesting that now that Mono is getting to a more complete (and possibly usable state), most developers have moved beyond the .NET hype and onto more elegant development platforms...

      Please stop conflating Mono and .NET. Mono supports .NET, but that's not its primary API.

      In fact, the primary API is the same API lots of open source software uses: Gnome, Gtk+, and many standard open source libraries. All Gnome apps using Mono use the Gtk+ APIs.

      I wish there were better alternatives, but C# + Gtk# + MonoDevelop is probably the most elegant development platform right now. Nothing else really comes close. Python is a more elegant language but doesn't have a comparable IDE. Objective-C and Cocoa are messily intertwined with C and C APIs. And Java is a bloated pig.

      • Re: (Score:3, Interesting)

        Maybe the mono devs can get an implementation of IronPython going? Then you can have Python + a damn good IDE (i was surprised how well Mono Develop is myself)
        • by setagllib (753300) on Wednesday May 14 2008, @12:46AM (#23399508)
          IronPython already works fine on Mono, but it doesn't have IDE support. PyDev in Eclipse is pretty nice for pure Python and Jython.

          Personally I'd rather work directly in Python/Ruby on GTK/Qt than go through an extra layer that is .NET. Maybe Anjuta could stop sucking and support Python, or Eclipse could have Glade integration.

          And while Mono's not horrible, but it's not nearly as fast as the Sun JVM, so if I want fast bytecode I'd rather use Java than C#.
            • by setagllib (753300) on Wednesday May 14 2008, @07:26AM (#23401206)
              It's a pretty thin layer compared to an entire extra base library + bytecode runtime + OS abstraction.

              PyGTK layers:

              Your code (python)
              PyGTK code (python)
              Python runtime (C)
              PyGTK->GTK binding (C)
              GTK+libc code (C)
              kernel (C)

              IronPython + Gtk# layers:

              Your code (python)
              IronPython code (python)
              IronPython runtime (CLI)
              Gtk# code (CLI)
              Mono base (CLI)
              Mono runtime (C)
              Gtk# -> GTK binding (C)
              GTK+libc code (C)
              kernel (C)

              That's a fun one to deploy, let me tell you.
      • "And Java is a bloated pig."

        At the risk of feeding the trolls, in what way is C# + Gtk# + MonoDevelop less of a bloated pig than Java? Java is actually a very fast, extremely productive platform to develop on with a top-shelf toolchain (in fact several).
        • I don't know about the definition of bloated, bit it is a pig on resources and slow as hell on my older computers. Perhaps that is the inference he was attempting to make.

          Now, X seems to slow some things down a little but I haven't really seen the comparative mono applications act in the same ways as java seems to. However, it should also be noted that I can't really compare apples to apples here because I don't have applications doing the same things in similar ways written in the different languages to re
            • Java is fast? Go try to run Azureus and weep.

              The performance of a single benchmark is hardly indicative of a whole platform... you might as well say - "Linux is fast? Go try run Azureus and weep".
              • Re: (Score:3, Interesting)

                Okay.

                "Java might be a great development platform, but the performance of java apps on the desktop is so pitiful they're painful to use."

                More?

                "Sever-side apps written in Java have great perfs, however, which is easily explained since they're meant to be run on a score of UltraSPARC hyperthreaded multicore CPUs that command a ton of RAM."

                Better that way, yes, you're right.
            • The only thing slow about Java are the GUI libraries and the initial VM startup, for non-interactive stuff it is actually very fast. Anyone wanting to develop GUI applications using Java should use some kind of native GUI library through JNI.
            • Java is fast? Go try to run Azureus and weep.

              Oh, you do? And you think it is fast? Try utorrent on Windows or Transmission on OSX or KTorrent on Linux some time.

              People can write slow programs in any language. The question is, can moderately competent programmers write fast, efficient, maintainable programs in them? Pointing to one example is pointless. Back on topic, a quick check on Alioth [debian.org] will show you that overall, Java is faster than C#/Mono but uses more memory (although on some benchmarks the opposite is the case). It's also worth pointing out that although Java is not faster than C++ on any benchmark, it's substantially slower on only three. In general the performance of a program has much more to do with good design and good algorithms than it has to do with choice of language.

      • Re: (Score:3, Interesting)

        by Anonymous Coward
        wish there were better alternatives, but C# + Gtk# + MonoDevelop is probably the most elegant development platform right now.

        You'll find that that's because C# was designed with an IDE in mind. Everything is statically typed (for intellisense) and the object oriented nature allows for easy code completion. Even look at the new LINQ (Allows you to query arrays/lists/etc. in memory)

        var result = from dataType in myCollection
        • I can write C# code (or code in most languages), copy and paste it, or make significant edits, and then simply tell the IDE to reformat it.
          Which IDE do you use ?
          I have nothing like you describe when working with C++ under Visual Studio.
          • Re: (Score:2, Informative)

            by Anonymous Coward
            Ctrl-A, Ctrl-K, Ctrl-F
    • Say what you will about Mono, I think Microsoft's implementation of .NET is actually a pretty strong contender. If you need to solve a problem in Windows really fast, it can be pretty insanely convenient. I think Powershell in Windows Server basically uses a .NET machine for its shell interface. If you ever need Windows machines and Unix machines to talk to eachother, a Mono compatible implementation could be even more convenient than having Python talk to .NET, which isn't too hard to begin with.
    • by batkiwi (137781) on Wednesday May 14 2008, @12:27AM (#23399422)
      Info for you: .NET 3.0 is 4 additional dlls, otherwise it IS .NET 2.0. Same runtime/etc. It adds:

      -WCF: GREAT new tech. You write a module, and then expose it remotely via config. So if you want to change from Remoting to Compliant Web Services you simply change a config setting. Or you can expose simple services via REST. It abstracts "transport" from "functionality".
      -Cardspace: dud. Single sign on/identity mgmt which is being replaced by openID it seems. Cool idea though.
      -WPF: Cool new xml based description language to fully abstract process from gui much in the way ASP.NET does. It also lets UI designers "skin" apps seperately from the app code itself. VERY nice tech, especially the bindings.
      -WF: Nice tech, not quite mature but neat to use. It allows for program logic to be described in an xml format (XAML) and shown in a gui designer. I really like workflow tech NOT because it lets business users program (it DOESN'T) but because it gives you an artifact that users can understand AND CONFIRM. .NET 3.5 is enhancements and bugfixes of 3.0 PLUS LINQ. LINQ is either the best thing ever, or the worst thing ever, depending on who you ask. I think "both." LINQ allows you to apply "sql-esque" syntax to any IEnumerable provider. So if you have an in memory collection of animals you can do:

      var monkeys = from animal in myAnimalsCollection
                                    where animal.Type == monkey
                                    select new {animal.ID, animal.Name, animal.BirthDay};

      foreach(var monkey in monkeys) .... do stuff
      • by setagllib (753300) on Wednesday May 14 2008, @12:58AM (#23399550)
        LINQ is nice, except it's decades too late. Of the languages in common use today, Python and Ruby have much better alternatives to linq built in (and have had them for many years), and even new languages like Scala support similar functionality.

        Your example in Python with a list comprehension, broken down into multiple lines for clarity:

        monkeys = [
            (animal.id, animal.name, animal.birthDay)
            for animal in myAnimalsCollection
            if animal.type is monkey
        ]

        And a comprehension of multiple lists is similar:

        pairs = [
            (a, b)
            for a in range(10)
            for b in range(10)
            if b == a * 2
        ]

        You have been able to do that for many years in Python, and yet Microsoft fanatics act like it's something new and innovative.
        • Does the python version read from a database or an XML document?

          The LINQ syntax does that. It's not just a fancy way of iterating over an in-memory collection.

          • by makapuf (412290) on Wednesday May 14 2008, @04:02AM (#23400308)
            The python version reads from an iterable, so it can be a request from a DB or an XML file sending its result one by one. In the case of the Db, the filtering will however be done by python and not in the DB.

            However, there are alternative ORM python syntax to DB mappings, such as django syntax

            AnimalCollection.filter(type='monkey')[:10].order_by('age')
            (talking about simple orms, not full sqlalchemy table declaraions)

            Being able to customize filtering of container classes for iterators definition would be cool anyway.

        • LINQ is different - it's STATICALLY checked while Ruby's or Python's versions are dynamic.

          LINQ also introduces type inference, anonymous types and extension methods to C#. While none of this is new, I have not yet seen another _popular_ language supporting it.
          • Re: (Score:3, Insightful)

            When you already have a dynamic language, type inference, anonymous types and extension methods are implicit. I'm not arguing every language should be dynamic, but the additions to C# are just solving problems specific to static languages. That's fine - static languages are still much faster than dynamic ones. Just saying, as far as languages go, C# is the one playing catchup, and with about a 20 year gap for many features.
          • You can use the same LINQ syntax to deal with data from all kind of data sources, that's what it is all about.

            All the usernames on a Unix system:

            print [line.split(':')[0] for line in file('/etc/passwd')]

            Dates from an SQL table:

            sth.execute('select invdte from invoice where invid=%(invid)s', {'invid': 1000090340})
            print [row[0] for row in sth]

            Search Google for "list comprehensions" and print the text of every "<a href" tag on the page:

            import urllib2
            import BeautifulSoup

            agent = 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)'
            url = 'http://www.google.com/search?q=list+comprehensions'
            google = urllib2.Request(url, headers={'User-Agent': agent})
            soup = BeautifulSoup.BeautifulSoup(urllib2.urlopen(google).read())
            print [link.contents for link in soup.findAll('a')]

            Basically, anything Python can loop across works inside a list comprehension. It's a basic construct of the language.