mercredi 16 mars 2016

Design Pattern for Pipleline/Stages in application

In my application, there are some stages through which a lead has to go through.

For example:

New
In Progress
Won
Lost

These are just four stages of 11 stages. On every stage, there will be some action that has to be performed.

For example, a lead moves from New to In Progress, I need to update a certain set of values in four tables.

What could be the ideal design pattern that I could use here so that in future if any new stage comes in, it becomes easy to accommodate that in code?

I was thinking of using Factory Pattern.

Aucun commentaire:

Enregistrer un commentaire