views:

50

answers:

1

Should make it extensible.

When I say make it extensible,I mean that the detail of filter options can be added later on with ease.

By design,it's better that parsing and rendering are independant.(?)

During parsing,need to show the next level filter options if neccesary.

I mean it should be within filtering length of each filter label by "if neccesary".

How to make the detail of filtering options extensible when the detail of options is no neccesary?

For performance issue,should make all related fields in the same table.

For a live demo of the filters,see here.

A: 

Have you looked at the Decorator pattern?

TrueWill
Buddy,I need a more specific solution now.Principles help,but not much.
Mask
OK - here are several examples of implementing the Decorator pattern in PHP: http://www.phppatterns.com/docs/design/decorator_pattern
TrueWill
I've known about this pattern and used it several times.But this time,it seems hard to help.
Mask