.Net Technologies

August Reading Materials from .NETLand

People often ask me how I know so much. I tell them I am divinely inspired, but that is a lie. The truth is I read a lot. Possibly too much. And probably should get out more and see the sun or somesuch. But I hate the big blue room with a passion.

Part of the reason I read so much is that there are a lot of .NET resources on the web. But the signal to noise ratio can be a bit low at times. In any case, I thought I would share some recent items as well as some of the regular sources:

So that’s what I’ve been reading recently. Enjoy. And kick me or something.

New Toys: Sandcastle CTP & July Atlas CTP

New this week from Microsoft:

  1. Sandcastle is Microsoft’s newly released tool to compile the Xml comments from your .NET 2.0 code into usable .CHM files. Apparently it is a tweaked version of the tool used to generate the MSDN documentation for Visual Studio 2005. You can download the CTP directly from Microsoft. For more information, the best place to start is the Sandcastle team blog, especially the tutorial and the FAQ.

    As of right now there is no UI for the tool, but some enterprising individuals have created a Sandcastle batch file builder tool that and a MsBuild script to help integrate Sandcastle into your development cycle.

Regulazy—Regular Expressions for the Rest of Us

I have been working on admitting my weaknesses lately. And one of them is I really, really suck at writing regular expressions. I don’t think I have ever ginned anything more complicated than a “make sure this is three digits” expression from scratch. And I even forgot how to write that expression as I was writing this post.

Fortunately, there are smart people in this world who can help me out in my struggles. One of them is Roy Osherove, a longtime contributor to the .NET community. Many moons ago he wrote The Regulator, a handy regular expression generation IDE.

Enterprise Library Tips & Tricks

Last week, Microsoft’s Patterns & Practices team released Patch 2554 for the Enterprise Library 2.0. The main point of this patch is to allow one to use the library in partial trust mode—which is a common scenario with web applications in these dangerous days.

I have been using the libraries quite a while, so I thought I would share some tips and tricks about using the code that I found were not particularly well documented nor advertised.

Trick #1: Get the Libs, Man

There are two current versions of the Enterprise Library: Version 1.1 (aka June 2005) for .NET 1.1 and Version 2.0 (aka January 2006) for .NET 2.0. Download as appropriate & desired.

Project Glidepath

Project Glidepath is a new initiative from Microsoft aimed at helping Micro ISVs develop software for .NET 3.0 and Windows Vista. All the information is delivered via RSS as workflow guidance directly into your Visual Studio project. As well as technical advice, there are Glidepath modules to help you with the practical business side of your Micro ISV. The content tries to help you choose software protection or eCommerce providers, and guide your blogging and podcasting strategies.

.NET and Excel Importing

A quick tech tip this week, it’s not ground breaking, it might not even be new to many of you, but it really helped me out. I was looking to buy a component to add a simple Excel import facility to a project, and I had one of those "d’oh" moments.

Amongst all the components for sale, there were search results about using Jet, ISAMs, and OLEDB. I’ve used Office and Jet enough in the past to know that it makes reading an Excel file a straight forward process, but somehow I hadn’t realized that I could do it just as easily using OLEDB from a .NET application.

Learning Design Patterns – Iterator Pattern

This week I'll be stepping through the Iterator Pattern in my series on design patterns plucked from this book and from examples on the Internet.

What is it?
The Iterator Pattern encapsulates the functionality for stepping through a collection of items. The iterator object implements the stepping; the aggregate itself does not step through its own collection.

The pattern generally has a few of methods like first(), hasNext(), Next(), isDone() in some combination. In some programming languages it is possible to step through an iterator using a For Each item in Aggregate....<code>....Next type of construct.

Where is it used?
Anywhere there is a group of items. An array list is a common example; an iterator would step through the array items until the end of the collection was reached.

Learning Design Patterns – Template Method Pattern

This week I'll be examining the Template Method Pattern in my series on design patterns plucked from this book and from examples on the Internet.

What is it?
The Template Method Pattern lays out the steps in a process (algorithm) and allows subclasses to handle one or more of the steps internally. The pattern has a method that just contains a list of method calls to complete the process (create something, package it, sort it, deliver) that can not be overriden or augmented. Some of the process methods may be handled by the pattern (create something and deliver), while it makes the subclasses handle the others (sort it, package it).

Learning Design Patterns – Facade Pattern

This week I'll be simplifying my life with the Facade Pattern in my series on design patterns plucked from this book and from examples on the Internet.

What is it?
The Facade Pattern simplifies a complex interface so that it's client can rely on simple methods in the facade that handle multi-step calls to subclasses. The client might call facade.PowerUp, then the facade would turn on all of the subcomponents in the correct order and adjust their initial properties.

Learning Design Patterns – Adapter Pattern

This week I'll be switching over to the Adapter Pattern in my series on design patterns plucked from this book and from examples on the Internet.

What is it?
I remember when I was about 6 I was helping Dad replace a section of board-fence with chain-link fencing (by helping, I mean I was standing there picking my nose and asking him inane questions). He had taken the old fence out, which left three round holes in the ground where the fence posts were. Maybe to quiet me, or maybe just because he enjoys being ornery, he asked if I could explain how those square fence posts had fit into the round holes we were staring at. That question stumped me for years (I blame that on all the lead buckshot I ingested from the pheasants Dad hunted), but now I see that the Adapter Pattern is the answer (or not, but it makes a good story, right!?)