I'm currently working on a project which involves integrating a poorly designed SOAP API into our Web Application.
The requirements are not fully spec'd out and as a result we're concerned that we may need to leverage Laravel's command bus in order to store these requests in a queue then fire off some Broadcast event when the results are ready.
In order to limit the impact this may have on our app. we've incorporated the command bus pattern heavily our design.
The idea being that we can simply modify our calls to the dispatch and updating our controllers accordingly.
However, my concern now is to how we're actually validating and building out the objects necessary for each SOAP request.
Currently, each Command Handler is acting as a sort of Facade in the sense that we're building out all of the necessary objects prior to submitting the request. Occasionally this requires hitting the API prior in order to see if a specific item is still available before updating.
What are the pros and cons of this approach?
Should I consider a more layered design? IE: Facades which build out the request then delegate responsibility to the appropriate command(s)?
Thanks in advance.
Aucun commentaire:
Enregistrer un commentaire