CodeIgniter Forums
How do you document your CI code - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Best Practices (https://forum.codeigniter.com/forumdisplay.php?fid=12)
+--- Thread: How do you document your CI code (/showthread.php?tid=67911)



How do you document your CI code - muuucho - 04-23-2017

Does anyone know a smart approach to describe a Codeigniter Workflow for another programmer (or yourself, when you return to your code after 6 months)

I have tried to write down the workflow for Ion_auths forget_password functionality to serve as an example. It goes like this:

Controller/Auth/login()
render(auth/login)

Views/auth/login
Holds a link ‘forgotten_password’, a click calls

Controller/Auth/forgot_password()
render(auth/forgot_password)

Views/Auth/forgot_password
Holds a form with a email field, the form posts back to

Controller/auth/forgot_password($post)
The email is validated and passed to

libraries/ion_auth/forgotten_password($email)
The method calls

models/ion_auth_model/forgotten_password($identity)
A forgotten_password_code is generated and inserted to talbe users to the user with the passed emailadress. Return.

libraries/ion_auth/forgotten_password()
...and so on.


As you can see I came up with a simple formattting system, showing all new requests/calls as a new paragraph with the requests/calls  as headings in bold text.

Now, how do you do? Do you use tables? Paper & pen? Is there any flow-chart programs out there?