mysticfall / pivot4j

Pivot4J provides a common API for OLAP servers which can be used to build an analytical service frontend with pivot style GUI.
Other
128 stars 101 forks source link

Refactor TableHeaderNode and RenderStrategyImpl to reduce complexity. #88

Open mysticfall opened 11 years ago

mysticfall commented 11 years ago

Despite what its misleading name suggests, the layout rules implemented by RenderStrategyImpl does not use any strategy pattern to handle different cases for layout grid cells.

The biggest problem is that It makes TableHeaderNode implementation insanely complex, and it grows more so by every corner cases introduced by a bug or a new feature.

We need a more maintainable design, like keeping the TableHeaderNode generic and simple, and let each corner cases implemented with a strategy pattern and handled by the RenderStrategyImpl in some pluggable manner.