mardi 22 mars 2016

"Request of work" design software architecture


in my scenario i have a client that fill a form and the server have to insert a request of work. I would like to create a flexible, cohesive and non coupled architecture so it will be easy to mantain. What troubles me is: 1) how to treat all properties that come from the client? 2) how to design the set of classes and interface (with design patterns?) to insert (and validate) a request of work?

In this scenario there's a tangle: exist different kind of requests of work depending on the customer who submits the request, so i should keep in mind that "Request A" of the customer "X" could have some different logic from "Request B" of the customer "Y".

To make an example of requirements:
Customer John fills the form with these characteristic: type of request, task and description
Customer Jack fills the form with these characteristic: type of request, equipment and description
Customer ThatsMe fills the form with these characteristic: type of request, task, description and priority

For John a valid request is when task is not null.
For Jack the request is valid where description is equal to "test".
For ThatsMe exists a default validation that just checks if Description is not null.

Looking forward, everything is translated in inserting rows in a database in different way, but this is another kettle of fish...

Thanks all for every suggestion.

Max

Aucun commentaire:

Enregistrer un commentaire