Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I would not give the refactoring recommendation you suggest. I would make both Account and Customer 'Displayable' and 'Persistable' ( still thinking in Java :( ). Then implement a kind of Strategy pattern to take a Displayable object. Same goes for Persistable.

That way you can focus on the domain objects as data, and how they are related to each other. You can also come up with cleaner (and more orthogonal) patterns of how to display, persist, or otherwise handle that data.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: