On 09.06.2008 18:46:23 Adrian Cumiskey wrote:
> After looking more closely at this I think I may have been a little hasty in 
> my praise and Jeremias 
> has a point, but Max's sentiment is a right one.

I don't disagree.

> On the subject of readability, there is much cleaning up and refactoring that 
> needs to be done to 
> make the code base more simple and easy to understand.  This is especially 
> the case in the areas of 
> layout (LayoutManager implementers) and rendering.  Below is a list of java 
> classes and their 
> current line count in trunk.
> 
>  > find ./src/java -type f -name \*.java | xargs wc -l $@ | sort -n -r
> 
>     2786 ./src/java/org/apache/fop/fo/FOPropertyMapping.java
>     1890 ./src/java/org/apache/fop/render/afp/AFPRenderer.java
>     1848 ./src/java/org/apache/fop/render/pdf/PDFRenderer.java
>     1829 ./src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java
>     1822 ./src/java/org/apache/fop/svg/PDFGraphics2D.java
>     1726 ./src/java/org/apache/fop/render/rtf/RTFHandler.java
>     1724 ./src/java/org/apache/fop/render/ps/PSRenderer.java
>     1666 ./src/java/org/apache/fop/pdf/PDFFactory.java
>     1662 ./src/java/org/apache/fop/render/pcl/PCLRenderer.java
>     1631 ./src/java/org/apache/fop/fonts/truetype/TTFFile.java
>     1597 ./src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java
>     1315 ./src/java/org/apache/fop/fonts/Glyphs.java
>     1291 ./src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java
>     1173 ./src/java/org/apache/fop/area/AreaTreeParser.java
>     1144 ./src/java/org/apache/fop/layoutmgr/BreakingAlgorithm.java
>     1118 ./src/java/org/apache/fop/fo/Constants.java
>     1107 ./src/java/org/apache/fop/cli/CommandLineOptions.java
>     1087 ./src/java/org/apache/fop/pdf/PDFDocument.java
>     1085 ./src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java
>     1022 ./src/java/org/apache/fop/render/xml/XMLRenderer.java
>     1017 ./src/java/org/apache/fop/render/java2d/Java2DRenderer.java
>      902 ./src/java/org/apache/fop/render/pcl/PCLGenerator.java
>      892 ./src/java/org/apache/fop/layoutmgr/PageBreakingAlgorithm.java
>      892 ./src/java/org/apache/fop/layoutmgr/AbstractBreaker.java
> 
> We currently have Checkstyle set FileLengthCheck to a maximum of 2000 lines.  
> Of course I realize 
> there is a necessary complexity in the processing task, but IMO a class 
> shouldn't really be more 
> than say 500-600 lines long..  otherwise its just doing too much and should 
> be delegating to another 
> class.  I would be interested to hear your thoughts on this.

There's absolutely nothing to be said against that IMO. But you know:
meager resources means concentration on the most important points. It's
good to be reminded from time to time of these things and it's good to
always keep it in mind while working on the code. Just for those who
aren't here that long: Relatively speaking I'm happier with the current
situation than with pre-redesign times. Today's codebase is much easier
to maintain and enhance already.

<snip/>



Jeremias Maerki

Reply via email to