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 :
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.
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.
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
.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.
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 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)
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
Programming Indigo: The Programming Model
Go check em out...
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 :-) )
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
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...