On Wed, 16 Jan 2008, Ugo Cei wrote:
- Start with Excel, being it the best know and best supported format in POI.
- We strive to reuse the current HSSF API as much as possible to avoid
disruption of existing code.
- We are going to define a bunch of interfaces for usermodel classes (e.g.
Workbook, Sheet, Row, Cell, etc.)
- Each interface is going to have two implementations, one is the existing
HSSF class (HSSFCell implements Cell) and the other one is a new XSSF class
(XSSFCell implements Cell). This will allow new code to be written against
interfaces and be the same regardless of the underlying implementation.
We've discovered a slight snag with this plan - jdk's older than 1.5 have
some really broken behaviour with regards to interfaces and
implementations returning concrete classes. Full details in
<http://svn.apache.org/repos/asf/poi/branches/ooxml/src/ooxml/README.interfaces>
for anyone who's interested.
The workaround requires a slight tweak to keep jdk 1.3 / jdk 1.4
compatibility, but hopefully isn't too evil. Basically, we'll have two
copies of each interface, one with all the methods etc in, and one that is
a stub (empty of methods).
When building normally, we'll compile against the full interface, which
requires jdk 1.5. All users of this can then change their code slowly to
use interfaces instead of concrete classes, and hence be able to easily
use the ooxml support.
However, ant will also spit out a version compiled against the stub
interfaces, for jdk 1.3 / jdk 1.4, as now, and pop it in a different jar
file. Users can choose to use this jar instead, and keep their jdk
compatibility. They won't be able to use the new interfaces, but as they
can't use any of the other ooxml support (which does need jdk 1.5), this
shouldn't really inconvenience them.
All this is working in the ooxml branch, and seems fine. Now that's all
sorted out, we can carry on with implementing the ooxml support :)
Nick
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]