RE: [VOTE] Re: LayoutStrategy

2003-07-25 Thread Victor Mote
Victor Mote wrote:

 Because we are such a small group, I am hoping to get unanimity on all of
 the points. If I have addressed your concerns with the above
 clarifications,
 please consider changing the -1 votes to a zero (or better). If
 anybody has
 serious reservations, I need to think about doing this in a local fork
 instead of in the repository. Obviously, I'd like to avoid that.

Hmmm. I'm not sure how to interpret the silence. I'm going to press on with
my proposals unless I get some sort of substantive reply.

Victor Mote


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]



RE: [VOTE] Re: LayoutStrategy

2003-07-25 Thread Glen Mazza
--- Victor Mote [EMAIL PROTECTED] wrote:
 
 Hmmm. I'm not sure how to interpret the silence. I'm
 going to press on with
 my proposals unless I get some sort of substantive
 reply.
 
 Victor Mote
 

Victor,

I apologize for the silence--I did read your email on
Sunday and more thoroughly yesterday.  I was planning
on adding more to what you wrote tomorrow--I've been
too busy and/or worn out this week to give a useful
response to your proposals.  But let me try now:

1.)  BTW, I was happy with your explanations to my 
concerns I raised while voting--in particular your
assurances that Control will not be getting too much
into each of the classes.  We seemed to share many of
the same concerns.

2.)  In general, much of the system I am not versed in
yet, so I don't want to stop you with your redesign
ideas--however, I do expect Jeremias, Joerg, and Peter
to open up their mouths when they see something going
wrong.  However, for me, I can't beat a plan with no
plan, so I'm not going to slow things down by trying.

3.)  Offhand, working on my own, (and before realizing
that I need to change a lot of what I did because of
my mistakes with the parsers, as well as overlooking
several other things), I was able to get rid of the
Driver class entirely, as well as the Starter classes.
 The cost was only a slightly expanded apps.Fop class
(200 lines) and a larger (600-700 line) FOTreeBuilder.
 Due to the large handshaking between FOTreeBuilder
and Driver, I also found that adding some code to the
former usually allowed me to remove much more code
from the latter.  All in all, it seems to be pretty
code-efficient.

4.) I'm aware of your horrors of letting an
FOTreeBuilder know the render type, etc.  I agree with
you now on that.  My thinking now is to switch to a
new fo.XSLFOProcessor class which includes, as a child
class, the full definition of a
fo.XSLFOProcessor.FOTreeBuilder class.  Within
fo.XSLFOProcessor but outside of its FOTreeBuilder
definition, is much the same control-type code
currently in Driver (renderer information, etc.) This
way we still get the lines of code efficiency without
breaking so much the OO design in terms of letting
FOTreeBuilder know about everything.

What would be in the apps package if we had such a
XSLFOProcessor class?  Hopefully, just something
simple like this in apps.Fop:

XSLFOProcessor xslfoProcessor = new XSLFOProcessor();
bos = new BufferedOutputStream(new
FileOutputStream(options.getOutputFile()));
xslfoProcessor.setOutputStream(bos);
xslfoProcessor.setInputHandler(inputHandler);
xslfoProcessor.run();
bos.close();
System.exit(0);

Ideally, that would be mostly it.  My current
design-thinking is that once flow of control leaves
the apps package, it does not return until has a full
document finished.  

5.)  The drawbacks, however, of what I'm mentioning
above is that your Control is taking care of a lot
more than just tree building--layout, rending, area
tree, etc.  Again, though, I don't know much about
those areas yet to comment constructively on them--so
I'm reluctant to stop your full solution just because
I may have different ideas on the first 20%.

In general, I would then +1 you going ahead with your
design--providing J, J  P are not shy in opening up
their mouths when needed (I certainly won't be! ;)--
If and when it proves more code efficient to place
certain parts of Control in different packages, we can
look at doing so later.
 
Thanks,
Glen


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]



RE: [VOTE] Re: LayoutStrategy

2003-07-25 Thread Victor Mote
Glen Mazza wrote:

 Ideally, that would be mostly it.  My current
 design-thinking is that once flow of control leaves
 the apps package, it does not return until has a full
 document finished.

