I'm not really sure if i would decree it a design pattern (and i don't want to get into an argument as to what is one), but...
I was over at Mark's
house and reviewing some code for "the video game" that we WILL create and he was showing me how the scene graph works for local transformation matrices. In video games you multiply one matrix against another against another until you position your one vertex. Well instead of doing those multiplications down the line every time something doesn't move. Instead you have a local transformation matrix you multiply by and as a vertex moves it tells its children to set their transform matrices to dirty so they know to update next frame.
This brings the story to me... It made me think the "dirty pattern"
Lets apply this to a class that represents a database object.
If the class is updating any object (reflected in a database) the class should set a "dirty" bit to know whether it should do any database changes at all. Furthermore if this class has changes it needs to make to other database classes, it can pulldown(instantiate) those classes, change them, and have them set their diry bits.
Labels: C#, coding, dev, patterns