Patterns

Design Patterns

Remoting Singleton Is Monostate By Default

What do you call a Singleton that does not prevent more than one instance from being created? I call it confused. That is precisely what I was upon discovering the default effect of WellKnownObjectMode.Singleton in .NET Remoting. As I worked around this default behavior I realized my discovery and solution would be useful to others. This post discusses the differences between Singleton and Monostate, proves why a Remoting Singleton is Monostate by default, and shows how to design a true Singleton for .NET Remoting. It also includes several unit-testing tricks along the way!

Testing Asynchronous Events

The timing seems right to demonstrate a pattern for testing asynchronous processing. This follows up on Steve's assertion: Don't make assumptions, write the test.

Template Method Pattern in Ruby

One of the most ubiquitous patterns in life is the template. It enables us to generalize behavior - thus ignoring or postponing complexity.

Preview of Design Patterns in Action

Just mention design patterns in a development setting and you may incite riot. Some dispute their taxonomy - many dismiss their utility - while others unaware of the topic entirely. So with proper expectations set I have solicited authors to write about the various patterns.

Dependency Injection

I am right in the middle of Agile Software Development (highly recommended). Along the same lines I came across this introduction to dependency inversion principle. The author does well to contrast the dependency injection mechanism of various IOC containers.

Design Patterns, Coding Conventions

Joel on Software has posted reflections on the programming equivalent of defensive driving. In Making Wrong Code Look Wrong, Joel posits that certain design and convention practices promote defensive programming and overall QE...while others send you to a bad place fast.

Most successful development methodologies advocate "same page" conventions. The notion is that any reasonable approach works - just as long as everyone consistently uses it. So on that basis (and others) the kind annotation convention that Joel puts forth is fine.

Performance Hungry .Net App ISO Fast Array

The morning started out with an interesting problem: I need a variable size array of value types (integers in that particular case) ArrayList would be the weapon of choice if you don't need highest performance, or just use int[] and write the array resizing code for the nth time. I didn't have the inclination for either solution so I resorted to an unusual solution - give the problem some thought. As a result, I found a few things that were news to me, and that I would like to share.

First, I wrote a little program to see check out the different assignment mechanisms:

Interaction with Video Content

This is a quick follow up to the Grid Computing column of a couple weeks ago.

As suspected, there is a product called videoclix (and probably others) that allows to create hotspots in a video where you can click into a streaming video and – of course – buy stuff. It supports everything Quicktime supports including DV, which means it works on low level formats. It is not a real-time solution though, which is not required for the content creation and marketing customers for whom this product seems to be developed. They say they add about 20K of metadata to each minute of video, which seems to be minimal for the use I envision.

Syndicate content