Sunday, October 24, 2004

Mono is cool!

I recently built myself a new computer, and this thing is a beast. AMD Athlon64 3400+, 1Gb RAM, a bit over half a terabyte of SATA disk, Nvidia FX5900 with 128Mb VRAM, and other assorted goodies ;)
I am runnng 64 bit Gentoo on this machine, and it is blisteringly quick!

So over the last week or so I finally got some time to get Mono running. It was a bit of a challenge as the 64bit port of mono is fairly fresh (read need to get from CVS). I have however managed to get it build and installed and was able to test it by building a simple little hello world type console app.

The cool thing about using the 1.1.1 version from CVS is that it includes gcms, which is the new mono compiler for generics. So, I have had a quick play with generics with mono and I like!

So if you have a .NET runtime, what is the next thing your going to want? Yep, an IDE. I checked out a plugin for eclipse (which I use for my C/C++ coding) however all it really gave you was syntax formating. Coming from VS.NET I am a little spoiled and I really wanted tab completion. So I looked into monodevelop. Getting monodevelop to compile took a few goes getting the dependancies etc satisfied, however a day or so ago I managed to get it running and bliss! I now have code completion for 64 bit .NET (with generics support) all on my linux machine.


I am a happy camper.

Friday, October 22, 2004

DataSets - the fog clears

Well, I've been using datasets since I started using .NET about 3.5 years ago, but in the past few days I've learnt a few new things that I thought I'd share with you.

Datasets are not stored internally as xml. I guess I had always assumed that they were, probably for a couple of reasons. One; I think someone told me this early in my .NET experience; and Two, datasets handle xml so well it almost seems like a logical conclusion. Suffice it to say, I was wrong, and you can find out all the details
here.

Another point of dataset enlightenment I had is this:
Databinder.Eval is bad! Apparently ( and I must admit I haven't written any tests to prove this, although it does make sense ) using Databinder.Eval is about 20% slower than using explicit casting. This is because Databinder.Eval uses reflection to figure out what the type of the object in the container is that you are trying to display. So instead of doing something like this:

<%# Databinder.Eval(Container.DataItem, "MyItem") %>

you should do something like this:

<%# ((DataRowView)Container.DataItem)["MyItem"] %>

however if you do this, you will also need to add this line

<%@ Import Namespace="System.Data"%>

to the top of your html page , otherwise you will get the following error at runtime:

Compiler Error Message: CS0246: The type or namespace name 'DataRowView' could not be found (are you missing a using directive or an assembly reference?

You can find out more about this here.

First Post to my new blog!

Well, I thought it was about time I got my act togeather and got a blog going. I know I am a bit late jumping on this particular bandwagon, however I have just recently started reading a lot of other peoples blogs (particularly .NET related stuff ) and am find the experience very rewarding. I especially like the ability to syndicate content from blogs using RSS and have it all on my desktop in one nice easy to find location.

Anyways, this will be a place for me to write my random thoughts, and post any .NET tidbits I come across or dream up.

I guess a link back to my website is probably in order as well ;)