AbstractBreaker has maybe two or three methods in common with
LayoutManager. Furthermore, I see the Breaker as something else than a
layout manager. I think it would be confusing to merge the two concepts.
The duplicate methods can probably be moved up to the base class.

I admit that the AbstractBreaker was simply an artifact from merging in
Luca's initial code and which later evolved a bit but I began to like
the distinction between the LMs and the breakers.

And as I mentioned before, I prefer getting FOP near a developer release
over making the code perfect. But I won't stand in your way if you want
to spend countless hours which result in little more than perfectly
looking code. There are so many other little things that still need to
be done but which have a real impact on the end result. Just my honest,
personal opinion.

On 17.05.2005 03:13:51 Glen Mazza wrote:
> Team,
> 
> Currently the LM classes that use the Knuth breaking strategy employ the 
> breaking via a nested (inner) class -- 
> PageSequenceLayoutManager.PageBreaker, for example.  This is causing 
> some duplication in methods (getNextKnuthElements(), for example) and 
> variables in each of the Breaker classes.  Also, AbstractBreaker has to 
> duplicate methods already available in AbstractLayoutManager because it 
> does not extend it.
> 
> What I would like to do is the following (step-by-step, not proceeding 
> until each stage works):
> 
> 1.)   Have AbstractBreaker extend AbstractLayoutManager (ALM).
> 
> 2.)   Remove the PageBreaker inner class from PSLM, and have PSLM 
> directly extend AbstractBreaker.  Refactor and remove any duplicate 
> methods and variables.
> 
> 3.)   Rename AbstractBreaker to AbstractBreakingLayoutManager (or similar).
> 
> 4.)   One by one, remove the nested inner classes from those other 
> breaking LM classes:  removing any duplicate methods or functionality 
> already available in the base class, and having those classes extend 
> ABLM instead of ALM.  (Only those LM classes which do breaking will 
> extend ABLM--the rest will continue with ALM.)
> 
> 5.)  Refactor/simplify AbstractBreakingLayoutManager, taking advantage 
> of methods already available in AbstractLayoutManager.  
> Refactor/simplify the ABLM-extended classes, again resulting from 
> insights during this process.
> 
> 6.)  (possibly) Create a BreakingLayoutManager interface (extending 
> LayoutManager interface?), just to keep note of the delta between ABLM 
> and ALM.
> 
> I think if we do this, it will allow for more simplifications and 
> insights into the layout coding, and make it easier to understand.  I 
> don't think we can afford the duplication as-is--my experience so far 
> with FOP is that simplifying engenders more simplifications, while lard 
> ends up begetting more lard.
> 
> Thoughts/comments?
> 
> Thanks,
> Glen
> 
> 



Jeremias Maerki

Reply via email to