Identity Interface


March 17, 2008

Time Tracking and Timing

Category: technology – jonshern – 10:01 pm

Slim Timer is great web based task tracker and timer.
It also has some great reporting built in.
Check it out.

March 14, 2008

Lazy Loading Architecture

Category: code – jonshern – 7:56 am

Every place of employment has their favorite patterns and this one is no different.
Lazy Loading is a common theme amongst many of of the entities.

Basically take a property and in the get, check for null. If its null then load using a manager or something. If its not null then the list has been loaded.
It really only works for lists.

I think if you are going to do a SOA app, you should stick with the philosophy of plain old clr objects (poco) and just leave your accessors alone. Put the loading logic in a manager and load explicitly. It can become a hidden performance issue, when lists are just loading when you look at them.

The method I am talking about above is called Lazy Initialization (Fowler)
There are also several other types of Lazy Loading Fowler talks about including: Virtual Proxy, Value Holder, and Using Ghosts

The Ghost pattern looks as though it may overcome the hidden performance problem by creating a lazy loading supertype that wraps the load status. So you can tell if the list is of type “ghost”, “loading” or “loaded” A ghost would mean that the property should be lazy loaded when the oppurtunity arose. The problem I have with this, is the extra complexity of adding more layers.

In the end for me, it just seems easier to develop a robust manager architecture where explicit loads are easy and intuitive.

Fowler Martin. Patterns of Enterprise Architecture. 2003.

March 13, 2008

Resisting temptations of new language features

Category: code – jonshern – 10:27 pm

Before you go out and drop some extension methods on System.Object, read the this addendum on framework design guidelines for C# 3.0.