Professional Documents
Culture Documents
Ooo Con 2007 Pres
Ooo Con 2007 Pres
ORG
Mathias Bauer > Project Lead OpenOffice.org Writer Sun Microsystems Inc.
1
The facts
Some data (OpenOffice.org 2.0.4 on Windows)
> > > >
Full installation contains 309 libs, 102 MB Startup without application uses 68 libs, 28 MB Adding writer loads 21 libs more, 17 MB
http://wiki.services.openoffice.org/wiki/Architecture/Libraries
Many libraries are loaded on demand (most of them being UNO services)
Installation requirements
279 MB 246 MB
Split big libraries to avoid the taking one takes all effect Needs package restructuring and code refactoring
Download requirements
multiplying the number of download sets by 3 or 4 > extensions currently are the best approach
avoids explosion of testing and build matrix needs ability to download and install individual packages needs redesign of packages needs code refactoring
Development requirements
Faster and easier builds
> currently possible only using solver tar balls > build and install only packages that have been changed
better understanding the code fewer dependencies between the parts less side effects in code changes smaller regression risk
Packaging requirement
Conclusion
Whatever meaning of modularity you use improving it will not be possible without a package and library redesign and refactoring of a large part of the code base.
The maintenance problems of OpenOffice.org can be seen from the intermodule dependencies.
Everyone and Everything Participating on the Network
smoketestoo_native instsetoo_native postprocess dictionaries dbaccess sc desktop extensions chart2 lingucomponent scripting binfilter linguistic forms svx avmedia sfx2 helpcontent2 connectivity xmlhelp uui framework crashrep shell basic sj2 svtools toolkit vcl scp2 readlicense_oo idl officecfg unoxml fileaccess UnoControls sysui xmlscript sdk_oo testtools bean xmerge pyuno remotebridges unodevtools rdbmaker bridges ucb javaunohelper jvmfwk odk cli_ure stoc cpputools jvmaccess jurt unoil ridljar codemaker psprint unotools tools i18npool regexp comphelper ucbhelper cppuhelper cppu offuh offapi udkapi idlc registry berkeleydb libtextcat libxslt neon vos libxml2 libegg np_sdk rhino zlib sandbox beanshell unixODBC epm fondu MathMLDTD python sane xalan twain freetype hsqldb boost x11_extensions setup_native icu external salhelper sal xml2cmp soltools stlport vigra solenv moz sndfile extras nas portaudio afms bitstream_vera_fonts o3tl store udm expat agg curl cosv jpeg psprint_config libwpd libxmlsec autodoc testshl2 msfontextract oovbaapi ure package basebmp basegfx i18nutil embedserv io sax eventattacher hwpfilter jut qadevOOo configmgr animations sot transex3 wizards rsc dtrans padmin scaddins automation so3 xmloff accessibility slideshow cppcanvas canvas goodies embeddedobj fpicker writerperfect xmlsecurity sw sd filter basctl starmath
Critical review
Dependencies show up at built-time, not at run-time
> dependencies to build tools are irrelevant > non-code parts should be removed from the picture
Experience shows that language binding related modules are unproblematic (->URE) Quality of dependencies is not visible
responsible for most of the maintenance problems > large libraries also create large problems with inner Everyone and Everything Participating on the Network dependencies that are not visible in the diagram > only the code tells the whole truth
> stable interfaces are less problematic > only a few libraries at the top of the diagram are
starmath
basctl
desktop
sc
filter
forms lingucomponent
extensions
sd
xmlsecurity
sw
dbaccess
scripting
linguistic
binfilter so3
writerperfect
sane
twain
xmloff goodies
libwpd
libegg sysui
toolkit vcl
ucb unoxml
psprint xmlscript
fileaccess rsc
berkeleydb
package
configmgr
regexp comphelper
cpputools
stoc i18nutil
vigra
o3tl xt expat
vos
libxmlsec moz
beanshell np_sdk
jpeg
sandbox xmerge
xalan
stlport
boost
x11_extensions
unoil
Writer dependencies
sw svx linguistic sfx2 basic uui connectivity framework sj2 svtools shell toolkit vcl fileaccess xmlscript psprint unotools tools i18npool configmgr basebmp sax stoc regexp comphelper ucbhelper cppuhelper cppu setup_native icu jpeg expat external salhelper sal xml2cmp soltools x11_extensions boost stlport sandbox zlib libwpd o3tl vos basegfx i18nutil cpputools rsc libegg goodies avmedia xmloff so3 writerperfect
vigra
Low resources
> Intel 486 > 4 MB RAM (remember the times of Soft RAM?)
Resulting legacies
Platform specific code only in dedicated libraries Minimize memory consumption for OLE
> maximize code reuse in shared class libraries > create application framework on top of StarView (SFX)
following the Template pattern > build persistence model based on OLE storage
(Application, documents, views, dialogs etc.) > extensive use of (multiple) implementation inheritance > hierarchical class library organisation
Framework Architecture
CUI GUI UNO AutoSave/Recovery C++ Storage Mgmnt.
Load Environment Filter Mgmnt. Document Mgmnt. UCB Type Detection Window Mgmnt. VCL Embedding Generic UI Config
UNO
application code > not part of global infrastructure any more > SFX shall not be loaded on startup
Framework refactoring: to do
Move last UNO services from SFX
> GlobalEventBroadcaster > GlobalAppDispatcher > Generic FrameLoader
Move dialog configuration from SFX Reimplement docking windows as a UNO service Library redesign
Application Environment
So what do we need?
Better separation of model, view and controller (UI)
> at least on build level > perhaps even on library or package level
Smaller interfaces
> less exported symbols > much less use of implementation inheritance
Filters
Drawing Layer
Config
VCL
GUI
ODF
FWK
not separated from persistence code not separated from API implementation coupled with other parts represented in SFX needs preliminary work in SFX before
No clear separation between core, layout and UI, not even on build level Not all filters are separated from the core Monolithic Drawing Layer Huge C++ class interfaces
separate package (done already) > only living filters stay in the module (html, text, Word) > new filters are developed as UNO components > Word import filter will be converted to UNO component
http://wiki.services.openoffice.org/wiki/Global_Library_Redesign
Refactoring in SFX
DocumentInfo
> real UNO service, can be used autonomously > component also usable for filters (e.g. doc/docx import)
Drawing Layer
GUI CUI ODF UNO XML Top Layer Top Layer Writer Calc Impress Base IDE Math Wizards GUI Mid Layer Mid Layer CUI UNO i18n Common GUI Drawing Layer BASIC Utilities Framework UNO VCL Help
FWK
System Integration
Ongoing work
> Thorsten Behrens and Armin Le Grand > See Moving OOo to XCanvas on
http://marketing.openoffice.org/ooocon2006/schedule/wednesday.html
Q&A