ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

How should I document my Codeigniter web app?

February 06, 2012 8:51am

Subscribe [3]
  • #1 / Feb 06, 2012 8:51am

    spurs_fan11

    3 posts

    Has anyone got good ideas for documenting a large Codeigniter web app?

    I was thinking of using a wiki to document functions, objects, classes, etc… But it might not be the best way. So if anyone has better techniques, software or anything else on this subject, please let me know.

    Thanks!

  • #2 / Feb 06, 2012 10:50am

    smilie

    506 posts

    Well, I would suggest (if project is really large) to start from Functional Design. This means, just in plain English (or any other language) description of your application. For example:

    “On login page, user must provide valid username (e-mail) and password. If this matches database values, user will be logged in and his credientals will be stored in session”.

    Once you have FD (Function Design), you can start working on Technical Design (TD). This is heavy technical documenatation, in which you should describe working of your application. On same example as above (login):

    “On the login page, two text input fields with maximum value of 60 characters will be displayed. Both fields are mandatory otherwise error page will be shown. Input values will be matched against database, table X, fields A and B, whereby field B will be encrypted using encryption as described in Appendix A…”

    And so on. This is only propper way of documenting projects.

    Beside this, I would also suggest to use PHPDocumentator lines, such as:

    /**
     * @desc     This function is used to validate login creditentials on login page
     *
     * @param    integer $email, email address (username);
     * @param    integer $pass, password;
     * @return   boolean
     *
     * @author   John Doe
     * @version  0.1, 6 February 2012
     */
    function login();

    Cheers,
    Smilie

  • #3 / Feb 07, 2012 9:22am

    PhilTem

    872 posts

    Using PEAR phpDoc is always useful since you can create a function overview easily with e.g. doxygen so you know exactly what every function does.

    Furthermore I love using http://revaxarts-themes.com/documenter to write beautiful “human readable” documentations like the CI user’s guide.

    At the moment I am also developing some “IgnitedDocs”-App that will allow developers to easily create CI docs with an interface similiar to theDocumenter but using the CI layout and supporting many docs with print and zip export as well. Hopefully I’ll get it finished soon since I need it, too :D

  • #4 / Feb 08, 2012 5:25pm

    spurs_fan11

    3 posts

    Cheers folks will give those a try.

    @PhilTem - would be interested in trying out your “IgnitedDocs” app if you’re looking for a beta tester 😊

  • #5 / Feb 08, 2012 6:32pm

    CroNiX

    4713 posts

    Look at the CI source code.  That’s how it should be documented.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases