Back to list
Views:   15.1K
Replies:  3

dofactory GOF memento pattern flawed

The 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 1
Can't this be done using private setter and passing memento object in caretaker constructor?
Pradip Shrestha, Dec 28, 2010
Reply 2
The 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 3

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
Stay Inspired!
Join other developers and designers who have already signed up for our mailing list.
Terms     Privacy     Cookies       Do Not Sell       Licensing      
Made with    in Austin, Texas.  - vsn 44.0.0
© Data & Object Factory, LLC.