January 2005 Entries
Exception Handling Application Block in Enterprise Library

I have to admit, I was under-whelmed in my first pass over the documentation for the new Enterprise Library. After all the hype, I expected to see more dramatic differences in functionality. My first impression was that the changes were mostly in refactoring the existing blocks. However, as I started to take a deeper look, features started to pop out at me. For example, the new Exception Handling Application Block.

The new Exception Handling Application Block goes way beyond the old Exception Management Application Block. There are three main concepts to understand in this block:

  • Exception Handling
  • Exception Logging
  • Exception Policies

Exception Handling is the process of doing something with an exception when it is detected/caught by your code. There are three things you can have EHAP do to handle an exception. You can wrap the exception in a new exception to add new context information or detail. The original exception is still available as the InnerException when the new exception is propagated up the call stack. Second, you can replace the exception with a new exception. Do this when you don't want the details of the original exception to be propagated across an application boundary. The third thing you can do is log the exception. Of course, you can do this in combination with wrapping or replacing the exception, or you can log the original exception and propagate the original up the call stack.

Exception Logging makes use of another block, called the Logging and Instrumentation Application Block, to send formatted exceptions to the event log, an email message, WMI and several other targets. This alone gives us more options than what we had with the old block.

Finally, the component that really makes this particular block “hot” (yes, unfortunately, I did watch The Simple Life this week) is the Exception Policies. This allows you to define the way exception handling and logging works using external configuration files instead of baking the rules into your code. In other words, you can define the exception handling in a policy file and then change the behavior for different testing, debugging and production scenarios without changing your code. Your administrators can manage the policy file themselves to make your application more secure by hiding sensitive information from users during an exception. Or they can define policy to produce additional information for consumption by management applications such as Microsoft Operations Manager.

The basic pattern to integrate your code with this block is documented as the following:

try
{
  // run code
}
catch(Exception ex)
{
  bool rethrow = ExceptionPolicy.HandleException(ex, "General Policy");
  if (rethrow)
  {
    throw;
  }
}

Pretty simple. The Exception Handling Application Block in Enterprise Library is definitely something to dig further into as it provides a lot of new functionality that did not exist in the old Exception Management Application Block. It also provides the flexibility to create a robust application that you can still monitor and debug without exposing too much detail to the outside world.

Second Day of .NET in Columbus, Ohio

Registration for the second Day of .NET in Columbus, Ohio is now open. The event is on Friday, February 25th. This is a repeat of the content we did at the previous Day of .NET on January 21, 2005. Hopefully, this time James Avery and Steve Caravajal can make it.

Get more information at http://www.dayof.net.

Register at http://www.dayof.net/Register.aspx.

See you there!

VSTO 2005 Presentation

I gave a presentation to the .NET Developers Group in Central Ohio tonight on Visual Studio Tools for Office 2005. It went pretty well, except for two rude<jk> people in the audience (not mentioning any names...uh...Dave Donaldson and Brian Prince). They let me know exactly when I said something very stupid, which actually happens quite often. Tonight it is was me telling people that I had 500mb (instead of 512mb or 1/2gig) of memory in my computer and that someone “more smarter” should be giving the presentation, among many others I'm sure.

VSTO 2005 just plain rocks. It is absolutely cool as a developer to have a design surface on top of Word documents and Excel documents. Place whatever managed controls you'd like on that surface and do databinding on things like the cells in an Excel document. Way cool, and that's only a small part of the whole experience. It should be exciting to see more developers building smart client applications built on VSTO 2005.

In the meantime, if you happen to give any presentations in Ohio and meet two guys holding hands with identical goofy smiles, don't let them sit together. Or, don't say anything stupid. :)

Hina Matsuri

We received a special package from our family in Japan today. It is our Hina-Ningyo set - a set of beautiful Japanese dolls that we will display until March 3. Our set is pictured at the left. Its beautiful! We couldn't believe it made the whole trip and was still in great condition.

March 3 is a holiday in Japan called Hina Matsuri. It is also called Girl Day and is a day that Japanese families with young daughters celebrate to ensure their daughter's future happiness.

I'm not sure what all the different elements symbolize yet. I know the blossoms symbolize a future happy marriage for our daughter. The two dolls represent the emporer and emporess in beautiful costumes.

Of course, one of the best parts is that we get to drink sweet sake and eat one of my favoriate dishes, chirashi sushi.

 

Day of .NET a Success

We had our first Day of .NET in Columbus, Ohio this past Friday. It was a great success and a lot of fun! We had right around 100 attendees and the room was packed. Check out the pictures here.

I delivered my “Building Web Services” presentation. I decided to not use slides this time since our sessions were only about 50 minutes in length. The presentation goes through the concept of a SOAP envelope and shows how the protocols compose together by starting with a basic ASMX service and moving to WSE, adding addressing and security headers. The feedback on the evaluations was very positive - I was really pleased for my first presentation with no PPT deck.

We had two speakers not show due to the snow storm smacking the Midwest at the time. So, Alex Lowe and myself delivered two replacement sessions. Alex did one on Team System that he delivered earlier in the week and I polled the audience to pick a topic and prepared some content that morning.

The audience picked ASP.NET server controls as the topic, so I pulled together a quick demo and some talking points. My demo started with a server control that had every event in the excution lifecycle overriden so we could trace the lifecycle. I had the audience put the events in order first and then ran the debugger to have it stop at each event. I think they had fun with that. I had mixed results with the rest of the demo as I was having some brain freezes on how to handle post back events and post back data. Still, the feedback was pretty good.

