2011年11月25日 星期五

Discussions about using "Singleton" and "Archiving/Unarchiving"

This is a practical situation encountered --- We want a "Singleton" object which has the ability of "Archiving/Unarchiving", should we implement these two design patterns together? There is a discussion in Stack Overflow.
My thoughts : Maybe it is unnecessary to implement them in the same class, as "wbyoung" said, two lines of code do the same work.