DokuWiki

It's better when it's simple

User Tools

Site Tools


devel:refactoring

Code Refactoring

Certain parts of DokuWiki's code are grown over several years and should be completely overhauled. This page gives a rough overview on these issues.

JavaScript

  • clean up and consolidate duplicate code
  • make certain function more flexible to use (do away with hardcoded IDs)
  • get rid of eval where possible

Metadata

  • The whole system needs to be analyzed and redesigned
  • Maybe use a different format than serialized PHP

Page Saving

  • savewikitext() is one ugly lump of code
  • we should get proper return codes (or exceptions?) to see when and what went wrong

HTML

  • Some of the generated HTML code contains workarounds for very old browsers which we can start to ignore
  • Some code just doesn't make sense

Media Functions

Most of the functions in inc/media.php directly work with $_FILES, which makes it impossible to reuse them in other parts like XMLRPC or WebDAV. These functions are best to be changed to work with file handles instead.

devel/refactoring.txt · Last modified: 2015-05-23 15:51 by andi

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki