I believe it would be better to adopt the visitor design pattern to recognize each HTML node. Simple applications can still use the "instanceof" mechanism, but more complex applications can become more manageable if the visitor pattern is used.
What do you think?
I am currently in the process of adding the visitor design pattern to my copy of the 1.1 production source code. If you are interested, I can forward you my changes when it is done.
Ernest Choi
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Ernest,
You might want to check out v1.2 - there are massive design changes. Visitor patterns is present though its for rendering and not identification itself. And yes, the idea is to avoid using "instanceof". v1.3 will ship with a total visitor refactoring.
Regards,
Somik
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I believe it would be better to adopt the visitor design pattern to recognize each HTML node. Simple applications can still use the "instanceof" mechanism, but more complex applications can become more manageable if the visitor pattern is used.
What do you think?
I am currently in the process of adding the visitor design pattern to my copy of the 1.1 production source code. If you are interested, I can forward you my changes when it is done.
Ernest Choi
Hi Ernest,
You might want to check out v1.2 - there are massive design changes. Visitor patterns is present though its for rendering and not identification itself. And yes, the idea is to avoid using "instanceof". v1.3 will ship with a total visitor refactoring.
Regards,
Somik