Category Archives: Mono

A good new years gift…

My day job keeps me housed in Visual Studio 2010/Windows, so for my out of hours development I feel I need a change, so for many years I have been a home mac and/or linux user; anyway I have used many languages over the years but I feel more comfortable using C#, so my development environment of choice is monodevelop.

Last week I was lucky to get onto the MonoDroid beta, I thought of it is New Year gift from Mono/Novell guys…

So last week I started to playing with it…. its fun… and I think its going to be fun ride using Mono, C# and Android. With phone such as my nexus one and the recently announced Droid Bionic (2GHz dual-core processor, 512mb) it really means that we can start to put some quite computational intensive applications on these devices, plus having access to a quick database such as sqlite makes life easier… now what should I do with it?

Attachmate acquires Novell for $2.2 billion

Over the last decade I have gained quite a lot of respect for Novell mainly due to their SUSE Linux platform and Mono.

Strangely one of the companies involved in the acquisition is “Golden Gate” from San Fran, looks like it is the same company that also help us “Micro Focus” become liberated from Merant back in late 2001… if it is then Novell… sorry “Attachmate” have a really good chance.. Gosh.. its a small world..

I really hope that their fortune changes under the new leadership of Attachmate… anyway good luck old Novell..

http://news.cnet.com/8301-30685_3-20023535-264.html

http://www.sec.gov/Archives/edgar/data/758004/000119312510265964/d8k.htm

http://twitter.com/migueldeicaza/status/6732038669340672#

Java… does it have a future? Well not for me..

As someone who has used Java for my own development needs for years, I find it sad the Java platform appears to be falling apart or at the very least getting some bad press.

Lets consider the recent events, we have Oracle flexing it muscles and suing google over it use of Java on its android platform, IBM moving over to OpenJDK which does not help the chances of Apache Harmony ever getting license. Apple is dropping Java on the desktop… a loads of security flaws… The JCP process seems to failing.. which is a shame since at one time I was part of the JCP process when I worked in the J2EE connector group and the people I worked with where very good and dedicated to doing the best for the platform.

Come on Java get your act together…. or you will start to use customers… starting with me…

I think Java has lost it’s excitement for me, so I been on my own personal quest to migrate my own tools, classes into .Net… after all its going somewhere…

I have nearly complete my own migration.. using a combination of ikvm, reflector and bit a of patience.. so far it has worked quite well… the upside is I really like mondevelop over eclipse.. it just feels more friendly and yes I do understand eclipse has a lot more powerful but I’m just a developer working on my home time.. I just don’t need the baggage that eclipse or java brings… for work use perhaps… but for home… forget it.

Next stop the iPhone, iPad, iPod touch, WII, Xbox and Android using mono… I might even have a fiddle with Windows phone 7 after all its .Net.. now what language should I use… ahh it doesn’t matter… its .Net.. ummm nice…

Detecting the use Mono CLR dynamically

While developing something that could be used on Mono on Windows, Mono on Unix and on Windows with Microsoft’s CLR, I needed to be sensitive to the environment but didn’t want to conditionally compile my code different. So I put together a quick class to help.. Below is the C# code with pics of it running on Windows/Mac…

using System;
using System.Reflection;

namespace Gennard.Net
{
    public class CLRUtils
    {
        private static readonly bool isMono= Type.GetType("Mono.Runtime") == null ? false : true;

        private static readonly int eOSp = (int)Environment.OSVersion.Platform;
        private static readonly bool isUnix =  (eOSp == 4) || (eOSp == 128);

        /* Class Properties */
        public static bool IsMono { get { return isMono; } }
        public static bool IsUnix { get { return isUnix; } }

        public static void Main()
        {
            Console.WriteLine("Are we using Mono? : "+IsMono);
            Console.WriteLine("Are we using Unix? : "+IsUnix);
        }
    }
}

The taste of the pudding mix.. is in the eating.. so lets see it working…

On Windows....

On the Mac, we get....