ModularBTodoroff

Proposal for 1.8 rearrangement

Created by: btodoroff, Last modification: 13 Nov 2008 (18:21 UTC) by xing
{{Exterminate|
|date=13-November-2008
}}

One of the biggest issues with a modular approch to bitweaver is how to convert the 1.8 code to be able to find all the necessary files, images, and includes that it needs without rewriting all the code. Tiki handles this with a flat file system so everything is on the same level. This makes it difficult to add/remove features cleanly and difficult to incorporate 3rd party apps.

In the middle of the night I had a thought. What if the package had their own directory under root, but they believed that they were running from the root directory as they currently expect? The code functions with little or no change, but the file system becomes organized and separated. The key idea for how to do this involves a simple surrogate page in root that I'll call display.php.

This file lives in the root directory and take two parameters: tpackage and tpage. tpackage points to the package say "wiki" that is being run. tpage points to the page that should be displayed, say "tiki-editpage". The url http://www.bitweaver.org/tiki-editpage.php would become http://www.bitweaver.org/display.php?tpackage="wiki"&tpage="tiki-editpage".

Inside of display.php is some simple code that:
  1. Sets up any bitweaver variables (eventually all the core initalization happens here and package pages become simpler. Also can detect the root location in the file system and the URL.)
  2. includes the package page which runs it's code as if it were still in the root directory.
  3. Does any cleanup needed (serialize bitweaver data and such)

Initially this is a very simple page with only a few lines of code and the pages take care of most of the initialization. Eventually this page handles more of the core initialization and the package pages become simpler.

The biggest issue is examine is with access to module specific files such as additional includes, images, icons, ect. But for Tiki 1.8 specific code, they all live in root anyway. Perhaps we use this mechanism just as a hold-over while we adapt each piece to a better architecture. Truly converted features could be accessed with a more standard url like http://www.bitweaver.org/module/page.php.


Comments

by , 20 Jun 2005 (15:23 UTC)
cool
  Page 1 of 1  1