Fullscreen
When should code be in mods vs main code base?
Print

To Mods Or Not To Mods

Please help improve this page with factors for/against have certain code in mods.



In systems like Drupal or Joomla!, most of the available functionality is available through 3rd party modules, extensions, etc (different systems have different names). You need to install separately. In TikiWiki, it's the opposite. Most of the functionality is built-in and you decide to activate or not. Both approaches have their pros & cons. You can read more about it at http://marclaporte.com/TikiSucks (external link).

As with many things, it's not always black & white. There are many shades of gray. The criteria below is intended as a guide to help developers decide is something should be "core" or "mods". Please improve/debate these!


Table of contents


License

If code is not compatible with LGPL, ask for relicense/dual license. If not, goto Mods.

Usage/popularity

Popular stuff should be in main code base. Very specific things in mods.

Size/complexity of code

Large external libs? Do we really want to add several more megs to the package?
But if it's a few dozen lines of code, is it really worth the overhead of the mods installer?

Stability / Is it maintained?

  • If a feature is not yet ready, mods can be a good place to experiment. Once it goes into core, people expect that there will be a clean upgrade path. See next point about DB.
  • If a feature is buggy, it can better in mods. However, features tend to improve if they are used and people report bugs, contribute fixes, etc.
  • If a feature is being phased out, mods can be a place so it's still available to the very small number of people that still need it. Once people have data in a feature however, it's very difficult to phase out. See next point about DB.

Does it involve affecting the database?

Does your code make many changes to data in core db tables? This could be a sign (though not necessarily) that it should be part of core rather than mods. Icon packs, themes and most wiki-plugins don't affect the database. So mods is OK.

Level of version dependency

Please see Dependency hell (external link). If code will work for sure in 1.9.x and 2.x, or so long as it is clear that you depend on a certain version, Mods is fine.

Reliance on 3rd party code, available to shared hosting

Something which depends on a piece of software which is typically not found on shared hosting should generally go to mods.

Translation

Things in mods tend not to get translated.

Security

If something can be potentially unsafe, better to send to mods.


So, again, there is no black or white. Just use common sense and consult with others. Some things like Tiki Maps depend on Mapserver, which is not available on shared hosting. On the other hand, it is maintained by Franck and he prefers it be in the core. So Tiki Maps is part of the core. Also mods did not exist when Tiki Maps was created so it may move in mods eventually.

Contributors to this page: marclaporte21258 points  , caralluna14 points  , Franck177 points  and nkoth84 points  .
Page last modified on Monday 03 November, 2008 03:07:32 UTC by marclaporte21258 points .

To register

To have an account at this site, please register at Tikiwiki.org (external link), and then use that user name and password to log in here.

This site gets user information from Tikiwiki.org with the InterTiki feature.

Last Comments

  1. more information from sylvie
  2. can not reproduce
  3. i could repeat it
  4. fixed in 2.4 thanks!
  5. seems to work for me

Search a Wiki Page

Exact match

Search Tracker Items Subject

Keywords

The following is a list of keywords that should serve as hubs for navigation within the Tiki development and should correspond to documentation keywords.

Each feature in Tiki has a wiki page which regroups all the bugs, requests for enhancements, etc. It is somewhat a form of wiki-based project management. You can also express your interest in a feature by adding it to your profile. You can also try out the Dynamic filter.

Accessibility (WAI – 508)
Action log 2.x
Administration
Ajax 2.x
Alert 3.x
Articles & Submissions
Backlinks
Backup
Banner
Blog
Bookmark
Browser Compatibility
Cache
Calendar
Category
Charts
Chat
Comment
Communication Center
Compression (gzip)
Consistency
Contacts Address book
Contact us
Content template
Contribution 2.x
Cookie
Copyright
Custom Home (and Group Home Page)
Database independence
Database MySQL
Date and Time
Debugger Console
Directory (of hyperlinks)
Documentation link from Tiki to doc.tikiwiki.org (Help System)
DogFood
Drawing
Dynamic Content
Dynamic Variable
Ephemeride
External Authentication
FAQ
Featured links
File Gallery
Forum
Friendship Network (Community)
Game
Gmap Google maps
Group
Help System
Hotword
HTML Page
i18n (Multilingual, l10n, Babelfish)
Image Gallery
Import-Export
Install
Integrator
Interaction
Inter-User Messages
InterTiki
JS Calendar
Karma
Live Support
Lost edit protection
Magic 3.x
Mail-in
Map with Mapserver
Menu
Meta Tag
Missing features
MindMap 3.x
Mobile Tiki and Voice Tiki
Mods
Module
Mootools 2.x
Multimedia 2.x
MultiTiki
MyTiki
Newsletter
Newsreader
Notepad
OS independence (Non-Linux, Windows/IIS, Mac, BSD)
PDF
Performance Speed / Load
Permission
Poll
Profile Manager
Quicktags
Quiz
Rating
Registration
RSS
Score
Search engine optimization (SEO)
Search
Security
Semantic links
Shoutbox
Site Identity
Slideshow
Smarty Template
Smiley
Spam protection (Anti-bot CATPCHA)
Spellcheck
Spreadsheet
Staging and Approval
Stats
Survey
System log
Tags 2.x
Task
Tell a Friend + Social Bookmarking 2.x
TikiTests 2.x
Theme
Trackers
Trackers (Mirror)
TRIM
User Administration
User Files
User Menu
Watch
WebHelp
Webmail and Groupmail
WebServices 3.x
Wiki 3D
Wiki History, page rename, etc
Wiki plugins extends basic syntax
Wiki syntax text area, parser, etc
Wiki structure (book and table of content)
Workflow (Galaxia Workflow engine)
Workspace
WYSIWYCA
WYSIWYG 2.x
XMLRPC