Monday, July 27, 2009

Dark Factory of Mass Production

This weekend I had been on a flea market strolling about and buying books for a bargain. For my own amusement I usually drop by at the section with the kid stalls (they usually get some space for free and do not have to pay a fee). I purchased this Yu-Gi-Oh! card, which I think is a nice example of early IT education (though most of the customers will not be aware of that - yet).
I like that the factory constructs two monsters (thus emphasing the value of factories to create families of objects). I wonder if Yu-Gi-OH! also knows a Builder pattern card? I also like that the factory is called "dark". It stresses the overuse of factories in the realm of testing, where languages such as java, would very often allow us to avoid factories and use mock objects instead (though many mock object framework encourage you to use interfaces for mocking one can easily mock classes too, thus avoiding unnecessary factory code).

No comments:

Post a Comment