Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Nov 30, 2005, 12:27 AM   #1
NewbieNerd
macrumors 6502a
 
Join Date: Sep 2005
Location: Chicago, IL
Send a message via AIM to NewbieNerd
.NET Programming

Do many people have experience using Mono or something to develop .NET, namely C#, programs/applications in OS X? Supposedly support for System.Windows.Forms is increasing, but I have no idea how to use it. Can anyone help?

I have installed Mono, can compile normal commandline programs via `mcs filename.cs' and then run via `mono filename.exe.' How do compile applications that use Windows.Forms?? Thanks.
NewbieNerd is offline   0 Reply With Quote
Old Nov 30, 2005, 01:33 AM   #2
jalagl
macrumors 6502a
 
jalagl's Avatar
 
Join Date: Jun 2003
Location: Costa Rica
Send a message via ICQ to jalagl
Windows forms is still under development, and I think it still has a long way to go. I've played a little bit with Mono, and I can tell you that while Forms support is lacking, the ASP.NET support is pretty good. I was able to test several web apps I have developed using the included XPS web server.

You can also use GTK# to develop cross-platform GUI apps. For more information about winforms, you can check out the official page, at http://www.mono-project.com/WinForms.

One gripe I do have is that getting MonoDevelop to run on Mac OSX is a PITA - or at least was the last time I checked it out.
jalagl is offline   0 Reply With Quote
Old Nov 30, 2005, 08:24 AM   #3
MacCoaster
macrumors 6502a
 
MacCoaster's Avatar
 
Join Date: Jul 2002
Location: Washington, DC / Rochester, NY / Lexington, NC
Send a message via AIM to MacCoaster
GTK#, Qt# both work as toolkits, however only under X11.

There is Cocoa#, but not complete. It's workable, though.
__________________
The Mac Coaster
Quad Core Q6600 PC, 23" Apple Cinema HD LCD, White MacBook C2D 2.16 GHz, Athlon64 PC, AthlonXP PC, iPod photo 60 GB
MacCoaster is offline   0 Reply With Quote
Old Nov 30, 2005, 08:43 AM   #4
kainjow
Moderator emeritus
 
kainjow's Avatar
 
Join Date: Jun 2000
The first C# I ever did was with Mono on my Mac. I made an iPod class, and then once I got my PC, transferred the code, and it worked with very little change
kainjow is offline   0 Reply With Quote
Old Nov 30, 2005, 09:45 PM   #5
MacCoaster
macrumors 6502a
 
MacCoaster's Avatar
 
Join Date: Jul 2002
Location: Washington, DC / Rochester, NY / Lexington, NC
Send a message via AIM to MacCoaster
Little change? It should work without change. It's like Java, compile-once, run-anywhere (as long as the libraries are supported under the runtime , but that's the case with Java as well).
__________________
The Mac Coaster
Quad Core Q6600 PC, 23" Apple Cinema HD LCD, White MacBook C2D 2.16 GHz, Athlon64 PC, AthlonXP PC, iPod photo 60 GB
MacCoaster is offline   0 Reply With Quote
Old Nov 30, 2005, 09:53 PM   #6
kainjow
Moderator emeritus
 
kainjow's Avatar
 
Join Date: Jun 2000
Well, the only thing I had to change was the filesystem... Windows doesn't have /Volumes and Mac OS X doesn't have drive letters
kainjow is offline   0 Reply With Quote
Old Dec 1, 2005, 12:01 PM   #7
NewbieNerd
Thread Starter
macrumors 6502a
 
Join Date: Sep 2005
Location: Chicago, IL
Send a message via AIM to NewbieNerd
Well as I understand it, the libgdiplus comes standard with the Mono installation, so shouldn't I be able to run a super-simple Windows.Forms app? Is there something else I need to do as far as installation, command line, etc?
NewbieNerd is offline   0 Reply With Quote
Old Dec 2, 2005, 05:14 AM   #8
Compile 'em all
macrumors 601
 
Compile 'em all's Avatar
 
Join Date: Apr 2005
Quote:
Originally Posted by MacCoaster
Little change? It should work without change. It's like Java, compile-once, run-anywhere (as long as the libraries are supported under the runtime , but that's the case with Java as well).
I wouldn't use the word "everywhere" when "everywhere" just means MS
windows. Java is available for Windows, Solaris, OSX , GNU/Linux as well as
a handfull of other embedded systems.
Compile 'em all is offline   0 Reply With Quote
Old Dec 5, 2005, 02:10 AM   #9
MacCoaster
macrumors 6502a
 
MacCoaster's Avatar
 
