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, Gallery, SquirrelMail,or any of the multitude of other open source web applications into Tiki. Tiki is a great piece of software, one which I settled on after reviewing all open source CMS systems. The adoption of ADODB was a major undertaking, and one that truly will move Tiki into much more demanding environments. 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. If you would like a copy of this code, simply check it out of CVS with: 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/ for an initial reorganization, or an in progress demo. Most everything has been put in what seems to me a much more logical, modular grouping. Nothing was thrown away, nothing was added. I do not want to write any functionality because I know the code that's there will work once I fix paths and includes.
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:
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:
A few rules of thumb:
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() {
|