Slashdot Mirror


Mono's Cocoa# Underway, GTK# Takes on Windows.Forms

Gentu writes "OSNews posted some exclusive screenshots of a new project in the Mono community: Cocoa#. Apparently there are a couple of Apple engineers helping out the project that allows developers to create graphical Cocoa applications under Mac OS X using the C#, Python or Basic language. Mono seems to be doing well in the Windows land too, allowing developers to use GTK# instead of Windows.Forms to create multi-platform apps."

27 of 378 comments (clear)

  1. Mono vs. Java (again) by fupeg · · Score: 5, Interesting

    There are some decent arguments for using Mono over Java on Linux. Those arguments don't hold up as well on OSX, though. Java support on the Mac is in many ways superior to Java on any other platform, especially for Swing apps (the counterpart to most Cocoa# apps.) Still it could be attractice to have a framework that made it as easy as Java is for developing cross-platform (Windows/Linux/OSX) apps that would have significant performance advantages over Java on 2 out of 3 of those platforms.

  2. Apple could really benefit... by callipygian-showsyst · · Score: 4, Interesting

    ..from embracing (and extending!) C# and .NET. Programmers generally like C# and .NET for application development, and Objective-C has some serious flaws.

  3. Re:Windows.Forms in Mono by Anonymous Coward · · Score: 3, Interesting

    while you are at it, feel free to improve Windows.Forms. Microsoft's version of it has some odd limitations, and considering they are planning to replace Windows.Forms with a complete re-write, they are not spending any time fixing these things.

    For example, it is supposedly impossible to have a context menu on a treeview that responds properly to both the mouse right-click and the context menu keyboard key (without resorting to Win32). If anyone has got this to work, please tell how..

  4. Re:Windows.Forms in Mono by prockcore · · Score: 4, Interesting

    A new from scratch implementation has started with four of the top Mono developers that are now
    locked up in Provo Utah working around the clock
    to delivery the new implementation of Windows.Forms


    What are they doing then? I thought using wine was going to solve the p/invoke issue. Are you just going to ignore the p/invoke and just implement the exposed API?

  5. Gtk# Rocks by pherthyl · · Score: 5, Interesting

    Even back in the 0.8 days, I had very few problems making a medium sized app (~4000 lines), developed entirely under linux with Mono. Everything worked on the first try when I ran it on windows with .NET.

    Now that's true cross platform ability. Even with Java I've never had it work that flawlessly. Thanks Miguel and Mike Kerster and the rest of the Mono team. You guys rock.

  6. This is great by ErichTheWebGuy · · Score: 1, Interesting

    Kudos to the Mono developers, what they have accomplished is no easy feat!

    I just wonder when Microsoft will try to say, "See? We are the innovators. Look at mono! They followed our .NET framework in a desperate attempt to copy it!"

    While it may be true that Mono was released after .NET, there is ample evidence that open source software is far more innovative than anything Microsoft has put out (with the possible exception of this useless piece of trash.

    The point is that no matter what massive strides are made here (and they are great, and we are better off for having them), we must remain vigilant against people that would rather dominate the world than contribute to humanity.

    --
    bash: rtfm: command not found
  7. I think the world has finally left me behind by Brandybuck · · Score: 3, Interesting

    I think the world has finally left me behind. I just don't get this obsession with .NET. Even the Java ecstacies back in the mid 90's weren't this enthusiastic. There are fifty stories on related topics on OSNews, and .NET evangelists are work are sprouting up everywhere like dandelions. Hell, Miguel can't take a dump these days without Slashdot reporting it.

    Why the obsession with Microsoft technology? What's it going to give me, an embedded systems developer? Why are vice presidents at work mandating its use in a hard realtime product? Frankly it appears to me that the world has gone stark raving mad.

    Has there EVER been any language or framework that generated so much unbridled enthusiasm before? Did they lace the spec with speed or something? I'm not doubting that these various Microsoft cloning projects have some merit, but some of you guys are going way over the top.

    I guess I'm just an old fashioned fuddy duddy who should stick with old fashioned languages, frameworks and music.

    --
    Don't blame me, I didn't vote for either of them!
    1. Re:I think the world has finally left me behind by dekeji · · Score: 4, Interesting

      The key differences between C# and Java are philosophy and licenses.

      Java's philosophy is built around WORA and enforced standardization, courtesy of Sun Microsystems.

      C# is just a language, like C or C++--it comes with a small standard library, but what you do with it beyond that is up to you. C# has a language standard, and an open one at that, but the degree to which you follow that is up to you.

      Whether that is good or bad is a matter of needs and preferences. I think the level of enthusiasm C# and Mono have generated should tell you which way the wind is blowing.

      Note that Mono is not just about cloning Microsoft. Mono is building an entire platform; part of that platform is Microsoft compatibility libraries, but most of it is actually based on open source APIs and libraries.

    2. Re:I think the world has finally left me behind by WaltFrench · · Score: 2, Interesting

      The fact that Microsoft initiated this project is a significant negative to me (risk of having the rug pulled out) but the only negative against the opportunity to have a multi-language (I'm a sucker for the strong type- and functionality assertion checking that Pascal first brought, and Eiffel now offers), multi-platform environment.

      That means that when the NAG releases their intricate math routines in .Net, I could use them without worrying about FORTRAN vs. C vs VB etc... develop anywhere (?) for implementation many years into the future on unknown platforms. Mix'n'match developer familiarity with 3rd party libraries.

      This is just my perspective as a business person who doesn't code nearly as much as I used to, but wants to leave a legacy that others can build on (and wants to freeload on the best & brightest of what came before). .Net is a slam-dunk only-way-to-do-it choice if the Mono guys are only half as good as they seem to be, and if MS is only twice as evil as it seems to be.

      --
      "Inquiring Minds Want to Know!"
    3. Re:I think the world has finally left me behind by Anonymous Coward · · Score: 1, Interesting

      Why ? There is no need and requirement to explain everything logically or having a requirement to give a scientific explaination about things once someone has read 20 books. It should be enough for the majority of people when someone says "I do not like it". Same with drinks or clothes, not everyone likes to wear or drink everything. And people often do not explain these things, they simply like or dislike it. In my 24 years of programming and I can tell you that I made quite a lot starting from Z80 asm, 680x0 asm, 6510 asm, PowerPC asm, C, Java, VB, Perl, Rexx, Logo and so on that there still are languages that I do like and languages that I hate. It's the same stuff for people liking Linux over BSD or Windows over Linux. Just because you are prefering MONO and now show up here like a preacher telling everyone else to like MONO too because you do so doesn't make it a better solution for everyone. MONO is just one solution out of many solutions, there are people who like it and swear on it and there are people who simply can't stand it. I for my own count to the last named ones. I also believe (which of course makes me an individual) that MONO doesn't really fit into the UNIX/Linux world it somehow has this alien touch and feel. For me MONO is simply an overhyped technology that will soon be deprecated anyways because some new fresh shit shows up that everyone starts hyping the hell out. I have seen so many languages showing up and disappearing again (or not used anymore) and my daily experience for over 24 years tells me that people still stay on the old solid languages because they have proven to work and work perfectly for them.

  8. Question about GTK# by EvanED · · Score: 4, Interesting

    I've been looking high and low for a cross platform GUI tool, and the only one I particularily like is Qt. Which, of course, you have to pay lots of money for to get the Windows version (or deal with the "freeware" bit stuck in the title bars of windows). I'm gonna look into Wx.NET; just found out about that in this discussion.

    Anyway, I'm reading over the FAQ for GTK#, and it says you need to have cygwin. So, my question is, does only the developer of the software need to have cygwin, and then it builds it using libraries provided with it and outputs a nice standalone application, or does everyone who wants to use it need to install cygwin? I can't seem to figure this out from the site...

  9. native GUIs with C# on Windows, Linux, OS X by dekeji · · Score: 4, Interesting

    There is another choice for native GUIs using C# on Windows, Linux, and OS X: wx.NET, bindings of the wxWindows library to Mono and Microsoft's .NET implementation.

    wxWindows is great because it gives you a uniform API across different platforms and toolkits, while at the same time using native widgets and giving you access to platform-specific features if you like.

  10. Slow? by TheInternet · · Score: 4, Interesting
    "it's S-L-O-W"

    Is this based on anything? It's slower than raw C or assembly of course, but quite fast overall.

    Everything below this sentence is from http://www.alastairs-place.net/cocoa/faq.txt:

    * 2.7 How fast are Objective-C messages?

    The name "message" might make you think that they are slow; however, they are
    actually quite fast. Here are some figures from a 1GHz PowerPC G4 (courtesy
    of Marcel Weiher):
    Operation | Time (ns)

    Increment (memory) variable | 2
    Call through an IMP | 12
    Local function call | 18
    Cross-module function call | 37
    Objective-C message | 54
    atoi("1") | 182
    Local function call refers to a call to a function in the same executable or
    dynamic object module. Cross-module function call is a call from one
    executable or dynamic object module into another.

    On current Apple versions of GCC, an Objective-C message results in a call to
    objc_msgSend(), which is itself a cross-module function call. That means that
    the actual method dispatch only takes 17ns (on average), which is pretty
    quick.
    --
    Scott Stevenson
    Tree House Ideas
  11. GTK# is NOT ready by ralinx · · Score: 5, Interesting

    i'm developing a C# application which has a System.Windows.Forms (SWF) frontend for the Windows version, and a GTK# frontend for the Linux version. I was hoping to get rid of the SWF frontend and deploy my application on Windows and Linux using the GTK# frontend. Despite all of the hype surrounding Mono/GTK# (thanks miguel) i have not been able to get this working because GTK# simply doesn't work correctly with MS.NET. There are parts of GTK# that actually rely on an incompatibilty between Mono and MS.NET to work correctly. So when this code is executed with MS.NET, you'll get runtime exceptions. The same code will function correctly on Windows when you use Mono on Windows, but then i get memory leaks everytime i use Regex.Match which my application needs quite often. So after leaking about 395MB of RAM, the garbage collector will crash with an error ("too many heap sections"). The same code runs perfectly on Linux in Mono.

    I would really like to see Mono and GTK# completely ready to be used on Windows for _serious_ stuff (as in: not the average Hello World GTK# app) but rigth now, it just isn't up to the task yet. On Linux, it's pretty good alraedy, but on Windows it's just unusable for my application. I've had to go back to using my old SWF frontend for my windows users.

    1. Re:GTK# is NOT ready by ralinx · · Score: 3, Interesting

      as a matter of fact i did.

      i filed a bug for the gtk# errors: http://bugzilla.ximian.com/show_bug.cgi?id=61348
      Mike Kestner responded to this, his comments don't mention if it's actually been fixed yet though

      and as for the memory leak with regular expressions on windows: http://bugzilla.ximian.com/show_bug.cgi?id=62293
      nobody has even bothered to respond though.

      Filing bug reports on Slashdot (without the
      information needed, mind you) wont get them
      fixed.

      Filing them on Bugzilla will.

      i used to think the same... i had to get ignored on Bugzilla to even want to post on Slashdot.

      Just don't claim Mono is ready for something when it clearly isn't.

    2. Re:GTK# is NOT ready by ralinx · · Score: 2, Interesting

      you're right about all those things... but it gets tedious to implement the same logic (eventhough it's just presentation logic) more than once. I don't like UI code, to me it's the most boring part of application development. It would be very nice if i'd only have to write that code once and have it work on both Windows and Linux. Now i have to do this boring work twice, once in SWF, and once in GTK#

      i can definitely understand that Mono/GTK# isn't ready for that yet... i know they could definitely use more developers, and that's not always easy for an open source project. But what bothers me is that the Mono developers are always claiming that Mono/GTK# is the answer to the cross platform problem and that it's ready for it when pretty basic GTK# code doesn't even run on on Windows without crashing.

      Instead of doing so many interviews and posting on Slashdot, perhaps they should actually try to fix those things and make their software do what they claim it does.

    3. Re:GTK# is NOT ready by Nurgled · · Score: 2, Interesting

      The solution to the cross-platform problem won't be a bunch of class wrappers around native widgets. Instead, that problem will be solved with higher-level conceptual classes which don't have a one-to-one relationship with the underlying widgets. It would be another layer between the business logic and the UI code which takes the high-level interface ideas and makes the right calls to make it happen in a sensible way for each system.

      Of course, making a completely general concept-based class library isn't easy. However, I'm sure someone could achieve a compromise which manages to encapsulate many of the common ideas present in today's GUIs. For example, rather than having a Window class which can contain Controls, you could (for suitable classes of application) have a DocumentCollection class which can contain Documents. On Windows this could be rendered as an MDI interface with a child for each document (I know MDI is deprecated, but this is just an example) while on MacOS this would presumably just be a bunch of top-level windows which "stick together" in the window order. This is a pretty poor example, but I'm sure you can think of some of your own -- the higher-level they are the better.

      For the purposes of your application, though, you could make your own abstractions which are totally specific to whatever you're writing. The only bit that has to differ between platforms is a a small set of API calls in response to methods from the higher-level API above. Most of the "presentation logic" which actually makes the interface do something would be in the high-level interface layer shared between them all.

      I do admit, though, that designing a high-level GUI abstraction layer for many programs would be tedious and unrewarding. For larger projects, though, it'd be a useful approach. I have a small attachment to the methods I've outlined here because my degree dissertation project was in part based around these ideas, although not applied exactly as I'm describing here. I won't claim it's the best approach for everything, though; toolkits like SWT for Java or wxWidgets which abstract at the widget/component level can be very useful in many cases.

  12. Re:Windows.Forms in Mono by KAMiKAZOW · · Score: 4, Interesting
    our path to indepedence clearly goes through Gtk#


    Why GTK#? Honestly, GTK is probably one of the worst toolkit for real cross platform development.
    The Windows port of GTK sucks. This WiMP thing (Or whatever it's called - it makes GTK app to some degree look like native Windows apps) is not that great. The performance of the GTK(WIMP) apps' GUI is noticeable lower than a native GUI.

    Under Mac OS X it's even worse. GTK only works under X11. This means no Aqua look & feel. No copy and paste or drag'n'drop between native OSX apps and GTK apps. Even keyboard shortcuts are different.

    Why didn't you chose something like wxWidgets? At least wxWidgets offers native GUIs under any platforms it runs. wxWidgets or any other toolkit that offers real platform independence.
    Or: With all these XML GUIs under .NET (like XAML) Ximian could've used Mozilla's XUL toolkit and have better multi platform integration than GTK.

    Also - from what I've read on the mailing list archives - Mono only works sometimes on BSD systems.

    What kind of independence is this? You are only focused on x86-Linux running GNOME.

    Ximian does not seem really interested in real platform CocoaSharp. Stuff like Qt# (for KDE users), CocoaSharp, and other cross platform develpment is not done by any Ximian guy, but from contributors.
  13. Re:Windows.Forms in Mono by Anonymous Coward · · Score: 1, Interesting

    Use tags.

  14. Re:Patents? by Anonymous Coward · · Score: 1, Interesting

    "Mono's rich support of Linux."

    Anybody who uses the word 'rich' in that kind of context is a corporate tool. Is MS writing their copy for them too?

  15. Re:you have got to be joking by Trurl's+Machine · · Score: 2, Interesting

    Er.. So how do you open the pic of that cute girl to a new tab while browsing one-handed?

    Personally, I don't think that tabs fit well to the one-button paradigm... and I don't use them. Expose makes them just redundant. "Pr0n aside", there are websites with javascript purposedly blocking out the right mouse button, to make it more difficult to save the image of the cute girl to your local collection of, ummmm, images. On a Mac it's simple - just drag'n'drop the image onto the icon of your "~/Pictures/pr0n" folder, and their silly javascript can just kiss the round backside of your iMac.

  16. Petty Naming Gripe by DLWormwood · · Score: 1, Interesting
    Cocoa#? GTK#?

    Wasn't the "gag" for MS naming the .NET language "C#" to refer to the musical note? Since C# doesn't appear to have a "#" operator, why not use musical names or some other rule for naming these other languages? Just tacking "#" after language names shows a lack of imagination and gives MS too much of a marketing leverage over the open source project's future PR. Not to mention confusing all those shell scripters out there? (-;

    --
    Those who complain about affect & effect on /. should be disemvoweled
  17. Re:Windows.Forms in Mono by squiggleslash · · Score: 3, Interesting
    The major argument isn't against Miguel as what he's doing and the mindset commonly associated with Miguel.

    What most of us want is something better than what Microsoft does, more than that, we want something exciting, radical, and different. The mindset that Miguel and others seem to share is that as long as "our" stuff is Free, it is better, and there's no point in creating a better technology, we might just as well copy Microsoft, fix a few bugs, extend here and there, and, voila, you have something better. The technology isn't better, but the implementation is, and that's enough, right?

    It's more than that though, it's an unwinnable contest. As long as Microsoft's "competitors" are merely trying to catch up with Microsoft, implementing the same technologies, there's no way, in practice, those competitors can actually be better except on purely political grounds.

    Now don't get me wrong, I consider myself an enthusiast of free software. But if you're going to write an operating system from the ground up, then you're wasting a lot of opportunities by relentlessly copying someone else, especially copying the technologies - from the user interfaces to the APIs - of a company whose reputation in the industry is of being first, not best. It's a waste of talent.

    The issue becomes worse when you consider that these competitors are trying to build Microsoft's environment upon an operating system that has a fundementally different philosophy at its heart, meaning any competitor designed this way is going to be fundamentally flawed. Linux, arguably, should be abandoned in favour of ReactOS if this development path continues.

    A substantial section of the free software and open source communities lacks the talent and imagination to build something new, and unfortunately that section is leading development at the moment. Miguel is merely the figurehead for that movement. I don't blame people for feeling that way, I know a lot of people would like a Free clone of Microsoft's operating systems and environments, I just feel that this is a bandwagon the GNU/Linux distributions are unwise in hopping on to and pouring so much development time into.

    The question really is do you want a Free Windows, or do you want a choice of platforms? Right now, GNU/Linux is Window's most powerful competitor, yet all the excitement, the innovation, the "We want to create something better" attitude, is coming from elsewhere.

    --
    You are not alone. This is not normal. None of this is normal.
  18. Re:Windows.Forms in Mono by squiggleslash · · Score: 2, Interesting
    The thing is, the Unix world had many many years to develop something better than Microsoft. What you got was Motif, a gazillion emacs modules, key-command window managers, and various scripting components.
    And you got OpenStep, NEWS, and other environments that were technically excellent. Until the mid-nineties though, most of the development was closed. And, unfortunately, pretty much the moment the F/OSS communities started up, it was clear they wanted to clone Windows. I recall the first version of RedHat I installed was set up with FVWM95 as the default WM.

    The Unix world has had its good GUIs, I even linked to a pioneer in the field, it's the F/OSS communities that have insisted on ignoring work relevent to Unix and instead tried to graft on to an OS fundamentally unlike Windows an environment that was as Windows-like as possible.

    --
    You are not alone. This is not normal. None of this is normal.
  19. Re:Miguel, please leave this planet! by omicronish · · Score: 2, Interesting

    I wonder about the hatred too. I code heavily on Microsoft platforms, and looking at the documentation for the new Longhorn APIs, I am quite sure Mono will become even more important when Longhorn rolls out. Why? Just look at the docs; all the new APIs are managed .NET APIs.

    I commend Miguel for his awesome work, and the rest of the people behind Mono. When Microsoft is working on a new version of Windows, which is undeniably the most used desktop OS in the world, and heavily uses .NET, you simply don't ignore the thing.

  20. Miguel, please keep up the good work! by beanlover · · Score: 2, Interesting

    I work for a company that writes it's product in a language called Databus...it used to be hardware specific but now it is a complied yet interpreted language that runs on a LOT of platforms...that is it's strength and pretty much the reason why we don't use "more modern" languages.

    I have been watching the Mono project ever since I have heard of it and I am truly amazed at all they have accomplished. I know they have a long way to go...but YOU GUYS RAWK!

    I can only hope that one day Mono will allow for our apps to be as portable as they are now so we can switch to another language that has more robust OO abilities not to mention other things I hate about db/c.

    So, please, keep up the good work on Mono...many folks out here are rooting for you.

    B

  21. Re:Windows.Forms in Mono by Anonymous Coward · · Score: 1, Interesting

    Because DotGNU only works with X11 and the Mono implementation is supposed to also run natively on Win32 and Mac. (And in the future there is supposed to be a driver that allows to use Wine and solve the P/Invoke requirements)