July 2005 - Posts

ASP.NET Podcast - Show #8 - Darren Neimke Interview (Downunder Edition)
Sunday, July 31, 2005 11:32 PM

The ASP.NET Podcast Show #8 has just hit the streets. (Downunder Edition)

It contains an interview with Darren Neimke, creator of products like Project Distributor and most recently Single User Blog.

The show contains :

  • Tech Talk on Asynchronous Client Callback Scripting in ASP.NET V2
  • Darren Neimke Interview covering:-
    • MVP and ASPInsider status - how did you get there and whats it like?
    • www.regexlib.com - How it came about and porting it to .Net V2. Lessons learnt.
    • Project Distributor - How that site came about, whats it for etc.
    • Recent tour of Australia and New Zealand talking about IBF. What is it, where is it going?
    • Single User Blog - Darrens latest project.
    • Favourite .Net V2 feature.
  • Programmers Pastime (new segment) - Movie Review of office Space by Wally McClure

You can download it here (http://www.dotnetexamples.com/aspnetpodcast20050729.mp3)

We'd love your feedback. Want to hear someone or something in particular? Let us know.

by Glav | with no comments
Working on a book about AJAX
Friday, July 22, 2005 10:16 PM

You might have already seen a post from Wally about a new book that Wally, Scott Cate and myself will be working on about AJAX and related technologies. I am really pumped about this and am looking forward to writing about all things AJAX.

This technology itself might not be new, but it sure is getting a lot of attention right now and there are lots of different flavours. This book will talk about some of that juicy goodness, and also some upcoming, mouth watering goodies too. The time appears to be ripe for this technology and some really good support around it.

It is going to be great working with such talented people as Wally and Scott. I am sure I'll learn a great deal from them. 

Creating Custom FXCop rules and altering existing ones - Part 2
Tuesday, July 19, 2005 7:19 PM

In my previous post, I talked about creating custom FXCop rules for the latest (1.32) versaion of FXCop and a template/example project library that I have made available to ease that process.

What I also needed to do was to alter some of the Microsoft supplied rules. In one specific instance, I wanted to completely disable, or remove the 'CompoundWordsShouldBeCasedCorrectly' rule that is contained within the 'NamingRules.dll' assembly that comes shipped with FXCop 1.32. This rule complains about things like the word 'WebPart', and that it should be 'Webpart' instead. Personally, I dont like the rule, and it just adds confusion and clutter to the analysis report. Sure you can exclude this *after* an analysis run has completed, but I wanted to be able to ship a set of rule assemblies, and simply have the rules applied that I wanted *without* the user having to exclude specific rules.

To do this, I did the following:

  • Loaded the 'NamingRules.dll' into ILDasm, and produced a 'dump' of the IL code to a text file (*.il file)
  • Loaded the file into notepad and removed the offending rule and any references to the rule from the IL code. The IL Code looked something like this :

.class private auto ansi sealed beforefieldinit CompoundWordsShouldBeCasedCorrectly
         extends Microsoft.FxCop.Rules.Naming.NamingIntrospectionRule
  {
    .field private static initonly char[] s_parseCharacters
    .field private static class [FxCopSdk]Microsoft.FxCop.Sdk.CaseInsensitiveDictionary s_exceptions
    .field private static class [FxCopSdk]Microsoft.FxCop.Sdk.CaseInsensitiveDictionary s_shouldBeCompound
...rest of code....

  • As you can see, IL code is actually realtively verbose and you dont require a huge understanding of it to simply highlight sections and remove them.
  • Next I removed the 'publickey' entry from the IL. Each rule assembly provided with FXCop is strongly named, and altering it then recompiling it without removing the strong name/public key, means it will fail when attempted to be loaded as the CLR detects that it is strongly named, however the public key token is invalid due to the modifications we have made, and a load failure occurs. The IL code for the public key token looks like:
     .publickey = (00 24 00 00 04 80 00 00 94 00 00 00 06 02 00 00   // .$..............
                    00 24 00 00 52 53 41 31 00 04 00 00 01 00 01 00   // .$..RSA1........
                    B5 FC 90 E7 02 7F 67 87 1E 77 3A 8F DE 89 38 C8   // ......g..w:...8.
                    1D D4 02 BA 65 B9 20 1D 60 59 3E 96 C4 92 65 1E   // ....e. .`Y>...e.
                    88 9C C1 3F 14 15 EB B5 3F AC 11 31 AE 0B D3 33   // ...?....?..1...3
                    C5 EE 60 21 67 2D 97 18 EA 31 A8 AE BD 0D A0 07   // ..`!g-...1......
                    2F 25 D8 7D BA 6F C9 0F FD 59 8E D4 DA 35 E4 4C   // /%.}.o...Y...5.L
                    39 8C 45 43 07 E8 E3 3B 84 26 14 3D AE C9 F5 96   // 9.EC...;.&.=....
                    83 6F 97 C8 F7 47 50 E5 97 5C 64 E2 18 9F 45 DE   // .o...GP..\d...E.
                    F4 6B 2A 2B 12 47 AD C3 65 2B F5 C3 08 05 5D A9 ) // .k*+.G..e+....].
  • Once that is removed, save the file, then run it through the 'ilasm' tool to recompile the IL code into a valid assembly.
  • Copy this new assembly into the FXCop rules directory (keep a copy of the old assembly but remove it from the directory) and thats it. The rule we removed will never be executed as its simp not present.

This process sounds a little difficult or complex, however it took me approximately 20 minutes to remove 1 rule. Not a big deal really and now I can ship the rule assemblies I want, and overwrite those currently shipped with FXCop to get exactly the set of rules I intend, and only those rules.

Creating Custom FXCop rules and altering existing ones - Part 1
Tuesday, July 19, 2005 6:57 PM

Recently I needed to create a set of custom FXCop rules and started playing with the latest version, which is currently 1.32. It quickly became apparent that things were not as easy as taking a quick look at the SDK, implementing an example, modifying to suit and away we go. For a start, most of the documentation still revolves around the old 'Reflection' engine, and the current version uses a new 'Introspection' engine. So that fact, and I imagine a couple of others, means the API has changed from previous versions. Recently, John Robbins wrote a bugslayer article on writing custom FXCop rules for version 1.30.

Things have changed slightly in the 1.32 release, however the article still proved quite useful. With a combination of that, and the trusty old 'Reflector' tool, I was able to come up with a decent, easy to use, re-useable project template that contains:

  • Simple example custom rules
  • Empty rules to use as a template for creating new rules
  • Easy to use abstract base class from which to base all custom rules from.
  • A correctly structured 'rules.xml' embedded resource file complete with example entries, and comments to aid you in creating new entries. This file contains the required <rule> node entry for each custom rule that in in the project.

The project is available here ( http://www.theglavs.com/GlavTech/Downloads/CustomFXCopRules_WhidbeyCode.zip ) and has been developed using the current Beta 2 of Visual Studio.NET (Build 50215.45). The code is easily ported to .Net V1.1 if so required (you should only need to change one class file that uses a static class 'Constants.cs'). All assembly references are included in the ZIP file.

If you are writing custom FXCop rules, then it will save you a considerable amount of time and make things super easy.

I also wanted to alter some of the Microsoft supplied existing rules. I know you can exclude them *once* you have perfomed an analysis run, but I wanted to completely disable/remove a rule at the outset. For that little story, you'll have to read my next post....

Update: I have created a .Net V1.1 / VS.NET 2003 version of the Custom FXCop rule template project mention above. It can be downloaded from here ( http://www.theglavs.com/GlavTech/Downloads/CustomFXCopRules_VS2003.zip )

Another ASP.NET Podcast - Rob Howard Interview
Saturday, July 16, 2005 12:26 AM

Another ASP.NET podcast has hit the streets, this time an interview with Rob Howard, by Buddy Lindsey.

Download it here. Subscribe to it here.

Or check out the main post here.

Please bear with us if you are having slow download/bandwidth problems. We will be resolving this soon.

Update: The download link above is now fixed. Apologies for the bad link (thanks to Keyvan Nayyeri for pointing it out)

Programming Indigo - Sample Chapters
Tuesday, July 12, 2005 11:42 PM

There are 2 sample chapters from David Pallman's upcoming "Programming Indigo" book available on MSDN that are very interesting and informative.

Programming Indigo: Contracts

and

Programming Indigo: The Programming Model

Go check em out...

by Glav | with no comments
TechEd 2005 Australian Agenda Posted
Tuesday, July 12, 2005 11:43 AM
I notice Charles Sterling has posted an agenda for the Australian TechEd this year on his blog. For those interested Aussies, go and have a look. I am listed as doing a presentation with Dave Glover which is the very last one on the last day of the conference. Looks like we'll have to come up with something special to keep people entertained seeing as its at the very end. Maybe we could both shave our heads and..... oh wait, we have already done that. Hmm, gotta think of something else...
by Glav | with no comments
Warning: VPC and Hibernate mode
Sunday, July 10, 2005 6:06 PM

I was doing a presentation for the Sydney Deep .Net User Group (SDNUG) last thursday on the Asynchronous Client Script callback features in ASP.NET V2.0 and had some interesting problems using Virtual PC.

I had the presentation stuff ready to go, I was running on battery (but had heaps of power left), loaded up my presentation and the VPC image with my demos on it all ready to go. I went into "Hibernate" mode on my Dell Inspiron 6000 and waited for my time to come around. I started doing the presentation and all was going well until I tried using VPC to show the demo. No image was being displayed in the main window. Itried restarting the VPC and the VPC console but it simply would not display anything in the window (although it was definitely loading). I ended up having to reboot the PC in the middle of the presentation and moving along the presentation as best as possible while this was occurring. Once rebooted, all was ok, it just took a long time and caused dead time in the presentation.

I dont know if this problem is specific with my machine or Dell's in particular, but this is simply a warning. Load up the VPC from scratch, or dont go into "Hibernate" mode with it running if you are doing a demo/presentation.

The presentation went well apart from that little hitch. Normally I would start to sweat and stuttuer but I kept quite calm and collected so my presentation skills are obviously improving (I hope :-) )

Architecture, SOA and other fun things...
Monday, July 4, 2005 3:19 PM

Just found an interesting article by Scott Bellware on architecture insights from TechEd 2005. All the big names seem to be present and speaking about different aspects on architecture and how SOA affects this landscape. Chrsitian Weyer, Ingo Rammer, Ted Neward, John deVadoss  and a host of others are here. Its apparent that there is still a lot of discussion around the right way to do things in and around the fact that you have the potential to achieve similar outcomes (interface layered architectures, autonomous services, etc...) by the various technologies we have now. Its interesting to note the contention around some topics by some of the industry heavyweights themselves.

I encourage those interested in the Architecture/SOA scene to have a look.

Article is here http://www.theserverside.net/articles/showarticle.tss?id=ArchitectureInsightTechEd05

by Glav | with no comments
Google Earth
Sunday, July 3, 2005 5:02 PM

I have been playing with the Google Earth application for the last few days, and I am absolutely blown away. This may be old news to some, but this app is just absolutely fantastic. Consider that you can literally search anywhere in the world, AND zoom in to unbeleivable levels of detail, all for FREE ! 20 years ago, this would have been something we could only dream about (from an average consumer perspective)

This is one of those apps that just reeks of a killer application. Why? Well apart from the reasons I have mentioned already, its an app that my 14 year old son AND my relatively computer illiterate wife love to use. You can just get lost looking around the entire world, all from the luxury of your computer.

The implementation is good, the interface pretty good, the provided level of detail for most areas is good. I am assuming you probably get more with the version you pay for.

At any rate, its just great. Google have been innovators for some time now, but this one is a real standout from my perspective.

I am heading back to look at the Grand Canyon, then Big Ben, and then later might head off to Niagra falls...

 

More Posts

This Blog

Syndication