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."
I got a headache just reading the headline. Give us old fogies a break, we're used to seeing the hash mark at the beginning of the line...
I wanted to mention that our path to indepedence
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.
You know there are panther and aqua themes out there that look and behave quite similarly to the mac theme. find them at Themes at freshmeat
From the mono FAQ:
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.
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.
I've been using wxWidgets for some corperate develpment and I don't think I can be more happy with it. Integrating Cocoa into Mono is nice with GTK and all (didn't read article- sorry,) but is it going to use native UI faculties that the operating system provides? wxWidgets even has .NET interpolabilito under development called wx.NET and you can use that with Mono too.
..from embracing (and extending!) C# and .NET. Programmers generally like C# and .NET for application development, and Objective-C has some serious flaws.
Best Buy can have you arrested
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.
I want Mac OS's interface on Linux! I've done what I consider to be as good of a job as I can, but it's not the best knock-off in the world.
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?
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.
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...
I want Mac OS's interface on Linux!
Request denied.
-jcr
The only title of honor that a tyrant can grant is "Enemy of the State."
.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.
Yeah, I used to use a MS Intellipoint Optical Wheelmouse with my 2 macs, still use it on one. However, for my old laptop I've gone back to the ol' one-button. Why? I've decided that the original paradigm is better; the keyboard has far more functionality than any mouse, with the exception of the scroll wheel.
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)
Ignorance and prejudice and fear
Walk hand in hand
Think about it this way.
.NET/C#
.NET and how we are all bunch of idiots, I am busy writing code for a good company that just happens to base their operations on windows.
.NET is cool. Linux is cool. Mono is cool.
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.
The reason behind the 1 button mouse was that it was painfully clear what the 1 button was to be used for. If you wanted "right button style functionality," hold down the option key and click.
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.
- Zav - Imagine a Beowulf cluster of insensitive clods...
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.
What is it with the hatred for this man? I swear some you act like he is the anti-christ for what he is attempting to accomplish with the Mono project.
.Net apps on other operating systems.
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.
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.
The number of people still using the original root class, Object, is vanishingly small. GNUStep has a perfectly good implementation of NSObject, which tracks the Apple implementation quite well.
-jcr
The only title of honor that a tyrant can grant is "Enemy of the State."
http://www.mono-project.com/downloads/
Mono 1.0.1 has been released and fixes a number of bugs.
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.
Scott Stevenson
Tree House Ideas
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.
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.
You can look through the ECMA document for a Hello World example. Also check out last months Ars Technica Linux.Ars article on Mono as it provides a couple of examples too.
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.
C# and Java provide "reflection" APIs for implementing things like this. It would be quite easy to create a class entirely analagous to NSUndoManager in either language
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 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.
How to solve most of our problems: 1.Lots of nuclear plants. 2.Cure aging.