Framework and DSL for defining and using factories
