I have three projects, a Client project, a Server project, and a shared Common project.
The code in the common project is referenced in both the client and the server. In the common project there are requests that are sent from the client to the server where they are handled in some way and then returned back to the client.
The server has a class that has a method Process() where the logic for each specific request exists.
This way worked fine when the number of different requests was small, but since implementing this design the amount of requests have grown and the Process() method has become large.
Now I want to split up the logic for the requests but the issue I'm facing is how to move the logic.
Since the requests exist in the common project and the handling of requests requires classes that are restricted to the server project (database etc) I can't just have the requests implement an interface with a Process() method and then have the logic inside the requests, because the client doesn't have access to the server specific logic (again database etc).
So my question is if there is a design pattern that can solve my issue or if anyone has any ideas on how to split the logic into smaller parts?
Aucun commentaire:
Enregistrer un commentaire