+ All Categories
Home > Documents > Ooo Con 2006

Ooo Con 2006

Date post: 03-Apr-2018
Category:
Upload: scribdmatti
View: 217 times
Download: 0 times
Share this document with a friend
21
Mathias Bauer StarOffice/OpenOffice.org Sun Microsystems Inc. Run Through The Jungle
Transcript
Page 1: Ooo Con 2006

7/29/2019 Ooo Con 2006

http://slidepdf.com/reader/full/ooo-con-2006 1/21

Mathias Bauer StarOffice/OpenOffice.org

Sun Microsystems Inc.

Run Through TheJungle

Page 2: Ooo Con 2006

7/29/2019 Ooo Con 2006

http://slidepdf.com/reader/full/ooo-con-2006 2/21

Agenda

● Some words about the speaker ● Introduction● Rumours and facts about modularity●

OOo code architecture● Framework Environment● Applications in the framework● Integration of features into the UI●

OOo Writer architecture● Q & A

Page 3: Ooo Con 2006

7/29/2019 Ooo Con 2006

http://slidepdf.com/reader/full/ooo-con-2006 3/21

OpenOffice.org Conference Lyon 2006

3

Notes about the speaker 

•  At Sun Microsystems:> Working on StarOffice/OpenOffice.org since 1995

>  Application Framework, 3rd party integration

>Manager Software Engineering – Application Framework Team

 – Writer, Math, Text Engine

• For OpenOffice.org:> Working on the project since its foundation>  Application Framework Project Lead> In the past also worked on “Programmability”

Page 4: Ooo Con 2006

7/29/2019 Ooo Con 2006

http://slidepdf.com/reader/full/ooo-con-2006 4/21

OpenOffice.org Conference Lyon 2006

4

Introduction

• Interesting places (work in progress)> http://wiki.services.openoffice.org/wiki/Architecture

> http://wiki.services.openoffice.org/wiki/Framework

>

http://framework.openoffice.org/servlets/ProjectDocumentList• What you should know already

> Some basic ideas what OOo can do

> Some basic knowledge about which parts OOo has

> Basic UNO concepts (interfaces, services)

Page 5: Ooo Con 2006

7/29/2019 Ooo Con 2006

http://slidepdf.com/reader/full/ooo-con-2006 5/21

OpenOffice.org Conference Lyon 2006

5

Possible meanings of “modularity”

• Split up code into libraries, perhaps load on demand> Loading on demand can hurt code quality

> Too many libraries can have negative impact on diskspace, memory footprint and performance

• Make many parts of the program removable> Questionable if applicable to parts of applications

> Removable parts must be loadable on demand

• Reduce build dependencies and narrow interfaces> Can be quite some work if done after the fact> Improves code maintainability and stability

>

Bad or unclear modularity makes code look like a jungle

Page 6: Ooo Con 2006

7/29/2019 Ooo Con 2006

http://slidepdf.com/reader/full/ooo-con-2006 6/21

OpenOffice.org Conference Lyon 2006

6

Concrete example: OOo on Windows

• http://wiki.services.openoffice.org/wiki/Architecture/Libraries

• Full installation contains 309 libs, 100 MB

• Startup without application uses 68 libs, 28 MB

•  Adding writer loads 21 libs more, 17 MB

• Many libraries are loaded on demand (most of thembeing UNO services)

• Some big libraries are loaded though the loadingcode uses only a few symbols

• Biggest problem is huge svx library

Page 7: Ooo Con 2006

7/29/2019 Ooo Con 2006

http://slidepdf.com/reader/full/ooo-con-2006 7/21OpenOffice.org Conference Lyon 2006

7

First Impression of an OOo

developer noob

“Better run through the jungle,Woa, dont look back to see.”

John FogertyCreedence Clearwater Revival

“Run Through The Jungle”, 1970

Page 8: Ooo Con 2006

7/29/2019 Ooo Con 2006

http://slidepdf.com/reader/full/ooo-con-2006 8/21OpenOffice.org Conference Lyon 2006

8

Elements of the OOo architecture

• GUI class library (StarView, VCL)•  Application Framework

• Support libraries

>  Adaptors, helpers> C++ service class libraries

> GUI classes (dialogs etc.)

Libraries containing UNO services• UNO Language binding and runtime

• System integration

• Application libraries

Page 9: Ooo Con 2006

7/29/2019 Ooo Con 2006

http://slidepdf.com/reader/full/ooo-con-2006 9/21OpenOffice.org Conference Lyon 2006

9

“Template” based framework

• Characteristics> Control over all aspects of the program

> Base classes for Application, Document, View etc.>

Derived classes only add specific aspects•  Advantages

> High code reuse

> Fast addition of new features if they fit into the picture

• Possible drawbacks> Tight coupling of modules and classes> Large build dependencies

>“High level hacking”

Page 10: Ooo Con 2006

7/29/2019 Ooo Con 2006

http://slidepdf.com/reader/full/ooo-con-2006 10/21OpenOffice.org Conference Lyon 2006

10

Coarse-grained architecture of OOo

Page 11: Ooo Con 2006

7/29/2019 Ooo Con 2006

http://slidepdf.com/reader/full/ooo-con-2006 11/21OpenOffice.org Conference Lyon 2006

