Today's entry will be short. I'll dump more out later.
System.Transactions
A way to use transactions in code. Can use SQL resources, or CLR resources. The general idea of a transaction is that if something fails in the transaction, then you can roll back the whole think w/o having made changes. For example, if you have this method:
Transfer(fromAccount, toAccount, mAmount)
{
fromAccount.Withdraw(mAmount);
toAccount.Deposit(mAmount);
}
You don't want to do the deposit operation if the withdraw operation fails. Yes, you could test for completion, and code around all scenarios that could happen, but you might miss something. Or if you use a transaction, you don't have to worry about it. You just enclose the Transfer method in a transaction (and the other two ops), and if any fails, then the whole thing is rolled back. This is a drastically simplified example...
Virtual Earth
You may have heard about MSN's competitor-in-waiting for Google Maps. It's called Virtual Earth, and it will come to augment the existing online maps and directions on MSN. Chandu Thota, whose blog I've been reading for a while, hosted this demo. It was cool to meet him in person.
It has pros and cons over Google's offering (yay for competition). One pro is that they are working on a CD version, that will augment their MapPoint desktop product. It will also eventually be added to their webservice offerings as well.
WinForms Tips and Tricks
Wow, this one blew me away. The presenter demoed new stuff in VS 2005. Seven of those items would have had a positive impact on one of our current projects. It's stuff we've had to either use 3rd party controls on, or write our own, or suffer with. Judge for yourself though, when I blog the full list next week.
Virtual Server Q&A
Just a couple of useful things I learned in this:
We have source VHDs of our Windows test images on our fileshare. But when a developer copies them down to their machine to run a software test, they have to remember to reset the machine name to something else before 'connecting' it to the network. Well, there's a tool called sysprep that you can run against the source image (once) before you copy it to the network share. It can do many things, but one of them is to put the machine in a partial setup state. So, when a developer copies down this image, and boots it up, it will prompt for a new network name and other stuff. To assist with license compliance, you can also have it ask for a new CD key. Another option is to have the developer run newsid on the machine before connecting it to the network. I like the first option---fewer points of failure.
Instead of using the Virtual Server Migration Toolkit to virtualize a physical machine (which is complex), one process that has worked for others is to sysprep the machine, image it with Acronis TrueImage, and then load that into the virtual host os. I don't have more details on this process yet, I'll have to hunt them down should we ever need to try it.
Finally, the defragger built into windows is supposed to be not too good. You could buy one ($$$$), or use Dave Whitney's.
Yay, I get to go home tomorrow!