CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

Steve Hebert's Development Blog

Steve's Blog - From .Net to dotMath and everything in between.

Flyweight and Visitor patterns in the Business Layer

I was reading Steve Maine's blog entry on object-oriented business layers and it hit me that I've never seen a decent article on the use of the Flyweight pattern on the business layer. I think this especially applies in large relational based implementations and I've also found the visitor pattern useful in some situations where the OO-Relational mapping becomes hairy or the task complexity is high. 

One complaint about OO models is that they solve the “constant-data, varying behavior” but fall down somewhat on “constant behavior, varying data”.  But in a relational transaction-based system the needed OO model is utilizing a small number of classes/instances to act upon large numbers of data entities and flyweights handle this very nicely.  Google searches turn up nothing on this approach, I'll have to keep looking...



Check out Devlicio.us!

Our Sponsors