Join Date: Jul 2002
Location: Washington, DC / Rochester, NY / Lexington, NC
Send a message via AIM to MacCoaster
Quote:
Originally Posted by kainjow
Well, the only thing I had to change was the filesystem... Windows doesn't have /Volumes and Mac OS X doesn't have drive letters
True, but that doesn't stop you from abstracting it to a higher level to make it portable across the platforms supported by mono and Microsoft's .NET runtime.
Quote:
Originally Posted by Compile 'em all"
I wouldn't use the word "everywhere" when "everywhere" just means MS
windows. Java is available for Windows, Solaris, OSX , GNU/Linux as well as
a handfull of other embedded systems.
Eh? .NET binaries work fine on my Macintosh, my Linux PC, thank you very much. I never said "everywhere." I said anywhere given the runtime is supported (mono) with the class libraries.
__________________
The Mac Coaster
Quad Core Q6600 PC, 23" Apple Cinema HD LCD, White MacBook C2D 2.16 GHz, Athlon64 PC, AthlonXP PC, iPod photo 60 GB
MacCoaster is offline   0 Reply With Quote
Old Dec 5, 2005, 04:20 AM   #10
fuzzie
macrumors newbie
 
Join Date: Jun 2004
Quote:
Originally Posted by Compile 'em all
I wouldn't use the word "everywhere" when "everywhere" just means MS
windows. Java is available for Windows, Solaris, OSX , GNU/Linux as well as
a handfull of other embedded systems.
Assuming, of course, you're lucky enough to use a platform Sun supports. I'm running Linux/ppc on my laptop, so I'm stuffed.

Whereas Mono runs quite happily on any platform you can compile it on, thanks to being open source, and while Windows.Forms support is sort of iffy right now, I'm sure that'll get fixed. And of course the underlying technologies - the CLR and C# - are open standards, unlike Java and the JVM.
fuzzie is offline   0 Reply With Quote
Old Dec 5, 2005, 05:19 AM   #11
Compile 'em all
macrumors 601
 
Compile 'em all's Avatar
 
Join Date: Apr 2005
Quote:
Originally Posted by fuzzie
Assuming, of course, you're lucky enough to use a platform Sun supports. I'm running Linux/ppc on my laptop, so I'm stuffed.

Whereas Mono runs quite happily on any platform you can compile it on, thanks to being open source
Please follow along carefully:

1) Go to http://java.sun.com.
2) Click the button labelled "J2SE - Core Java Software". It's the big blue button in the middle.
3) On the next page, click "Source Licensing". It's in the links on the left-hand side of the page.
4) On the Source Licensing page, click "Download".
5) Follow the directions to download the entire J2SDK source code.

Quote:
and while Windows.Forms support is sort of iffy right now, I'm sure that'll get fixed. And of course the underlying technologies - the CLR and C# - are open standards, unlike Java and the JVM.
Microsoft has gotten EMCA's stamp on C#, the CLR, and the basic
Framework, but they still control them with an iron grip. When .NET's
behaviour differs from the ECMA spec, who's right, ECMA or Microsoft? Who
gets to decide how things will evolve --- ECMA, or Microsoft? And of course
.NET is much more than what ECMA has blessed. I doubt we'll see ADO,
ASP.NET, System.Windows.Forms or a bazillion other APIs that you need to
write actually useful applications in ECMA anytime soon.

Even if you're willing to go beyond ECMA and port the Microsoft proprietary
APIs to other platforms, the fact is that System.Windows.Forms is
absolutely NOT a cross-platform GUI toolkit. The Mono guys are
implementing it by sucking in WINE! There is simply no Microsoft-blessed
cross platform GUI toolkit for .NET.
Compile 'em all is offline   0 Reply With Quote
Old Dec 10, 2005, 07:27 PM   #12
dernhelm
macrumors 68000
 
dernhelm's Avatar
 
Join Date: May 2002
Location: middle earth
Java is write once test/tweak everywhere.

C# is write anywhere, but only run on windows.

I've played with winforms on the latest mono and while it works in a "proof of concept" sort of way, too much is missing to be useful. You can get some hooks into XCode so C# applications are listed in the new projects dialog. That's kind of cool and works OK, but the last time I played with it, you had to fully build the entire "packaged version" or it didn't run. Debugging was all but impossible.
__________________
Five exclamation marks, the sure sign of an insane mind. --Terry Pratchett
dernhelm is offline   0 Reply With Quote
Old Dec 10, 2005, 07:30 PM   #13
dernhelm
macrumors 68000
 
dernhelm's Avatar
 
Join Date: May 2002
Location: middle earth
Quote:
Originally Posted by Compile 'em all
The Mono guys are
implementing it by sucking in WINE! There is simply no Microsoft-blessed
cross platform GUI toolkit for .NET.
This is not really true anymore. The original winforms were being implemented using Wine, but they have since switched and are implementing them "natively". That isn't to say that I'd use C# for any cross platform development, anyway, QT in C++ is much more real tool for something like that.
__________________
Five exclamation marks, the sure sign of an insane mind. --Terry Pratchett
dernhelm is offline   0 Reply With Quote
Old Dec 11, 2005, 08:38 PM   #14
MacCoaster
macrumors 6502a
 
