Tuesday, August 28, 2007

The Memento Pattern

After programming for more than a decade I finally found a production use for the memento pattern - as a way to externalize the state of a complex legacy object (the actual state info is small, but for legacy the reasons the class is full of all sorts of cr... business logic, references to controllers, managers, etc) so the object can be stored in ehcahce and spooled to disk when necessary.

If I continue to program for another decade maybe I'll find a use for the remaining 50% of the Gang Of Four ... err, GoF patterns that I haven't yet seen used in a production system :)

No comments: