Archive for July 2008
Video: The best web stack in the world
This is the demo I made for the Microsoft Demos Happen Here competition. The criteria was that it had to be under 10 minutes, and show one or more of the features from the launch wave technologies – Visual Studio 2008, SQL Server 2008 and Windows Server 2008.
I chose to demonstrate PHP running on IIS7 using FastCGI, then integrating this with an ASP.NET application before finally load balancing the whole application between two servers in a high availability, automatic failover cluster.
I managed to do all that with 2 minutes to spare, so I think it’s pretty clear that Windows Server 2008 is the best web stack in the world.
Update 5-Sep-08: I won.
Tearing down the tents (and moving them closer together)
Being fairly focused on Microsoft technologies myself, I see a lot of the “us vs. them” mentality where you either use Microsoft technologies, or you’re part of “the other group”. Seeing Lachlan Hardy at Microsoft Remix was awesome – he was a Java dude talking about web standards at a Microsoft event. The more we can focus on the ideas rather than which camp you’re from, the more we’ll develop the inter-camp relationships and eventually destroy this segmentation. Sure, we’ll still group up and debate the superfluous crap like which language is better (we’re nerds – we’ll always do that) but at least these will be debates between the sub-camps of one big happy web family. (It’s not as cheesy as it sounds – I hope.)
What’s the first step in making this happen? Meet people from “the other group”!
The boys and girls at Gruden and Straker Interactive have put together Web on the Piste for the second year running. It’s a vendor neutral conference about rich internet technologies – so you’ll see presentations about Adobe Flex and Microsoft Silverlight at the same event (among lots of other cool technologies of course). These types of events are a perfect way to meet some really interesting people and cross pollinate some sweet ideas.
It’s coming up at the end of August, and I understand that both conference tickets and accommodation are getting tight so I’d encourage you to get in soon if you’re interested (Queenstown is crazy at this time of year).
And of course, yours truly will be there evangelising the delights of Windows Live as well as ASP.NET AJAX to our Flash using, “fush and chups” eating friends.
Will you be there?
Gotcha: Microsoft WebDAV Extension for IIS 7.0
Are you getting this error trying to install the WebDAV extensions on your Windows Server 2008 box?
The IIS 7.0 CoreWebEngine and W3SVC features must be installed to use this product.
It could mean that you tried to install the wrong architecture (x86 vs. x64). Noob.
(Of course, I haven’t just spent the last 5 minutes working that out.)
Video: ASP.NET MVC Preview 3
Last night I gave an introduction to MVC at the Wollongong .NET User Group. We had a bit of time at the end, so I also covered off Inversion of Control (IoC) and how it can be used with the MVC framework.
The talk assumed a working knowledge of ASP.NET, but required no existing knowledge about ASP.NET MVC or IoC.
You can watch it on Vimeo:
Tip: Watching on the actual Vimeo site instead of this embedded player will give you a bigger and clearer video.
Or download it as a WMV:
http://tatham.oddie.com.au/presentations/20080709-WDNUG-AspNetMvcPreview3-TathamOddie.wmv (64MB, 68min)
Event: Wollongong .NET User Group – tonight!
I’ll be at WDNUG tonight spruiking ASP.NET MVC.
ASP.NET MVC Preview 3
What is this whole MVC thing anyway? Tatham Oddie will demonstrate how to use the model-view-controller (MVC) pattern to take advantage of your favourite .NET Framework language for writing business logic in a way that is de-coupled from the views of the data. We’ll discuss the advantages to MVC on the web, the other frameworks that are available, and build an app with it – all in an hour.
If you live in our neighbouring southern city, come along.
See you all there.
Event: Code Camp SA 2008 – this weekend!
This weekend I’ll be scooting on down to Adelaide to take part in Code Camp SA 2008.
Now that Peter has posted the final schedule, it was high time for me to whip up an ICS feed:
webcal://tatham.oddie.com.au/files/CodeCampSA08.ics
As I’ve said previously, an event doesn’t actually exist for me until it’s lodged in my Outlook. I think I might have a problem in this respect.
Personal: Go Forth and Annoy
I don’t have a problem with 200,000 Catholics piling in to our city .
I do have a problem with any event that requires the writing of its own specialist laws to prevent undefined annoyances, and makes our city resemble somewhat more of a police state from one of Cory Doctorow’s novels than the free society it’s meant to be.
It’s the Iemma government who’s at fault here more than anyone else.
“Lord knows World Youth Day is appealing: it’s the chance to take on two decrepit authoritarian institutions for the price of one.” Julian Morrow, July 3rd
Update: Laws revoked in the federal court. Not because they were illegal, but because “[they] could not possibly have been the intention of parliament”.
Comparing byte arrays in C#, or at least, trying to …
Update 21st Sep 2009: Use the SequenceEqual extension method in LINQ.
For example:
byte[] array1 = new byte[] { 1, 2, 3, 4 };
byte[] array2 = new byte[] { 1, 2, 3, 4 };
bool areEqual = array1.SequenceEqual(array2); //returns true
Forgive me for thinking that in the following code two of the three evaluations should return true. They do not – they all return false.
byte[] array1 = new byte[] { 1, 2, 3, 4 };
byte[] array2 = new byte[] { 1, 2, 3, 4 };
bool result;
result = array1 == array2; // returns false (and should, because it’s referential)
result = array1.Equals(array2); // returns false (I think it should be true)
result = Array.Equals(array1, array2); // returns false (I think it should be true)
In my scenario I need to compare two arrays of exactly 8 bytes. Because of this specific length I can cheat a bit and convert them each to Int64 and then do the comparison:
bool result = BitConverter.ToInt64(byteArray1, 0) == BitConverter.ToInt64(byteArray2, 0);
Why isn’t this implemented at the framework level? It’s one simple method in the Array class:
[Serializable]
public abstract class Array : ICloneable, IList
{
public static override bool Equals(object obj)
{
Array array1 = this;
Array array2 = obj as Array;
// If the other object is null, of a diffent type, or
// of an array of a different length then skip out now.
if (array2 == null ||
array1.Length != array2.Length)
return false;
// If any of the elements are not equal, skip out.
for (int i = 0; i++; i < array1.Length)
if (array1.GetValue(i) != array2.GetValue(i))
return false;
// They’re both the same length and the elements are all
// equal so consider the arrays to be equal.
return true;
}
}
Does anybody know the reasoning behind this?
Update: Microsoft’s reponse is: "This is by design. Array.Equals() is just Object.Equals(), which compares the identity of the objects, not their contents. If you want to determine if 2 arrays have the same contents, you need to write a loop to compare the elements yourself." I don’t agree with that.