11

Framework Architecture

Load Environment

Filter Mgmnt.

DocumentMgmnt.

TypeDetection

WindowMgmnt.

   E  m   b  e   d   d   i  n  g

   A  u   t  o   S  a  v  e   /   R  e  c  o  v  e  r  y

   S   t  o  r  a  g  e   M  g  m  n   t .

CUI GUI C++UNO

UNOConfigVCLUCB

   G  e  n  e  r   i  c   U   I

Page 12: Ooo Con 2006

7/29/2019 Ooo Con 2006

http://slidepdf.com/reader/full/ooo-con-2006 12/21OpenOffice.org Conference Lyon 2006

12

General purpose services

• Embedding objects (embeddedobj)

• Embed OOo through OLE2 (embedserv)

• Storage and package management (package, sot)• Configuration (configmgr)

• Document filter management (filter)

• Templates management (sfx2)• Dispatch Provider for global functionality (sfx2)

(Module names in paranthesis)

Page 13: Ooo Con 2006

7/29/2019 Ooo Con 2006

http://slidepdf.com/reader/full/ooo-con-2006 13/21OpenOffice.org Conference Lyon 2006

13

Application Environment

Page 14: Ooo Con 2006

7/29/2019 Ooo Con 2006

http://slidepdf.com/reader/full/ooo-con-2006 14/21OpenOffice.org Conference Lyon 2006

14

Starting OOo: the desktop module

• UNO bootstrapping (creation of service manager)

• Creation and initialisation of some general services> Configuration

> UCB> Desktop> GlobalEventBroadcaster 

Instantiate handler for command line / pipe• React according to command line arguments

• Exact description athttp://wiki.services.openoffice.org/wiki/Architecture/Process_Flow

Page 15: Ooo Con 2006

7/29/2019 Ooo Con 2006

http://slidepdf.com/reader/full/ooo-con-2006 15/21OpenOffice.org Conference Lyon 2006

15

Framework API

• Frame> Owns component

> Controls task window

>

 Anchor for dispatching

• Component> Controller, model is

optional (MVC paradigm)

>

Has component window> Participates in dispatching

Page 16: Ooo Con 2006

7/29/2019 Ooo Con 2006

http://slidepdf.com/reader/full/ooo-con-2006 16/21OpenOffice.org Conference Lyon 2006

16

Creating/loading a document

• Framework creates Frame and its window

• Framework loads document into Frame> Does type and filter detection

> Hands over Frame to FrameLoader > FrameLoader creates document service (model)

according to filter 

> Hands over medium to document for loading

> Creates a view/controller pair for the model> Plugs Controller/Model/Frame together 

> Controller requests UI elements, provides configuration> Frame creates UI elements according to configuration

Page 17: Ooo Con 2006

7/29/2019 Ooo Con 2006

http://slidepdf.com/reader/full/ooo-con-2006 17/21OpenOffice.org Conference Lyon 2006

17

Command Dispatching

Page 18: Ooo Con 2006

7/29/2019 Ooo Con 2006

http://slidepdf.com/reader/full/ooo-con-2006 18/21OpenOffice.org Conference Lyon 2006

18

Overall architecture

    T   o   p    L   a   y   e   r

    M    i    d    L   a   y   e   r

    B   o    t    t   o   m    L   a   y   e   r

UCB Config Manager  

UNO GSL

    W   r    i    t   e   r

    C   a    l   c

    I   m   p   r   e   s   s

    B   a   s   e

    I    D    E

    M   a    t    h

    W    i   z   a   r    d   s

    B    i    b

BASIC

Utilities

i18n

Framework

VCL

GUI

UNOCUIGUI

UNO

CUI UNO FWK

Platform

 S  y  s  t    e m I   n  t    e  g r   a  t   i    o n 

ODF

Common GUI

Drawing Layer 

    H   e    l   p

L  1   0  N 

L  1   0  N 

L  1   0  N 

    D   r   a   w

    C    h   a   r    t

    X    M    L

Page 19: Ooo Con 2006

7/29/2019 Ooo Con 2006

http://slidepdf.com/reader/full/ooo-con-2006 19/21OpenOffice.org Conference Lyon 2006

19

Basic Application Architecture

    A   p   p View / Controler Model

GUI Filters (.ods,.xls)

Config VCL FWK

UNOODFGUI

    G    U    I

Page 20: Ooo Con 2006

7/29/2019 Ooo Con 2006

http://slidepdf.com/reader/full/ooo-con-2006 20/21

OpenOffice.org Conference Lyon 2006

20

Writer Architecture

    W   r    i    t   e   r V    i   e

   w

    M   o    d   e    l

paragraphparagraph

root

pagepagepage

ST

ES

E

    G    U

    I

    F    i    l    t   e

   r   s

Config VCL FWK

UNO

 O D F 

GUI

    D    O

    C

    O    D

    T

    H    T    M

    L

    S    X    W

 . . .

Drawing Layer 

Page 21: Ooo Con 2006

7/29/2019 Ooo Con 2006

http://slidepdf.com/reader/full/ooo-con-2006 21/21

Run Through TheJungle - finished

Mathias Bauer [email protected]


Recommended