Scott Hanselman

Mono and its many facets screencast

November 22, '05 Comments [13] Posted in Learning .NET | Screencasts
Sponsored By

Monoexample1I'm sure this has probably already been said, but I wanted to "put it on paper" as it were. I was showing a fellow at work a few things with Mono, and decided that the quickie demo I did was interesting enough that I should do it again. If you're not familiar with Mono, it's an alternative open source implementation of the CLI spec.

It's a compiler implementation and a library implementation and they can be use separately. What that means is that you can compile with Mono, run against their libraries, or you can compile on MSFT and run against their libraries...but where it really gets interesting is if you compile on Microsoft and run against the Mono libraries, or vice versa. This screencast demos a few of these scenarios.

In this demo I create an application from the command line, compile it with Mono and .NET, use Reflector on both and compare the resulting IL of both. Then I run them both and use Process Explorer to see what's going on at runtime.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by ORCS Web
Tuesday, November 22, 2005 7:19:19 AM UTC
amazing!
Tuesday, November 22, 2005 9:17:58 AM UTC
Very nicely done, sir! I especially liked the IL comparison.
Tuesday, November 22, 2005 10:00:11 AM UTC
Mono is an excellent project and I was following it for quite a while. The problem I have found with it is the lack of support for WinForms and the rest of the non-Code libraries. Some people had implemented ASMX last time I looked but there was still a lot to do.

The power of the .Net frameworks comes from the combination of the sdk, the runtime and the libraries. I think that those libraries are a massive piece of the puzzle and a similarly massive amount of work to implemnt. (Just have a quick read of Brad Abrams SLAR, if you can :P).

I've checked back recently and WinForms seems to be making progress but do you think that the project has enough momentum to drag it into .Net 2.0?
Tuesday, November 22, 2005 2:58:32 PM UTC
Well done! What sort of differences did you find in the assembly manifests?
Tuesday, November 22, 2005 3:30:55 PM UTC
Hi,

I'm glad you've tried and showed this sample of Mono. The comparison of the IL code generated, altough quite simple in this case, is a point I haven't tried before.
Other nice show would be cross-platform compiling and execution.

For Jan, you can get more info in http://www.mono-project.com/Mono_Project_Roadmap and http://tirania.org/blog/archive/2005/Nov-17.html

Scott, is just great to keep options "open" :P

Regards

Martín Trejo
Tuesday, November 22, 2005 4:08:01 PM UTC
A little more than a year ago I got interested in Mono. So I wrote a quick console app that would read some stuff from an Xml file and a SQL Server. Then it would output that data.

I compiled it on my linux box, ran it under mono, and it worked flawlessly.

I then FTP'd the executable to my windows box, and ran it - again, it worked as expected.

I was very enthused at the time - but later lost interest - because at the time ASP.NET support was pretty spotty.

So...I think a great blog idea for you would be to do a screencast showing off ASP.NET stuff under mono. Maybe create something on windows and then deploy it to your mac mini?

If I can successfully get Mono running on my SGI Octane I will try and do the same thing :)
Tuesday, November 22, 2005 4:38:32 PM UTC
I've played with Mono on Linux, not on my Mac yet. But the possibility of multi platform is exciting to me. I shall try to run .NET code on my eMac during the Thanksgiving days! hehe
Tuesday, November 22, 2005 6:02:58 PM UTC
Great demo, I've been tracking Mono for a while as well. Good to see someone make a nice example.

Question for you: What software are you using to do the screencasting?
patag
Tuesday, November 22, 2005 6:40:38 PM UTC
Just a quick remark: From what I could see in the screencast, the file whose IL you saved in monoil.txt is actually testmsft.exe. Take a look at it once again: You drag and drop both files, realize it didn't work because they had the same original filename, then drag testmsft.exe only and save its IL as monoil.txt.

Great screencast, though. Mono is really a great piece of software.
Maurício
Tuesday, November 22, 2005 6:49:41 PM UTC
Maurício, ya, it LOOKs like that because Camtasia only goes at 10 frames a second. I actually noticed that after the fact and triple checked in. It looks like it in the screencast, but I actually checked the source movie as well as doing it twice more. I should probably do it again and compile to a different "original filename" as most folks don't realize that assemblies remember their original names.
Tuesday, November 22, 2005 10:06:27 PM UTC
Your voice is much different than I anticipated, however excellent clip I actually learned alot. I had no idea you could compile with MS Compiler and still use mono, I found that very interesting...I guess it makes sense though, I gave mono a try a long time ago when it was still in development and was less than impressed with it, very very slow and buggy when I tried it. Looks like I should revisit it however!!

Tuesday, November 22, 2005 11:01:14 PM UTC
Eric...Hm...I guess I'll have to work on my voice overs.
Friday, February 17, 2006 1:16:42 PM UTC
Good Lord, clean up your desktop.
Theo Tunracck
Comments are closed.

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.