Views: 15.1K
Replies: 3
Archived
|
dofactory GOF memento pattern flawedThe dofactory implementation of the GOF memento pattern breaks encapsulation. The contents of the memento can be viewed by the caretaker. No reply to an email sent to dofactory.
Tom U, Sep 21, 2010
|
|
Reply 1Can't this be done using private setter and passing memento object in caretaker constructor?
Thanks Pradip Shrestha, Dec 28, 2010
|
|
Reply 2The definition of the memento pattern, from your own Design Pattern Framework document (page 67), starts with "Without violating encapsulation". This is not a minor issue but the major reason for the existance of the memento patter. The failure of your implementation to meet this requirement followed by your very rude and unprofessional response raises serious concerns about dofactory.
Tom U, Oct 21, 2010
|
|
Reply 3Tom:
Yes, I remember your email. There was no reply because from your email we gathered that you seem to extract great pleasure in pointing out other developer's 'flaws' and failure to perform proper unit testing. Unless you want an open discussion in which we can all learn and grow, I suggest that you implement the most perfect memento pattern in your own work and leave it at that. Dan McMillan, Sep 22, 2010
|