zyzhang
Explorer
发贴: 155
积分: 30
|
于 2004-12-20 20:21
Actually, Visitor design pattern is very powerful if you can fit them in the right problem context. you can find loads of places(apache, middleware, xml utilities, and etc) using the idea behind visitor design pattern.
I used to using the combination of Composite and Visitor to tranverse tree-like data structure and adding the required handling methods in seperate visitor classes. It can help you gain the advantage of clean (distributing the responsibility), flexible and extensible design objectives.
|