MacCoaster's Avatar
 
Join Date: Jul 2002
Location: Washington, DC / Rochester, NY / Lexington, NC
Send a message via AIM to MacCoaster
Quote:
Originally Posted by Compile 'em all
Please follow along carefully:

1) Go to http://java.sun.com.
2) Click the button labelled "J2SE - Core Java Software". It's the big blue button in the middle.
3) On the next page, click "Source Licensing". It's in the links on the left-hand side of the page.
4) On the Source Licensing page, click "Download".
5) Follow the directions to download the entire J2SDK source code.
And I'm sure Sun's willing to let you hack it to your heart's desire and redistribute it to your heart's desire? Yeah right. Not my definition of "open source."
Quote:
Originally Posted by Compile 'em all
Microsoft has gotten EMCA's stamp on C#, the CLR, and the basic
Framework, but they still control them with an iron grip. When .NET's
behaviour differs from the ECMA spec, who's right, ECMA or Microsoft? Who
gets to decide how things will evolve --- ECMA, or Microsoft? And of course
.NET is much more than what ECMA has blessed. I doubt we'll see ADO,
ASP.NET, System.Windows.Forms or a bazillion other APIs that you need to
write actually useful applications in ECMA anytime soon.
ECMA's specification is on the language itself and the core libraries. .NET matches the specification's behaviour. No reason for Microsoft to deviate, for the same non-reason Sun wouldn't deviate from the Java specification. And oh, guess what, everything that was standardised with ECMA was eventually also standardised with ISO. It's very much a standard like ISO C++.

I need ADO, ASP.NET, SWF to make useful applications? Really? I didn't know that. Lemme go check back on my C# projects. I don't use ASP.NET, SWF. I use GTK# or make my own libraries to support my own programs, as I would with Microsoft.NET or Java. There are plenty of useful C# apps that don't use Microsoft's proprietary stuff. Check out Beagle. Completely in C#. Very useful. Besides I can use the included free MySQL API (ByteFX.Data) for Mono to connect to MySQL without ADO.
Quote:
Originally Posted by Compile 'em all
Even if you're willing to go beyond ECMA and port the Microsoft proprietary APIs to other platforms, the fact is that System.Windows.Forms is absolutely NOT a cross-platform GUI toolkit. The Mono guys are implementing it by sucking in WINE! There is simply no Microsoft-blessed cross platform GUI toolkit for .NET.
Like the other guy pointed out, Mono doesn't use Wine anymore. And no **** SWF isn't a cross-platform GUI toolkit. Who said that? However, GTK#, QT# *ARE* cross-platform as they work fine on Mac OS X and Windows.
Quote:
Originally Posted by dernhelm
C# is write anywhere, but only run on windows.
Eh? Seems to work fine on my Linux boxen and Macs.
Quote:
Originally Posted by dernhelm
I've played with winforms on the latest mono and while it works in a "proof of concept" sort of way, too much is missing to be useful. You can get some hooks into XCode so C# applications are listed in the new projects dialog. That's kind of cool and works OK, but the last time I played with it, you had to fully build the entire "packaged version" or it didn't run. Debugging was all but impossible.
Huh? If it's just a CLI app, then it's just mono someprogramexe. If it's GTK# app, just use MonoDevelop. Debugging isn't a problem. Even for Cocoa apps done in C#--Console.log will catch them.

Winforms isn't intended to be used as a solution to do GUI. Microsoft's throwing away Winforms anyway. It's just nice to have if it was the only way to run a certain program for some weird reason. Mono is fully functional with GTK# and even in its early stages, Cocoa# is useful.

By the way, I just tested out Cocoa#. Seems to work well for an early version! Ported CurrencyConverter to C# and it works beautifully on my Mac.

Stop ragging on C# or mono just because it's mostly a Microsoft project. Would you rag on the GNU team because they're supporting Java in a free way similar to that of mono? Choice is *GOOD*.
__________________
The Mac Coaster
Quad Core Q6600 PC, 23" Apple Cinema HD LCD, White MacBook C2D 2.16 GHz, Athlon64 PC, AthlonXP PC, iPod photo 60 GB
MacCoaster is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Mac programming should be more like iOS programming. moonman239 Mac Programming 13 Feb 17, 2014 01:37 PM
General: Macthemes.net ... Gone? Dwalls90 Jailbreaks and iOS Hacks 26 Feb 6, 2013 08:48 AM
Gaypatriot.net glocke12 Politics, Religion, Social Issues 21 Jan 11, 2013 08:27 AM
Net 10 ?? TheBigKing iPhone 1 Oct 18, 2012 10:13 PM

Forum Jump

All times are GMT -5. The time now is 05:26 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC