XWiki Architecture
Version 8.2 by Vincent Massol on 2017/09/01
What is XWiki?
XWiki is a Second Generation Wiki and as such it's a runtime platform for developing collaborative web applications. It's very versatile and you can modify any part of the XWiki runtime to match your requirements.
General Architecture
Architecture Concepts:
- XWiki is a webapp that is deployed into a Servlet Container.
- XWiki is made of Extensions.
- Some Extensions are Core Extensions and they are required for XWiki to execute properly.
- Other Extensions can be installed into a running XWiki installation to provide additional features.
- The Extension Manager is a Core Extension that allows installing, upgrading or removing other Extensions.
- An XWiki runtime is thus made of Core Extensions + non-Core ones.
- A set of Extensions working together to achieve a goal is called a Flavor.
- XWiki Enterprise is a generic Flavor that allow users to collaboratively author content. In the near future, several other Flavors will be available.
- There are 2 types of Extensions (and it's possible to extends Extension Manager to support other kinds):
- Extensions containing wiki pages. They are packaged as XAR files (a ZIP file with some metadata).
- Extensions containing Java classes. They are packaged as JAR files.
- An Extension can depend on other Extensions. A Flavor is itself a top level Extension that depends on several other Extensions.
The full list of available Extensions can be seen on the Extensions Wiki.
Integrating XWiki
There are two options for integrating XWiki into your environment:
- Accessing your environment (other software for example) from XWiki and displaying information inside XWiki's UI. This can be achieved by scripting inside Wiki pages or by developing Java code. See also the following Integration Extensions.
- Access XWiki's content (wiki pages, user data, etc) from other software by accessing XWiki remotely using REST APIs (It's also possible to use XMLRPC or GWT).
Extending XWiki
XWiki being a development platform for web applications there are plenty of ways to extend XWiki. The most obvious one is to look for an Extension and install it.
However if there's no Extension for what you wish to achieve, here are main options:
- Use scripts in wiki pages and access all APIs made available by other Extensions. This allows you to develop Applications in your wiki. Make sure to check the FAQ Tutorial which shows how to do this.
- Develop some Java code to make available Java APIs which can then be accessed from wiki pages using Scripting. XWiki uses a Component-approach to develop Java code. It's also possible to override any existing XWiki Component with your own implementation, thus changing the default behavior of whatever portion of XWiki that you wish.
- Create some Macros to use in your wiki pages.
- Create new Skins or modify existing one to match your needs.
- Create or modify Skin Themes.
- Use Skin Extensions to customize the CSS or JavaScript used to display wiki pages.
- Configure what is displayed in various locations of the screen by contributing content for existing UI Extension Points.
Check the Developer Guide to learn about all this and more.