As for logistics, I think we did pretty good for our first event. One big mistake we made was not having coffee and some snacks in the morning and afternoon. We ended up brewing as much coffee as we could using the normal office coffee maker, but we couldn't keep up. Another issue we had was controlling the temperature in the room (it was a little cold due to the weather outside), but there's only so much we could do there.

Many thanks to the other speakers who made it: Alex Lowe, Dave Donaldson, Ben Carey. And the speakers who tried there best to make it through the snow: James Avery, Steve Caravajal. Also, Dave and Alex for all the work they did to help organize the event. Thanks to Eric Maino for taking all the pictures and to Brian Prince for helping out with logistics during the day. And thanks to NuSoft Solutions for feeding all those mouths.

.NET Celebrity Auction for Aceh Aid at IDEP

Go bid on Ebay for the .NET Celebrity Auction and support the continuing relief efforts in Asia to help victims of the Tsunami.

Big Surprise in Small Business Server 2003

Once upon a time, I was an infrastructure man and I spent some time in the trenches supporting Small Business Server (SBS) for small businesses in the Columbus area. I can remember wrestling with the SBS administration consoles and feeling like the interface was making tasks harder even though the purpose was to make tasks easier. The cause was probably that I also spent plenty of time supporting enterprise networks on full versions of Windows NT 4.0 and Windows 2000 and knew exactly how to accomplish those tasks using the advanced tools.

You might think that you could simply use the advanced tools on SBS and be done with it. And for some purposed you could. However, I would consistently run into scenarios where I used the advanced tool to accomplish something, but then found that I broke the SBS console or placed it out of sync with the rest of the system. To be honest, I don't remember all the details - I just remember the bad experiences.

So it was with much reluctance that I chose SBS 2003 as the operating system on a recent server purchase that I made. However, I've been working with the server for a couple days now and I am very surprised. The Server Management console is much improved. They've really done a great job of providing wizards and easy-to-use interfaces while not disabling or even hiding the advanced tools. Upon installation I have easy access to my email through Outlook 2003, Outlook Web Access and Mobile Access! I was able to modify recipient policies using the advanced tools in Exchange without breaking the User creation wizard in SBS Server Management.

The installation also created a Windows Sharepoint Services site for me and setup all of the remote access and security policies need to get to my information from the road.

This is a great tool that I can now recommend to people with confidence.

AntiSpyware Alert

I installed the new Microsoft AntiSpyware Beta yesterday. This morning, this great alert popped up when I tried to drag Trillian into my Startup menu. I wish I had this application when I installed Quicktime on my machine. There are a few things I would have declined.

Is Client-Side Scripting the Next Big Thing?

After listening to a few conversations and a discussion I had with a recruiter today, I can’t help but wonder if client-side scripting will be the hot topic of choice for this year. I know it has been around since early versions of web browsers, but let me explain.

If you’ve been watching Google, you know that they have released several new projects that go beyond simple web applications. Notably, there was Gmail. If you haven’t already heard, Gmail is Google’s free e-mail service that people have been raving about. There is also a new Google Suggest service that was released to the web a few weeks ago.

Both of these services from Google use client-side javascript to enable a rich user experience. It’s nothing new – Microsoft has a great rich user experience in Outlook Web Access, the web browser interface to Exchange e-mail. However, Google is getting more attention than other services for the simplicity, yet richness of their approach.

Enter this new competition between Google and Microsoft (ie. the new desktop search race) and you have many alert business people looking at Google to see what they are doing. And wow, does Google have a lot of momentum these days. First, it was the IPO, then all these product releases and now all I hear about is the great 60 minutes interview that aired the past week or so.

As people begin to emulate what Google is doing, I think they will see that rich user experience within the web browser as the key advantage. How will they go about implementing that experience? Either client-side javascript or Macromedia Flash. Which explains why the recruiter told me she was getting a surprising increase in requests for Flash development/scripting experience.

It will be interesting to see how ASP.NET applications fit into this revitalized world of client-side javascript. If you are vendor of rich web controls, this is your year.

I didn’t expect to be so excited about it, but now I’m really looking forward to Steve Caravajal’s (MAX Training) session on client-side scripting at the Day of .NET.

Day of .NET Sold Out

Wow! 36 hours after we advertised and blogged about the event, all 120 seats for our Day of .NET are filled up. It's safe to say there is some demand for .NET training in Central Ohio.

We're already discussing what we'll do for a second event, so stay tuned.

Day of .NET in Columbus

A group of us are putting on a Day of .NET presentations in Columbus free to the the public. Here's the description from Dave Donaldson:

Want to be a part of an ever-growing .NET developer community? Want to get knee-deep into code with some of the area’s technology leaders? And do you want it for free? Well, your opportunity has arrived with the first ever Day of .NET in Columbus.

The event will be held at the Microsoft office in Columbus, Ohio on Friday, January 21, 2005 (yes, this is a little short notice... sorry about that). This is a day-long experience with sessions built around showing you code to enhance your knowledge of the .NET development platform. These sessions are more demo-focused than slide-focused to expose you to the ins and outs of writing .NET code. You’ll also see an in-depth preview of some of the less talked about features of Visual Studio 2005, such as ADO.NET 2.0 and WinForms 2.0.

So what are you waiting for? The entire day is free, lunch is free, and there will be some cool software giveaways. Seating is limited, so register today.

So if you are in Central Ohio and want to get some great .NET information, register here.  Dave's done a great job of pulling together the sessions and bios from our speakers - you can read about the content at his blog. I'm looking forward to Ben's session on Test Driven Development.