Website Workflow – How to Design Efficiently

design-patternsMySQLPHPworkflows

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:

  1. active patient record.
  2. authentication with different roles (eg. patient,nurse,dr)
  3. appointment schedule (include calendar to schedual vacinations/surgeries etc with a reminder)
  4. allow doctor to create his own plugins.
  5. dashboard for doctor to view his statistics

Then I started with codeigniter/mysql/php/jquery and started coding.

My steps during development:-

  1. 1st database.

enter image description here

I started by creating all my tables that I will need.

  1. 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):

enter image description here

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?

Best Answer

Your question - what's the process for developing a piece of software - is a hotly debated topic; just google "software methodology" to see how deep this can of worms goes...

There's no commonly accepted answer. In fact, if you ask 5 programmers, you'll get 7 answers, in my experience.

I'd recommend buying Steve McConnell's "Code Complete" to see the lower-level coding practices - things like how to lay out your code, how to comment it, how to test it. I'd recommend "Domain Driven Design" by Eric Evans for an overview of how to structure applications at an architectural level. I'd recommend "Agile Software Development: Principles, Patterns and Practices" by Robert Martin as an overview of how to "grow" software over time whilst maintaining quality.

Another developer is likely to reject all of these books, and point you at UML, the Rational Unified Process, and code generation. There's no right answer!

Related Topic