I think we are on the same page here, or at least I see no conflict. I don't
think of the control classes as being part of apps. apps would be one of
several ways to instantiate and access control. The only reason I want to
put anything in Driver is that it *is* control for now. Please, *please*
feel free to refactor the stuff I put in there to better places as you see
fit. I was hoping to get that straightened out before starting the Layout
Strategy stuff, but I think you and Jeremias will do The Right Thing as you
move forward.

 In general, I would then +1 you going ahead with your
 design--providing J, J  P are not shy in opening up
 their mouths when needed (I certainly won't be! ;)--
 If and when it proves more code efficient to place
 certain parts of Control in different packages, we can
 look at doing so later.

I'm counting on getting corrected if I need it. And I definitely don't want
this stuff to live in Driver forever. I just don't see the big Avalonized
picture yet, and probably won't until it is close to complete. Thanks for
the response. BTW, I really didn't mean to press you for the response -- I
just thought I had better get moving. I am very eager to at least test the
idea of getting the main branch working again so that we can start fixing
fonts, graphics, FO tree, etc. in one place.

Victor Mote


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]



RE: [VOTE] Re: LayoutStrategy

2003-07-21 Thread Victor Mote
Glen Mazza wrote:

 --- Victor Mote [EMAIL PROTECTED] wrote:
  1. In other words, I would
  like to have permission to temporarily treat Driver
  as either a singleton or
  a location for static constructs, which can be used
  to control the
  interaction between the various modules, so that I
  can move that logic out
  of the modules themselves.

 +1  Your direction of where you want the processing
 logic to be--away from the non-apps packages and into
 apps, is the exact *opposite* of where I want things
 to be headed!  Still, I don't think you should be
 hobbled by needing to be worried about multithreading
 issues at this time--come out with your best design
 as-is.

OK, I need to clarify this. In general, I do not want a bunch of logic moved
from non-apps to apps. The only pieces that need to be moved are those that
control the flow between the various modules. So, for example, I don't want
the fo module deciding to fire off a layout manager, which is what we have
now. I want the flow of control to return back to Control (for now, this is
Driver), which will then decide, because it knows what LayoutStrategy is in
play, and what renderers are in play, and perhaps what user-selected items
are in play, whether *it* should fire up Layout, continue building more
pieces of the FO tree, etc.

  2. I will then proceed to clean up lines between
  modules. Success will be
  measured by the ability to do the following things:
  1) to build without
  compile errors the control and fo classes, and one
  entry point to Layout
  (for Control) by themselves (i.e. no fo classes
  needing layout or area
  classes), and

 Doesn't FOTreeBuilder pipe messages to area tree
 processing?

I haven't seen that one, but I have seen some other area tree stuff in the
FO processing. IMO, we should be able to build an FO tree without knowing
anything about layout or area tree, so this is stuff that will be, in the
plan I have proposed, moved to one of those modules.

  2) to build without compile errors the
  control, area, fo (?)
  and rendering classes  (i.e. no area or rendering
  classes needing layout
  classes).
 
  Here is my +1.
 

 -1.  I wouldn't make a commitment at this time that no
 object from most packages needs referencing to
 another.  To accomplish this goal--no area or
 rendering classes needing layout classes, etc.--you
 may need to rip out so much functionality into the
 control classes, make private variables public for
 control to access, etc.  That will cause spaghetti
 code and code bloat.  There goes the elegance!

If there are needed exceptions to this rule, I'll make a note of them, and
explain why they are needed. I can't think of an instance where rendering
should need access to layout classes. It needs access to the area tree. If
the area tree isn't complete, it should be completed by layout before
rendering knows to do anything with the area objects in question. Are you
thinking of something specific? I definitely agree that we don't want to rip
functionality into the control classes (see discussion above), and I
definitely don't want spaghetti. In fact, I am trying to remove what I
consider to be a bit of spaghetti. Right now, for example, the fo module
starts layout. If you go to LayoutStrategy, the only way it can know what to
do at that stage is to carry around information about layout. I don't see a
reason for that. IMO, the FO module should be able to build a PageSequence
object and return it, and not care who or what it will be used for.

If you think of FOP as a pipeline, the stages are as follows:


Control
   |
   |

|  |   |
|  |   |
 Parsing/  |   |
 FO Tree   |   |
 BuildingLayout Rendering
|  |   |
|  |   |
 --- -- ---
 |  |  |  |
 |  |  |  |
XSL-FO Input FO Tree   Area Tree   Output

So we have 4 data points, if you will (maybe there is a technical CS term
for this), and 3 processing pipes between them. Each of the processing pipes
needs to have access to the data module immediately before and immediately
after it. Apparently in the past, the processing was along the model above,
but without the Control module, which made it monolithic, i.e. the FO Tree
had to be completed before Layout could start. If I understand Joerg, this
was changed in favor of our current system. I don't want to go back to
monolithic, but I think the right way to handle the concurrency issues (i.e.
trying to lay out and render output before we are entirely through with
parsing the FO tree), is with the Control layer on top to manage the
sequence