I am a beginner in design pattern. I did some practice to improve my skills in this subject, but I am stuck now in this problem.
I cannot figure out which Design pattern suits more for this pattern:
I would create an object that its creation takes many steps. The process is described like that:
- The workflow receives a json string data like this {"jws": "some data"}
- It derserialize the data and get a value of jws attribute
- This value passes a validation process that its output is another json data (extracted from the jws attribute)
- This new json data is deserialized as "T" object
Another workflow is described like that:
- The workflow receive an object data
- It passes a validation process that return a string value
- This value is transformed to another type (dict as an example)
- Return the new value
I was thinking about AbstractFactory DP and Builder DP but I did not find how to model it.
I am using C# as programming language and ASP.NET Core
The instantiation of the 2 workflow it will be handle by dependency injection later
Aucun commentaire:
Enregistrer un commentaire