Well, this afternoon I've met the rest of Nwiki workers, for discussing about how to divide the work and what programming guidelines we should follow, and how the whole work will be done.
At first, we've discussed about which tools we will use to work. These tools are:
- GIT: git is a kind of Control Version System, developed by Linus Torvalds. Over SVN it has the advantatge that maintains two repositories: 1 in the local machine and 1 repository on the Internet, so you make changes in your local, and when you feel good, upload all changes to the Internet server. It's quite similar to use as SVN.
- Trac: Trac is a Tracker. For now, we will use it to manage ourselves dividing the work (opening tickets) and notifying bugs. Push the screen to zoom it in.
Once the tools are stablished, now we can begin to work. First, we should follow the Moodle Coding Guidelines and some rules for ourselves:
- All functions that we program must begin with wiki_
- PHPDoc to all function (all function must be well-documented, description, parameters, return...)
- For all, functions we make, we should make a PHPUnit and test it. PHPUnit, in single words, are some test games to throw against the function you did to see if it works correctly or not. They all have a similar syntax. Moodle created their own method for testing PHPUnits instead of using a third-party software.
- Not using $_POST[] and $_GET[] variables to get values arriving from an external resource. Instead, we have to use optional_param() function to retrieve the value, either GET or POST.
- We have to keep in mind that we have to program HTML pieces of code in XHTML 1.0 Strict
- All CSS that we could need to add must be added into styles.php file. Moodle fetchs this file for additional CSS parameters if they are included.
- All permission which should be assigned must be located at mod/wiki/db/access.php file.
After that, we've discussed the database structure. This is the overall structure:
We must also document the application architecture. Too, we've mentioned some important files to consider:
- lib.php -> functions that Moodle calls automatically.
- locallib.php -> functions for internal use.
- version.php -> for allowing Moodle to notice a DB upgrade
- weblib.php -> to print screens
- languages files
- export folder -> for exporting methods
- db folder -> install.xml, upgrade.php...
After all this, I've been assigned to do the Database migration from ewiki and older nwiki version to the new wiki (Probably I have to program the upgrade.php file). Pigui told me that it could take me 2 months (omg!). Let's see the hardeness of my task... Time will tidy things...