Slashdot Log In
Mono's Cocoa# Underway, GTK# Takes on Windows.Forms
Posted by
CowboyNeal
on Thu Aug 12, 2004 11:22 PM
from the portability-now dept.
from the portability-now dept.
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."
This discussion has been archived.
No new comments can be posted.
Mono's Cocoa# Underway, GTK# Takes on Windows.Forms
|
Log In/Create an Account
| Top
| 378 comments
| Search Discussion
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
Yikes! (Score:5, Funny)
Re:Yikes! (Score:4, Funny)
Avert your eyes, children! He may take on other.Forms!
Windows.Forms in Mono (Score:5, Informative)
(http://tirania.org/blog)
clearly goes through Gtk#, but we realize the
importance of giving users binary compatibility
so we are actively developing Windows.Forms and
Visual Basic.NET (gasp) for Mono.
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
(our previous Wine-based approach having too many
Mono/Wine problems to solve).
Miguel.
Re:Windows.Forms in Mono (Score:5, Informative)
using System;
using System.Drawing;
using System.Windows.Forms;
namespace TreeTest {
public class TreeTest : Form {
[STAThread]
public static int Main(string[] args) {
Application.Run(new TreeTest());
return 0;
}
public TreeTest() {
tree = new Tree();
tree.Dock = DockStyle.Fill;
Controls.Add(tree);
Text = "TreeTest";
}
private Tree tree;
}
public class Tree : TreeView {
public Tree() {
menuItem = new MenuItem("Menu Item");
contextMenu = new ContextMenu();
contextMenu.MenuItems.Add(menuItem);
}
protected override void OnKeyDown(KeyEventArgs e) {
base.OnKeyDown(e);
if (e.KeyCode == Keys.Apps) {
ShowMenu(new Point(0, 0));
}
}
protected override void OnMouseUp(MouseEventArgs e) {
base.OnMouseUp(e);
if (e.Button != MouseButtons.Right) {
return;
}
ShowMenu(new Point(e.X, e.Y));
}
protected void ShowMenu(Point pos) {
contextMenu.Show(this, pos);
}
protected ContextMenu contextMenu;
protected MenuItem menuItem;
}
}
Re:Windows.Forms in Mono (Score:5, Interesting)
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?
Re:Windows.Forms in Mono (Score:5, Informative)
(http://plan99.net/~mike/)
For *really* hard core apps (read: most .NET apps) that actually mix native and .NET code, they were talking about having a special "winelib" mode where it's somehow used, but I've not seen any credible technical details on this.
Basically it looks like in order to run .NET code that is mixed with native Win32 code the Wine team will have to do their own S.W.F implementation one day. Currently there are no killer .NET apps that I know of (by killer I mean public/retail software sufficiently unique that it's a "blocks my migration to Linux" app, rather than custom corp apps) so it's not a big deal. But I expect they'll come eventually.
Re:Windows.Forms in Mono (Score:5, Insightful)
Re:Windows.Forms in Mono (Score:4, Interesting)
(Last Journal: Friday November 23, @04:11PM)
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 [apple.com].
Re:Windows.Forms in Mono (Score:5, Interesting)
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
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.
Re:Windows.Forms in Mono (Score:5, Insightful)
(http://plan99.net/~mike/)
GTK# runs on multiple platforms. Unsurprisingly it works best on the platform most people use it on. It does not run well on Windows or MacOS X, but that's simply because few people have worked on it/been interested in it. That can be fixed, with time.
When Miguel said "GTK# is the path to independence" he was talking about API independence not platform independence. They are different.
wxWidgets does not give platform independence. Sorry, but it just doesn't cut it for quality software. Abstractions work best when the things they abstract are semantically very similar (or identical) - widget toolkits are not similar, they often work in very different ways and have radically different capabilities. I've yet to run a wxWidgets app which didn't feel piss poor on every platform : much like Swing apps not feeling native everywhere, wxWidgets apps never fit in. This doesn't cut it for writing good software for the free desktop.
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.
GTK is a proven platform used by many, many applications. XUL is really only used by the Mozilla suite of apps: it lacks such basic things as the still theoretically xulrunner. That's why it was chosen.
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.
So what? Wine doesn't work on BSD systems currently either, but this is the fault of BSD not Wine (and I believe the same is true of Mono). Both Wine and Mono do very complex things with threading, address space management and low level OS calls that BSD either doesn't support or nobody with the relevant expertise has shown up to write the support. The vast majority of people use Linux, so this gets the best support. This is the open source meritocracy : write the code and the support will come, yes?
Re:Miguel, please leave this planet! (Score:5, Insightful)
1. No one is forcing anyone to use Mono or run
2. Try to look at the advantages that the OSS and Linux communities can utilize here if we can convince more developers to develop apps for Linux due to the existance of Mono.
3. Mono and Miguel are not going anywhere so all the folks in the anti-mono crowd might as well get use to it.
Re:Windows.Forms in Mono (Score:5, Informative)
Microsoft hasnt written a windows.forms implementation under Linux - they are not playing 'catch up', they are implementing something that doesnt yet exist.
Actually, it does. DotGNU Portable.NET has had a native implementation of SWF for over a year now. We discarded Wine as a viable option from day one.
DotGNU Web Site [dotgnu.org].
Patents? (Score:5, Informative)
Question 131: Could patents be used to completely disable Mono (either submarine patents filed now, or changes made by Microsoft specifically to create patent problems)?
... The controversial elements are the ASP.NET, ADO.NET and Windows.Forms subsets. Those are convenient for people who need full compatibility with the Windows platform, but are not required for the open source Mono platform, nor integration with today's Mono's rich support of Linux.
Why doesn't mono get it (winforms)?? (Score:2, Insightful)
I have this distinct feeling that supporting Windows.Forms out of the box would have affected Miguel's stated reasons for Mono ie Gtk# and using it for Gnome apps..... That's why probably Mono didn't implement Windows.Forms for Mono 1.0 (talk about MAJOR feature missing). But this is totally off that map ?.
If Apple does run .NET finally , it'll probably be licensed off Microsoft to prevent Microsoft from screwing them later. I have a feeling Miguel and Ximian-Novell is just doing "Free" development for Apple if they release this under LGPL. I care more about running my winforms apps on Linux and BSD , not about how "cool" embedding a browser control in C# is.
Nothing to see here folksMono vs. Java (again) (Score:5, Interesting)
wxWidgets, another _perfect_ alternative with Mono (Score:4, Informative)
(https://andreib.com/ | Last Journal: Thursday October 16 2003, @10:51PM)
Apple could really benefit... (Score:5, Interesting)
(http://www.robert.to/)
Re:Apple could really benefit... (Score:5, Insightful)
(Last Journal: Sunday November 05 2006, @05:31AM)
-jcr
Re:answer (Score:5, Informative)
No it wouldn't. Check the documentation; NSUndoManager intercepts *any* message sent to it, and stores it for later invocation on a different target. You can't do that with reflection, which only allows you to call one of a fixed number of methods.
Another example: there are third party libraries that add higher order messaging [macdevcenter.com] to Cocoa collection classes. They allow you to write code like "[[array select] isFroody]", which will return all objects in array for which the method -isFroody returns true. Again, the initial "isFroody" message is intercepted, then forwarded to each object in the array.
Slow? (Score:5, Interesting)
(http://maxify.com/ | Last Journal: Tuesday March 11 2003, @03:35AM)
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):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.
Re:Slow? (Score:4, Informative)
(http://droleary.subsume.com/)
Is this based on anything? It's slower than raw C or assembly of course, but quite fast overall.
More importantly, no language is faster than a programmer who doesn't know algorithms. Looking at the "S-L-O-W" code through the link provided, it's some of the shittiest toy benchmarking I've ever seen. It compares static strings through an inner method call and nested inside two loops! Even a freshman seeing that code would have had the sense to move the compares outside all that. So in 10 seconds, I was able to take code that was claimed 6x slower than Java and make it 2x faster than Java. Of course, it is still a toy benchmark that accomplishes nothing of value.
Mono has come very far in a short period of time (Score:5, Insightful)
You can use real apps right now with Gtk# - the Muine music player and the Blam RSS reader are functional and mostly stable...there are many other examples.
Windows forms sucks (Score:2, Informative)
Gtk# Rocks (Score:5, Interesting)
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.
This is great (Score:1, Interesting)
(http://www.politicallyuncensored.com/)
I just wonder when Microsoft will try to say, "See? We are the innovators. Look at mono! They followed our
While it may be true that Mono was released after
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.
I think the world has finally left me behind (Score:4, Interesting)
(http://www.usermode.org/ | Last Journal: Tuesday April 17 2007, @09:13PM)
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.
Re:I think the world has finally left me behind (Score:5, Insightful)
(http://www.daishar.com/blog)
.NET is pretty damned good, and people recognize that. The few who don't are the normal "Anything but Microsoft" zealots. It's not perfect, but very good and getting better.
Absolutely nothing, but you're not the target demographic.
.NET is the hot new buzzword, and your VPs aren't smart enough to realize that it's not suitable for embedded realtime applications.
From your perspective, that may be true, but then you're looking at the world from the eyes of a real-time, embedded systems developer where you work with a limited set of known hardware under strict time and resource constraints. .NET isn't for you. That doesn't mean the world has actually gone mad, just that there's more to the world than that which applies to you.
Re:I think the world has finally left me behind (Score:5, Insightful)
(http://www.daishar.com/blog)
All I can offer is that C# and .NET are the current "cool" things, and thus Unix (read: Linux) developers don't want to be left out in the cold. That may change in the future. It may not. Mono may mature to the point where cross-platform .NET applications Just Work (tm) without ugly GTK# stuff (GTK# is fine for Linux, but GTK on Windows sucks, and I can't imagine GTK# would be any better -- besides, the look & feel is all off, and themes can only do so much to correct that).
Basically, ask yourself why you would use Java rather than C/C++/Qt/KDE/GTK/GNOME or a scripting language like Ruby or Python, and then realize that C# fixes many annoyances from Java (int is both Object-derived and a value type in C#, unlike int vs. Integer in Java; You can create user-defined value types in C#; C#'s generics implementation is much more robust than Java's syntactical sugar hack that translates everything to Object during compilation; etc) and adds new language features (attributes, properties, events, etc). Java and C# are garbage-collected, which makes them more secure by default than C/C++ (with respect to memory management issues, anyway -- you can certainly still write insecure code in Java or C#). They're also compiled to an intermediate language, so they're faster than scripting languages (yes, Python and Ruby have various different compilers to build C code, java bytecode, .NET IL code, etc, but in their vanilla forms they're interpreted scripting languages).
.NET fixes a number of shortcomings of Java. Also, the C# language and common runtime are truly open (ECMA standardization), unlike Java. Parrot has been "just around the corner" for years, and nothing I've seen has indicated that it will actually "come around the corner" any time soon. If you want to wait, or build your software on top of ever-changing beta code, go ahead and use Parrot.
Re:I think the world has finally left me behind (Score:5, Insightful)
For years, developers targetting the windows platform had two (real) choices VB or C/C++.
With C/C++ you had two choices. Use the win32 API directly and/or use MFC. With VB, creation of GUI apps was made as simple as possible, at the expense of a cumbersome language.
Throw COM into the mix, complex threading models and API interface du-jour and the bottom line is that Windows developers have been guinea pigs feeding on inconsistent standards for 15 years.
-----Enter Java
Finally, a language that brings OOP to the masses without having to learn complex semantics regarding memory allocation. It also eliminates the cumbersome and overly complex nature of STL in C++.
The drawbacks were twofold: Early java adopters didn't have the rich GUI IDE's present in VB5/6 and VC++/DevStudio. Like it or not, it hurt producitivty, at least in the short term. Translation: corporate america didn't warm up to the idea immediately.
Another drawback to java was the rampant verbosity of the language. There are those that do believe that enum's and value types are GOOD things.
Then you had the immaturity of Java GUI toolkits that made 'rich client' apps look like they were written by high school script kiddies.
---- Enter
Goodbye VB6. Goodbye VC++. Hello managed code. Goodbye MFC. Hello (working) garbage collection. Goodbye complex threading models. Hello full-featured clone of Java.* renamed as System.*.
C# as a language is a dream. It contains most of the language features that I had been dying for. It is readable, quick to code in and is put together in a consistent manner.
There is very little about C# that is better than java. But for windows-based shops, Java can't hold a candle to c#/.net.
It isn't a religous war. You may not like microsoft's policies or busines practices. And they certainly didn't invent the concept of a managed environment or one-up Java.
While the typical slashdotter is foaming at the mouth about MS,
Imagine the ability to take an ASP.NET app that you RAD-developed using MS VS.NET tools and cross-compiling it in Mono, running the whole thing under apache using mod_mono.
You would have the benefit of a killer IDE (VS.NET), a rock-solid back end (Apache) and an application framework that works without headache!
That is why **I** use MS.NET and MONO. I don't particularly care for MS, but I am smart enough to know what side of the bread is buttered.
Bottom line: Sometimes you have to get past the religious zealotry of the pro-linux/anti-ms crowd (ie. slashdot) and see something for it's good.
This isn't a perfect world, and MS usually sucks, but
Lets marry them together and reap the benefits.
Standing at the back of room pouting isn't helping advance your cause.
Re:I think the world has finally left me behind (Score:5, Interesting)
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.
Re:I think the world has finally left me behind (Score:5, Insightful)
What generates all the hubbub, of course, is that something like this is coming from Microsoft. Think of it as a celebration party. What's being celebrated is that Microsoft is finally coming of age.
Question about GTK# (Score:5, Interesting)
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...
Re:Question about GTK# (Score:5, Informative)
(Last Journal: Sunday October 14, @10:49PM)
Cocoa on top of Mono? (Score:2, Insightful)
(http://slashdot.org/)
Re:Cocoa on top of Mono? (Score:4, Informative)
(http://www.arbitraryconstant.com/)
Forget about GUI bindings, all the different implementations don't even share the same root object.
Re:Cocoa on top of Mono? (Score:5, Informative)
(Last Journal: Sunday November 05 2006, @05:31AM)
-jcr
I bid C# welcome (Score:3, Insightful)
(http://haxor.dk/)
native GUIs with C# on Windows, Linux, OS X (Score:5, Interesting)
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.
Also: Mono Project 1.0.1 Released (Score:5, Informative)
(Last Journal: Sunday October 14, @10:49PM)
Mono 1.0.1 has been released and fixes a number of bugs.
Cocoa support for other languages (Score:1)
GTK# is NOT ready (Score:5, Interesting)
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.
Petty Naming Gripe (Score:2, Interesting)
(http://web.mac.com/wormwood/)
Wasn't the "gag" for MS naming the .NET language "C#" to refer to the musical note? Since C# doesn't appear [softsteel.co.uk] 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 [slashdot.org] out there? (-;
Proof is in the pudding (Score:1, Insightful)
If some great apps are created with mono, then it will take off, regardless of people's reservations about patents, the moral dimension, etc., etc. If it's demonstrably great, people will use it.
What exactly are you looking for? (Score:5, Funny)
Re:What exactly are you looking for? (Score:5, Insightful)
(http://www.theantix.org/ | Last Journal: Tuesday April 12 2005, @02:47PM)
An interface is *so* much more than widgets and icons.
And I'm a Gnome zealot, for crying out loud.
dude.
you have got to be joking (Score:1, Funny)
Re:you have got to be joking (Score:5, Informative)
(http://web.mac.com/zav | Last Journal: Wednesday May 28 2003, @04:24PM)
Studies done at the time indicated that people made more mistakes with multi button mice and mice with multi button interfaces took longer for the user to accomplish what they want to do (because of the mistakes and confusion about what the other button was for).
For me, it is pretty damn obvious that the mouse button is used to provide the "primary operations" for the item clicked on. Holding down the option key when clicking to extend into "options" for the item makes perfect sense to me.
What really is the big deal with people's obsession on multi button mice? Honestly, I don't get it.
Re:you have got to be joking (Score:5, Insightful)
(http://slashdot.org/)
In Safari, if you want to open a link in another tab, just command-click. In another window? Alt-command-click. Want a menu? Ctrl-click.
For dealing with files, open 2 finder windows in column view, and stack them on the screen. Want to cut-n-paste? Drag-n-drop. Want to copy? Alt drag-n-drop. Want a shortcut? Alt-command drag-n-drop.
The more I use a one-button mouse, the more I like it. YMMV.
(tig)
Re:For Linux? (Score:5, Insightful)
They should be concentrating on making quick & efficient UIs like the Amiga had, or the early Macs, not bloat upon bloat upon bloat.
Both the original mac and Amiga UI systems fit inside 512k RAM or less, leaving everything else for the App's functionality. When some of those early machines were expanded from 68000 CPUs to 68040s and 32MB of ram or more they flew faster than any 2 or 3GHz cpu in GUI feel. Nothing could outclass them
So why do we need this bloat?
Re:For Linux? (Score:5, Funny)
(Last Journal: Sunday November 05 2006, @05:31AM)
Request denied.
-jcr
Re:So... (Score:1)
Re:Guide for newbies (Score:4, Informative)
Re:Guide for newbies (Score:2)
(http://www.dasmegabyte.org/ | Last Journal: Tuesday June 22 2004, @11:41PM)