mercredi 18 octobre 2017

Design Pattern in an Appointment Application

I need to develop an application for which would be used for appointments bookings and its flow. I have some key requirement points and would like the feedback on the design patterns I should consider in designing the application.

  1. There will be certain operations of an appointment e.g. book, paid, unpaid, walked In, under Assessment, etc. that can be called upon
  2. There will different states of each appointment e.g. Booked, canceled, In progress etc. Each operation listed in point 1 may behave differently in different states of an appointment
  3. Each Appointment will be made for different types of Persons/Entity. The Validations & States of each operation listed above will be dependent on the Type of Person for which appointment is booked. For example, "under assessment" state might not be required in case of a particular Type of Person for which appointment is booked.

In my personal view, the requirement 1 & 2 make me think to use the State Pattern so that I can write the behavior of each operation under a particular state. But I also need to cater the Requirement 3, so that I can also determine that which should be the new state depending on the Person/Entity involved, its validation and the current state. Anyone would like to put some feedback.

Aucun commentaire:

Enregistrer un commentaire