Skip to main content

Questions tagged [command-pattern]

Filter by
Sorted by
Tagged with
0 votes
3 answers
589 views

I'm writing a simulation of a car that can receive commands and act on them and I'm trying to implement it using the command pattern. class Car { move() { console.log('move'); } } interface ...
Epsilon's user avatar
  • 109
0 votes
1 answer
173 views

I have three layers. I wish to reduce coupling between them and other modules. I wish to use the command pattern between all layers. A command should be able to be passed from one layer to another. ...
reign's user avatar
  • 125
3 votes
1 answer
244 views

In a document editor application, is it better to implement the command pattern as a layer on top of the object model, or to deeply integrate it into the object model? If commands are a layer on top, ...
Trillian's user avatar
  • 141
1 vote
1 answer
281 views

I'm refactoring a code base to have something more easier to read and follow SRP. However I'm at the point I'm unsure what the best design is. Currently it looks like this: A thread receives a "...
Cromm's user avatar
  • 119
0 votes
0 answers
54 views

DataModel contains a Proof that contains all the information of its integrity along with the method with which the Proof should be verified. In this case I designed a JWS type of proof that can be ...
Antonio Santoro's user avatar
0 votes
2 answers
489 views

I have workflow where I have complex command handlers encapsulated inside aggregate. These handlers emit some events, and then further logic based on result of these events can emit more events. ...
chris's user avatar
  • 101
0 votes
2 answers
2k views

Let's say I'm building a simple console app which has three commands: Create category. Download recipe from API to category. Display all recipes in a category. Assuming the app will grow, I use the ...
Lucas's user avatar
  • 139
7 votes
3 answers
7k views

I am pretty new to programming languages and only have limited knowledge about design patterns, so I hope you can help me with the following problem: I have an application that operates on a group of ...
Martin's user avatar
  • 91
0 votes
1 answer
62 views

I'm doing a Java software engineering team project in school and my team has decided on a Finance Tracker application, which contains the main components of Expense, Budget, Statistics, Suggestions ...
Prashin Jeevaganth's user avatar
1 vote
1 answer
132 views

I have made an application that deals with collections of images. Currently it has a REST api to add/remove images, create/clear/delete collections and a worker that can automatically fetch images ...
alexk745's user avatar
0 votes
3 answers
681 views

In Elements of Reusable Object Oriented software by Erich Gamma, the intent for Command design pattern says: Encapsulate a request as an object, thereby letting you parameterize clients with ...
Navjot Singh's user avatar
5 votes
1 answer
1k views

I trying to learn the Command design pattern, I already know how it works and where it is used, but I'm a little bit confused about the implementation. So I know we need to set the context by ...
Wojtek Wencel's user avatar