GuidelinesForTWikiCompatibleDevelopment

Licensing issues

Compatibility of licenses

Presently both TWiki® and Foswiki are licensed under GPLv2 or later. Any contributions, extensions, or other components within either project that are licensed under GPLv2 or later are compatible with both projects. If you create a distribution that contains a component using a later version of GPL, such as GPLv3, then you must license your entire distribution under the later version.

Note you cannot retroactively change the license terms for any software you have released under GPL. You cannot, for example, compel another organization to stop distributing your software, or to alter it (for example, by renaming symbols within the software).

Technical Issues

Macro Compatibility

All core "TWiki variables" (macros) should work in Foswiki. If you find one that doesn't, then raise an urgent Task to get it fixed. You may encounter issues that result from the fact that TWiki uses a web called "TWiki" for system configuration while Foswiki uses "System". These issues can usually be avoided by using the macro %SYSTEMWEB% in place of the web name.

Plugin Compatibility

The Foswiki developers have put a lot of effort into trying to make sure that Plugins that only use the TWiki::Func interface will run in Foswiki. The easiest and most future-proof course is to develop your plugins for Foswiki, but we recognise that many authors will require to maintain compatibility so that their plugin runs in both Foswiki and TWiki.

As long as you follow the TWiki guidelines for plugin development, your TWiki plugin should work with Foswiki. If you have wandered outside those guidelines, and have for example called an internal API in TWiki, here's what you should do:
  1. Find out if there is any alternative to that API. The TWiki::Func interface has improved steadily over the years, and your API may be available already.
  2. See if Foswiki::Func (or another class described therein) offers an API. It has a number that are not available in TWiki. Do not use internal APIs in Foswiki, they are subject to continuous change.
  3. If there is no API but the functionality is trivial, consider importing it directly into your plugin.
  4. If all else fails, consider creating a "bridge". This is an class (normally shipped in TWikiCompatibilityPlugin) that bridges between TWiki functionality and Foswiki. See TWikiCompatibilityPlugin/lib/TWiki for examples of existing bridges.
If you have used the file system directly - naughty, naughty.
  1. Use TWiki::Func APIs to isolate yourself from the filesystem.
If your plugin works in TWiki but just doesn't work in Foswiki, then contact the Foswiki developers. They will help you resolve the problem.

Skin Compatibility

Compatibility of other (perl code) Extensions

Compatibility for all extensions is best achieved by only using the TWiki::Func APIs (these are available to non-plugins as well). If you have poked your fingers deep into the TWiki core, then contact the Foswiki developers. They will help you identify and resolve any problems.


TWiki® is a registered trademark of Peter Thoeny
Topic revision: r5 - 24 Nov 2008, CrawfordCurrie
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy