By CodeJustin
via steve-yegge.blogspot.com
Published: Aug 04 2009 / 14:08
Today I thought I'd talk about a neat design pattern that doesn't seem to get much love: the Properties Pattern. In its fullest form it's also sometimes called the Prototype Pattern.
People use this pattern all over the place, and I'll give you a nice set of real-life examples in a little bit. It's a design pattern that's useful in every programming language, and as we'll see shortly, it's also pretty darn useful as a general-purpose persistence strategy.
But even though this pattern is near-universal, people don't talk about it very often. I think this is because while it's remarkably flexible and adaptable, the Properties Pattern has a reputation for not being "real" design or "real" modeling. In fact it's often viewed as a something of a shameful cheat, particularly by overly-zealous proponents of object-oriented design (in language domains) or relational design (in database domains.) These well-meaning folks tend to write off the Properties Pattern as "just name/value pairs" – a quick hack that will just get you into trouble down the road.
I hope to offer a different and richer perspective here. With luck, this article might even help begin the process making the Properties Pattern somewhat fashionable again. Time will tell.
Tweet
SaveShareSend
Tags: methodology



Comments
Topnotch replied ago:
Good but MUCH, MUCH TOO LONG!!!! I think I know why he decided to quit blogging; his hands got tired :-)
activeenginesensei replied ago:
This was a good post - it lead me to try a few new things for my application architecture I would not have considered before.
Travis Dunn replied ago:
If twitter is microblogging, maybe steve yegge's tl;dr posts are an art form on the other end of word counts: macroblogging!
Voters For This Link (10)
Voters Against This Link (0)