05.
Undoing Action Commands
Keep on Learning!
If you liked what you've learned so far, dive in! Subscribe to get access to this tutorial plus video, code and script downloads.
If you liked what you've learned so far, dive in! Subscribe to get access to this tutorial plus video, code and script downloads.
Whoops, an error! Please, try again later.
2 Comments
Hello guys, love learning design patterns and its pretty cool trying to implementing them refactoring your own code. Although its quite challenging. I have a question regarding this undo power in the command pattern. Its only possible becouse we are in a command line app, is it possible to be used in web app?
Im guessing that if the Request stack its finished and the Response had been delivered that's the end.. isn't? or there is a way to stop in the middle and wait for some user confirmation?
Thanks!
Hey @donwilson
That's a good question, yea the fact that we're handling the whole game interaction in the same Symfony instance makes things simpler, but in a request-response environment you'll need to introduce a storage mechanism (such as a database) so you can store and fetch the relevant data depending on the user's actions.
I hope it helps. Cheers!
"Houston: no signs of life"
Start the conversation!