<?xml version="1.0"?>
<rss version="2.0">
<channel>
  <title>Reporting Tales - report-designer tag</title>
  <link>http://www.sherito.org/tags/report-designer/</link>
  <description>.. if it is not printed, it can&#039;t be real</description>
  <language>en</language>
  <copyright>Thomas Morgner</copyright>
  <lastBuildDate>Tue, 26 Aug 2008 11:33:00 GMT</lastBuildDate>
  <generator>Pebble (http://pebble.sourceforge.net)</generator>
  <docs>http://backend.userland.com/rss</docs>
  
  
  <item>
    <title>Purifying action: Report-Designer 2.0 is on the way</title>
    <link>http://www.sherito.org/2008/07/29/1217364300000.html</link>
    
      
        <description>
          Three weeks! It now has been three weeks since the purification started. Three weeks of furious deleting, refactoring, screaming, crying, contemplating suicide, restructuring, analyzing and finally fixing the report-designer&#039;s codebase.&lt;br /&gt;
&lt;br /&gt;
Are we finished now? Not yet. The current SVN version is now in a state where all the major parts are in place, but the overall experience is still .. experimental. &lt;br /&gt;
&lt;br /&gt;
My development theme for the new report-designer is &amp;quot;back to the roots&amp;quot;. Almost all external dependencies are gone now. Well, some minor dependencies are still waiting for their extermination: &lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
    &lt;li&gt;&lt;a href=&#034;http://www.jgoodies.com/freeware/forms/index.html&#034;&gt;JGoodies Formlayout&lt;/a&gt; - a creature spawned in the depths of the seventh circle of hell - is still used in many of the old dialogs. As this layout manager is as hard to maintain as the infamous Gridbag-Layout of the core JDK, there are no advantages of using it. Whenever we now touch one of the old dialogs, we will replace this nightmare with a plain Gridbag-Layout. GridbagLayout may be ugly, but at least we don&#039;t have to ship a Jar for it or force other developers to learn yet another useless trick.&lt;/li&gt;
    &lt;li&gt;IntelliJ IDEAs NotNull-annotations. The idea of marking parameters, fields and return-values as nullable seems to be a good idea at first. But sadly, the implementation of said idea is horrible. When using IntelliJ, violations of the annotation constraints easily remain undetected - the compiler does not warn you and so you won&#039;t see errors until you get the Exception at runtime. In addition, anyone not using IntelliJ wont have much use of these annotations anyway. Therefore, for the new code and all classes touched during the redesign:  Let&#039;s kill these annotations. Now we replace them with strict coding guidelines. We start with explict checks on all public or protected methods, wherever we do pass object-references around. On a architecture level we prevent NullPointerExceptions by having a strict object-model with strict type-checks. And of course, this includes that we do not pass private collections around, as it seems all so common these days.&lt;/li&gt;
    &lt;li&gt;DOM4J and Jaxen: These classes are used by the Pentaho-Version-Checker to parse a structurally simple XML document. One could use a combined total of 500KB of libraries or one could use down-to-earth XML-parser implementations that use JDK-1.5 functionality only. Guess what the old code does and guess with what we will end up with. &lt;/li&gt;
&lt;/ul&gt;
Very early in the game, we already removed the Pentaho-Platform, as using a ?? MB collection of libraries to read a single properties-file was a bit ridiculous. We removed all magical code-generation (that was done via asm-lib and reflection) as all of these uses were easily replaceable by a single well-defined interface. We removed the PullParser and all the XML-magic as XML parsing in JDK 1.5 is really well-defined (heck, it was well defined in the age of JDK 1.2, for the usecases we need here). We removed SWT as I cant stand libraries that crash the Virtual Machine just because they cannot cope with the processor architecture or operating system. I still believe in the &amp;quot;100% pure Java&amp;quot; world Sun advertised ages ago. And we removed Castor, as a OR-mappers used for parsing a non-complex XML file is a WTF on its own. &lt;br /&gt;
&lt;br /&gt;
Inside the code itself, we sliced through the event handling and created a clear event-dispatching path. Although it must be fun to virtually connect every object with every other object, I do not want to spend the few remaining years of my sanity on maintaining such a beast. Almost all cases of invoking methods by reflection were removed by simply creating interfaces containing the method to be called. But that road was no fun to walk - so at the end we ripped out the old data-model and rendering and editors and ... and so the new report-designer works directly against the reporting-engine&#039;s datastructures and with components that follow a strict separation of concerns.&lt;br /&gt;
&lt;br /&gt;
And now, with all magic killed, we leave the dark age and enter the age of enlightening. With a sane and maintainable architecture to start with, we will finally be able to spend less time on maintenance and more time on developing new features. After all, bug-hunting is not a fun activity, so spending less time there leaves us more time for the fun stuff.&lt;br /&gt;
&lt;br /&gt;
The new report-designer data-model is a thin wrapper around the visual objects of the reporting-engine. The model itself only provides some caching of the layout, change tracking and event-notification and nothing else. There is no point in wrapping around datasources or functions, as long as we set the social rule that after these objects have been altered we always notify the model of it. &lt;br /&gt;
&lt;br /&gt;
The report-designer&#039;s code now no longer contains copies of existing reporting-engine functionality. Datasources, layouting, expressions - it all comes from the one and only principal source now. &lt;br /&gt;
&lt;br /&gt;
And the result of all of this: The report-designer now automatically provides access to all features of the reporting engine as soon as the reporting engine implements them. We can now guarantee that whatever the report-designer shows you in the edit view will be the same result the reporting engine will show you. Everything the reporting-engine can do, can now be done with the report-designer.&lt;br /&gt;
&lt;br /&gt;
We now also started to define the first set of plugin-points for the report-designer, so that anyone can hook-in own editors, datasources and actions without dealing with all the complexity of the whole project.&lt;br /&gt;
        </description>
      
      
    
    
    
    <comments>http://www.sherito.org/2008/07/29/1217364300000.html#comments</comments>
    <guid isPermaLink="true">http://www.sherito.org/2008/07/29/1217364300000.html</guid>
    <pubDate>Tue, 29 Jul 2008 20:45:00 GMT</pubDate>
  </item>
  
  <item>
    <title>Independence Day</title>
    <link>http://www.sherito.org/2008/07/06/1215353160000.html</link>
    
      
        <description>
          While the former colonies &lt;a href=&#034;http://en.wikipedia.org/wiki/United_States_Declaration_of_Independence&#034;&gt;celebrated their successful rebellion&lt;/a&gt; to evade &lt;a href=&#034;http://en.wikipedia.org/wiki/Boston_Tea_Party&#034;&gt;British taxes on tea and other goods&lt;/a&gt;, I created my own Declaration of Independence (from old and obsolete rules that burden the pioneer spirit and now just exist for historical reasons).&lt;br /&gt;
&lt;br /&gt;
As the name suggests, the &amp;quot;&lt;a href=&#034;http://source.pentaho.org/pentaho-reporting/engines/classic/extensions-reportdesigner-parser/&#034;&gt;extensions-reportdesigner-parser&lt;/a&gt;&amp;quot; project is a Classic-Engine extension that allows the engine to use *.report files as produced by the current Report-Designer as ordinary report-definition files. &lt;br /&gt;
&lt;br /&gt;
On the quick-win side, this immediately removes the need to convert reports into the extended-XML format during the publish process. As long term gain, this module acts as a compatibility layer as soon as we start the report-designer redesign. &lt;br /&gt;
&lt;br /&gt;
There are several reasons why it is a good idea to separate the report-definition fileformat from the internal model representation:&lt;br /&gt;
&lt;ul&gt;
    &lt;li&gt;The report-designer&#039;s XML file references classnames and therefore makes it hard to do refactorings without affecting the names put in there. Now we can start to move classes and functionality around without having to worry how our actions may break existing reports.&lt;/li&gt;
    &lt;li&gt;The report-designer&#039;s internal model is a incomplete (and in some cases incompatible) copy of the reporting-engine&#039;s report-model. This results in subtle bugs and diverging feature sets, which in return leads to frustration and ugly hacks.&lt;/li&gt;
    &lt;li&gt;As the designer maintains a own copy of the reporting-engine&#039;s model, changes in the reporting engine&#039;s processing (notably new features or extensions of existing features) need a long time until they become available in the designer.&lt;/li&gt;
    &lt;li&gt;And of course: Maintaining a own model is expensive. The time we have to spend to keep the models in sync, is time we cannot spend to make the designer better.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
This module now is the living proof, that there is no need for a separate report-designer model and therefore no need to have a *.report format in the future. &lt;br /&gt;
&lt;br /&gt;
With 0.8.11, we can safely map everything that is inside the report-designer&#039;s file format into the native elements of the reporting-engine. The charting in the designer is covered by the &lt;a href=&#034;http://source.pentaho.org/pentaho-reporting/engines/classic/legacy-charts/&#034;&gt;legacy-charting&lt;/a&gt; sub-project, the design-time properties in the *.report-files (like the horizontal and vertical rulers) are mapped into Element-attributes, and for each data-set offered by the designer, we have a sane equivalent. (And in case the dataset-specification itself was a bit insane in itself, as it happens with the XML-datasources, we now have legacy-projects for these parts as well. No matter how strange the code or behavior is, for the sake of full backward compatibility we&#039;ll keep that code alive.)&lt;br /&gt;
&lt;br /&gt;
During the next two weeks, we will concentrate on making the Report-Designer 2.0 ready for a bright future. At the end, we will end up with a designer that is a natural extension of the reporting engine core. In the process to that glorious goal, we will happily remove the code that simply duplicates the engine&#039;s behavior. Add a bit of reducing information redundancy and let us reduce the magic of reflection to a minimum and we shall be in a good shape for the next years to come.
        </description>
      
      
    
    
    
    <comments>http://www.sherito.org/2008/07/06/1215353160000.html#comments</comments>
    <guid isPermaLink="true">http://www.sherito.org/2008/07/06/1215353160000.html</guid>
    <pubDate>Sun, 06 Jul 2008 14:06:00 GMT</pubDate>
  </item>
  
  </channel>
</rss>
