OpenOffice.org as a platform for · 2014-04-19 · document that was written in OpenOffice, ......
Transcript of OpenOffice.org as a platform for · 2014-04-19 · document that was written in OpenOffice, ......
Mathias Bauer - OpenOffice.org Application Framework - Slide 1
OOoCon 2004 - Berlin
OpenOffice.org as a platform for
developers
Mathias Bauer - OpenOffice.org Application Framework - Slide 2
Agenda
Speaker introductionsFeatures for developmentOpenOffice.org API architectureOpenOffice.org as a service providerExtending OpenOffice.orgUser Interface programmabilityAddOnsOpenOffice.org AddOns (Demo)Q & A
Mathias Bauer - OpenOffice.org Application Framework - Slide 3
Speaker introductions
At Sun Microsystems:Working on StarOffice/OpenOffice.org since 1995Application Framework, 3rd party integrationManager Software Engineering
Application FrameworkUNOSDKUCB
For OpenOffice.org:Working on the project since its foundationApplication Framework Project LeadMember of Engineering Steering Committee
Mathias Bauer - OpenOffice.org Application Framework - Slide 4
Features for developers
Support for many platforms and languages11 languages available for standard buildsMore languages provided by the communityOOo 2.0: New tool support for localizing help content
Stable language independent API based on UNOUsable from Java, C++, OpenOfficeBASIC, PythonSupport for OLE automation on Windows (f.e. VB, Delphi)OOo 2.0: Language binding for CLI (.NET runtime)More programming and scripting languages through a language agnostic scripting framework (f.e. JavaScript)Implement own UNO services in C++, Java, PythonOOo 2.0: Much simpler use of UNO services
Mathias Bauer - OpenOffice.org Application Framework - Slide 5
Features for developers (continued)
UNO Component and type registryExtend the OOo API by creating own typesRegister own UNO components
XML based expandable configurationRead and write OOo configuration settingsCreate own configuration templates and settingsAccess through OpenOffice.org API
Open, XML based file formatAdd arbitrary content streams to packagesOOo 2.0: Store and read document variables
Mathias Bauer - OpenOffice.org Application Framework - Slide 6
Features for developers (continued)
Easy deployment of 3rd party components Based on ZIP packagesDeployable on user or installation baseOOo 2.0: New Package Manager
Live DeploymentPackage Manager GUI
Deployable content:Code: jar files, Basic modules, scripts, libraries (for multiple platforms in one file)Configuration files (schema and data)UNO types and servicesUI elements (Popup menus, toolbars, images)Document templates
Mathias Bauer - OpenOffice.org Application Framework - Slide 7
OpenOffice.org API architecture
Writer
Application Framework
Calc Draw Impress
API
SPI (Service Provider Interface)
ContentFilter
CalcAdd-in
DataConnector ...
Macro-Script.
Server-Apps
GUI-Apps
JavaBean
...
Mathias Bauer - OpenOffice.org Application Framework - Slide 8
OpenOffice.org as a service provider
Connect through UNOUse any programming language supporting UNO calls
Connect from Python ScriptsConnect from Java Applets, Servlets, Java GUI AppsConnect from Native ApplicationsOn Windows: Connect via COM OOo 2.0: On Windows: Connect via .NET
Use existing GUI embedding technologiesActiveXOLE documentsJava AppletJava (AWTContainers)OOo 2.0: Netscape PluginOOo 2.0: Java Beans
Mathias Bauer - OpenOffice.org Application Framework - Slide 9
Development Opportunities
OpenOffice.org as content format gatewayProvide 1 format, publish to NServer based document conversions
OpenOffice.org as a point of service integrationRelational DatabasesAddress books, LDAP directoryWeb servicesFile/Content management systems
OOo 2.o: Workflow managementXForms supportDocument variablesDigital signing of documents
Mathias Bauer - OpenOffice.org Application Framework - Slide 10
Service Integration
DynamicDocument
Model
OO.org
EnterpriseDatabase
LDAPDirectory
IntranetWeb
Service
Public Web
Service
Mathias Bauer - OpenOffice.org Application Framework - Slide 11
Service Integration
OO.org
EnterpriseDatabase
LDAPDirectory
IntranetWeb
Service
Public Web
Service Response
Content
Content
Data
Fields
Contacts
Data Data GUI(JDBC, JNDI)
SDBC
JAXM /XML–RPC
client
insert aparagraph
Mr. Mathias BauerSun Microsystems...
Response
Mathias Bauer - OpenOffice.org Application Framework - Slide 12
Content Format Gateway
OpenOffice.orgXML format
Flash
SVG
Closed Proprietary Formats(e.g. MS Office)
HTML
RTF
OpenOffice.org
*XML
OASIS Open Office XML format
Mathias Bauer - OpenOffice.org Application Framework - Slide 13
Content Format Gateway – use case
Servlet
Clients Formats
This is a sampledocuwas Open
Web
Server
http://x.y/abc.html
http://x.y/abc.pdf
http://x.y/abc.swf
This is a sample document thatwas written in StarOffice, ...
http://x.y/abc.sxw
???Browser
Flas
HTM
OO.oThis is a sample document thatwas written in OpenOffice.org, ...
This is a sample docwas Ope
This is a sample document thatwas written in OpenOffice, ...
OpenOffice.org
API
This is a sample document that was written in OpenOffice.org,published to our intranet web-site. It is converted automaticallyto other needed formats, either when the document is updated,or when a browser requests a specific format.
HTTP-GET
HTTP-GET
HTTP-PUT
This is a sample document that was written in OpenOffice.org,published to our intranet web-site. It is converted automaticallyto other needed formats, either when the document is updated,or when a browser requests a specific format.
Mathias Bauer - OpenOffice.org Application Framework - Slide 14
Extending OpenOffice.org
Adding external components to OpenOffice.orgProvide UNO components (see Developers Guide)Bridge to other technologies (COM, Java etc.)
Provide UNO wrappers for existing components Call non-UNO based components
Build your components with the OpenOffice.org SDKCurrently possible languages: C++, Java, PythonDevelop platform independent components
Use JavaProvide libraries for several platforms in one packageUse SDK libraries for platform support
Replace existing components or add new ones
Mathias Bauer - OpenOffice.org Application Framework - Slide 15
OpenOffice.org API architecture
Writer
Application Framework
Calc Draw Impress
API
SPI (Service Provider Interface)
ContentFilter
CalcAdd-in
DataConnector ...
Macro-Script.
Server-Apps
GUI-Apps
JavaBean
...
Mathias Bauer - OpenOffice.org Application Framework - Slide 16
Integrating external components
Registration of new Service ProvidersData Connectors: new data connectionsCalc Add-ins: new functions in Calc formulasContent Providers: new file sourcesDocument import/export filtersOOo 2.0: Impress Shapes
Call external components from the GUIAdd new GUI elementsRedirect calls from existing GUI elements
Exchange current implementationsExample: FilePicker and FolderPicker serviceSpell CheckerReplace existing Service Providers
Mathias Bauer - OpenOffice.org Application Framework - Slide 17
Content Access: UCB
Makes content hierarchies accessible through URLs (“http”, “ftp”, “file”, “webdav”)Extend it by defining new protocol schemesImplement access to “folders” and “files” following the UCP API
IMAP UCP
UCB
Folder Content
FILE UCP HTTP UCP
File Content Folder Content File Content Folder Content File Content Account Content Message Content
Folder ContentFolder ContentDocument
Broker
Providers
Contents
Mathias Bauer - OpenOffice.org Application Framework - Slide 18
Special: Hierarchy UCP
Implements a UCP on a registry backendDefault registry backend available working on the OOo configurationCan map arbitrary hierarchies
Fixed hierarchies: provide configuration fileModerately changing hierarchy: same as above, but provide service that updates configuration on demandDynamic hierarchy: provide your own backend
Mathias Bauer - OpenOffice.org Application Framework - Slide 19
Integration with CMS
CMS
OO.org
Own dialog asOpenOffice.orgAdd-On
ImplementContent ProviderService
ProvideWebDAVaccess
Mathias Bauer - OpenOffice.org Application Framework - Slide 20
User Interface: Programmability
Generic OpenOffice.org UI is XML basedMenubarToolboxesKeyboard shortcutsEvent bindings
Modification of UI elementsModify the XML files directlyAdd toolbars as many as you like with new XML filesAdd toolbars and menubar popups through AddOn configuration filesOOo 2.0: API for accessing UI elements at runtimeOOo 2.0: Replace menu entries by registered popups
Mathias Bauer - OpenOffice.org Application Framework - Slide 21
User Interface: Dispatching
Modify or extend the UI through Dispatch ObjectsDisabling of selected commands: Configuration meansRedirecting of internal commands: Dispatch InterceptionIntroducing new commands: Protocol Handlers
Functionality is described by commandsCommands are strings with URL like syntaxOpenOffice.org searches for command handlers implementing the DispatchProvider serviceDispatch Providers create Dispatch objects that are bound to the User Interface element Dispatch objects send status informationDispatch objects execute commandsDispatch objects are very lightweight objects
Mathias Bauer - OpenOffice.org Application Framework - Slide 22
Default Dispatching process
UI
Document dispatch provider
Framework dispatch provider
Boundcommand Frame
Mathias Bauer - OpenOffice.org Application Framework - Slide 23
Intercepted dispatching process
Document dispatch provider
Framework dispatch provider
Dispatch Interceptor
UI
Boundcommand Frame
Mathias Bauer - OpenOffice.org Application Framework - Slide 24
Complete dispatching process
Document dispatch provider
Framework dispatch provider
UI
Boundcommand
Protocol Handler
Unknown protocol
Frame
Dispatch Interceptor
Mathias Bauer - OpenOffice.org Application Framework - Slide 25
OpenOffice.org AddOn concept
Chapter 4.7.3 in the OOo 1.1 Developers GuideSample code for Demo Addon in OOo 2.0 SDK
JavaC++
Basic elements:GUI configuration files for menu, toolbarsImages for toolbar and menu entriesProtocol HandlerDispatch Interceptor, Context Menu interceptorEvent ListenersJobsPack up everything into a zip file