Created
February 5, 2012 01:24
-
-
Save SeanTAllen/1741776 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface Persistence | |
persist | |
Persister implements Persistence | |
object Foo | |
internal value A | |
internal value B | |
persistVia Persister | |
KeyValueHash 'A' => A, 'B' => B | |
Persister persist KeyValueHash | |
-- | |
Foo doesnt expose internal state representation except via a generic agreed upon mechanism for anything like display, persist etc. Actual what for persist, display is handled by other objects. They just have a standard interface for accomplishing it which Foo can implement. There is no 'behavior' for Foo except how it interacts with objects that do things. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment