NOTE: this project is now actively underway at http://www.tikipro.org | |
|
My first objective is simple: I would like to make Tiki much more open to other people's code. I want to put phpBB My second objective is simpler: I want to modify as little existing Tiki code as possible. There is a lot of great code in Tiki and I have no interest in rewriting any of it. However, it needs to be better organized so external code can coexist peacefully within Tiki code, and coexist with other alien code trees within Tiki. My planning is a bit more in depth, however, I am strictly adhering to mose's #1 rule: USE WHAT EXISTS. got code? There is a separate module in source forge for this code called spidercore cvs đserver:user@cvs.sourceforge.net:/cvsroot/tikiwiki checkout spidercore
| |
Phase 1.9 - Tiki Packages ( aka Directory Restructuring ) | |
|
My design is simple: Put all files related to each feature into their own directory !!!First attempt complete!
see http://cvs.sourceforge.net/viewcvs.py/tikiwiki/spidercore/
The Golden Rule of Tiki Packages: Tiki should place the fewest possible requirements possible for a TikiPackage A Tiki Package is simply a directory in the Tiki root directory. The only requirement is a single file called "setup_inc.php" that will get included by TikiSetup. Optional files will include a "local_inc{{.$tikidoman}.php" for settings particular to a user's install. A TikiPackage will be all of the integrated features in lib/* or it could be an external app, like phpBB, adopted to use the Tiki framework. The solution is low tech and dirt simple. I do not see insisting on a large API infrastructure when some Packages might only need to execute a few lines of code. Other Packages might need a complex architecture. So let developer's decide for themselves how simple or complex to make their own Package. This should also allow ports to stay as virgin as possible, and stay much more up to date with their own code base. Tiki's current "lib" directory works very well and is the model for where I would like to start. My answer is to simply stuff all code for given features (wiki, blog, article, forum) into the existing lib directories. I would like to move the lib/* directories up out of the lib directory so that the Tiki root is one or two php files and bunch of directories, such as: /path/to/tiki/
There is a common KernelPackage that is simply a chopping and moving of the existing tikilib & tiki-setup files. See Phase 2.0 for details... | |
Phase 2.0 - KernelPackage - TikiCoreTwo & class encapsulation | |
|
I want to simply break up tikilib & tiki-setup into a few classes. When a new Package, such as phpbb gets ported to TikiTwo, all it needs is a database connection, and a framework within which to render it's pages. a phpBB port would simply invoke the same setup files that all integrated features now call. There have been many other proposals with a lot of great ideas. However, this proposal is intended to be much more evolutionary rather than revolutionary. A primary goal is to preserve as much as the existing Tiki code and infrastructure as possible instead of a large scale rewrite. This core will:
The migration will be done in a few key areas first (wiki pages will be the first to move). This will prototype the design and allow several development cycles to happen to ensure a proper design. When complete, classes like TikiLib or WikiLib will be deprecated and only kept for legacy features. Some detail: A new class structure is defined from which all Tiki classes inherit. The existing lib/* directory structure will be maintiained, and all existing libs can stay in place as migration takes place. The basic class inheritance looks like:
An instantiated class should typically represent a single object, such as a wiki page or article. Aggregate data functions are currently in the same class. Perhaps a derived TikiFeatureGroup class might be designed, but this is uncertain for now. A few rules of thumb:
Example: imaginary TikiFeature derived class, see TikiPage for real example class TikiFeature extends TikiBase
function TikiFeature( $iFeatureID = NULL ) {
function load() {
// This verifies data integrity. NOTE: pass by reference is crucial, because
if( empty( $inParams['required_column'] ) ) {
{... continue testing hash values various conditions ...} return( count( $this->mErrors ) == 0 );
// this method stores the data.
funciton expunge() {
| |