I have been thinking about this for really long time without reaching an optimum answer.
First of all, I'm a medical doctor who loves programming but never really studied it, except for home learning and lots of years of playing around with code in my free time.
Currently I'm trying to build a small project to manage my clinic, to do that I started by created a list of options I want to be able to do.
Example:
- active patient record.
- authentication with different roles (eg. patient,nurse,dr)
- appointment schedule (include calendar to schedual vacinations/surgeries etc with a reminder)
- allow doctor to create his own plugins.
- dashboard for doctor to view his statistics
Then I started with codeigniter/mysql/php/jquery and started coding.
My steps during development:-
- 1st database.
I started by creating all my tables that I will need.
- Created all my models to handle these tables (1 master model that handle basic read/write/update/verify while also considering my table relations
After that I start to code my views and controllers. I first created view HTML, then create controller that will handle this view, and started coding functions to make the view interactions work.
Example when coding the appointment view(controller booking.php):
created this layout and made table td's clickable, when user click : jquery get (booking/add_patient_form) and pop it up
when user save : post to booking/save -it save appointment then reload index() function
etc.. and I continued same steps of creating view then its controller -that contain all the logic this view needed - to accomplish whole project.
At the end I had all my target functions working fine, but since there was no PLAN from beginning and as the whole project was punch of brain storming and debugging with no what so ever plan, after I went so far in this project i find my self stuck with maintainability and flexibility! and unable to link them together.
I have feeling that every page on website is completely isolated from other and I can't even recall how each page is loaded and what functions are inside without peeking!
Is there anyway I can recover this and get a design out?