command-pattern Questions
3
Solved
The Command pattern has an IReceiver interface with few methods and corresponding to each method there are concrete Command objects (implementing an interface ICommand with execute() method).
I h...
Brunner asked 8/2, 2016 at 18:42
7
Solved
Both design patterns encapsulate an algorithm and decouple implementation details from their calling classes. The only difference I can discern is that the Strategy pattern takes in parameters for ...
Warwickshire asked 7/10, 2010 at 16:22
2
Solved
When Looking at the command pattern a found a slight difference. May be some is able to more clearify this.
When looking at Gang Of Four it says that each command has a Execute Method see for exam...
Voronezh asked 7/5, 2015 at 8:41
2
Solved
So I have a program where you can log in and add/remove friends to and from the friends arraylist. Also I can like a certain thing and that thing will be stored into the likes arraylist. I'm asked ...
Bluebottle asked 15/4, 2015 at 20:41
3
Solved
Command pattern can be used to implement Transactional behavior (and Undo).
But I could not find an example of these by googling. I could only find some trivial examples of a lamp that is switched ...
Singlebreasted asked 28/8, 2012 at 6:16
2
Solved
Command pattern is for encapsulating commands in objects. But why not use function pointers instead? Why do I need to subclass Command for each operation? Instead I can have different functions and...
Pebble asked 8/4, 2014 at 11:8
1
Solved
I'm having a lot of problems lately because of what seems to be a bug in the MassTransit.UnityIntegration package, primarily due to the fact that registration names are not being considered.
For i...
Codicodices asked 20/12, 2013 at 19:23
3
Solved
Let's say I have a multi-dimensional array as a member of a class and a lot of methods, that loop through every element of the array and then operate on it. The code might look like this:
public c...
Serum asked 31/7, 2013 at 14:40
2
Is Invoker class optional in Command design pattern? Client needs to instantiate Concrete Command and Receiver for the command. Does client always need to instantiate Invoker and pass on the comman...
Legionary asked 14/10, 2012 at 5:40
1
I'm currently studying design patterns and I'm currently looking at the command pattern.
Here is my current code:
// this is the receiver
class Calculator : IReceiver
{
int x;
int y;
CommandO...
Maldonado asked 24/3, 2013 at 15:30
2
Solved
I have a situation where I'm debating how to architect my controllers.
Consider the following controller:
public class FileSharingController : Controller
{
private readonly ICommandBus comman...
Fuge asked 8/2, 2013 at 0:28
4
Solved
I've been searching for quite some time for a good solution to the problems presented by the typical Repository pattern (growing list of methods for specialized queries, etc.. see: http://ayende.co...
Electrodynamometer asked 20/1, 2013 at 0:1
2
Solved
I'm learning the MVVM pattern with a new(small) project, and I've one question about the way to invoke actions on our controller:
I saw many tutorial where they were telling us to use Command, imp...
Seamaid asked 27/11, 2012 at 9:58
1
Solved
After reading the the Avoiding memory leaks article by @RomainGuy I realized that my current Android application is plagued with the mistake of passing the application's main activity around. So wh...
Mather asked 2/7, 2012 at 13:5
2
Solved
What is the meaning of the dashed arrow in a UML class diagram in general?
As an example: What is the meaning of the dashed arrow in this image (from client to ConcreteCommand):
Article: Comman...
Millur asked 17/7, 2012 at 11:32
1
Solved
Is there a library out there that already provides the interfaces we need for the command pattern in Java?
For example:
public interface Func1<T,R> { public R execute(T input); }
public ...
Mei asked 1/5, 2012 at 22:3
1
Solved
I know one of the goals of pure functional programming is to eliminate mutability, and therefore to preclude side-effects. But let's face it, Java is not a functional language even with all of the ...
Caren asked 1/3, 2012 at 23:41
2
Solved
Currently I'm trying to implement Transaction Script pattern (Exactly how Martin Fowler described by using Command Pattern) in a simple test project, everything just work fine, the problem is where...
Tal asked 14/1, 2012 at 14:39
3
Solved
I have a list of jobs queued in the database which I need to read from database and execute them in parallel using threading and I have a list of command classes to execute each of those jobs all i...
Baldheaded asked 9/1, 2012 at 12:21
1
Solved
I'm using the Command Pattern for the first time. I'm a little unsure how I should handle dependencies.
In the code below, we dispatch a CreateProductCommand which is then queued to be executed at...
Mainstream asked 7/7, 2011 at 22:39
9
Solved
Once I had a discussion about design, relative to the command pattern.
My peer stated that a command object should not return the status (successful, unsuccessful, and why) after the .execute() met...
Brickwork asked 20/7, 2009 at 17:50
1
Solved
I'm using the command pattern for passing a command from a client to a server via a TCP/IP socket. The server will take the command object, deserialize it and then call execute() on the command obj...
Roadability asked 16/2, 2011 at 16:42
2
Solved
It seems like whenever I use the Command Pattern, it always leads to a significantly larger number of classes than when I don't use it. This seems pretty natural, given that we're executing c...
Canaliculus asked 5/2, 2011 at 17:43
1
Solved
According to this video here [@ 7:50] Google is recommending the use of the Command pattern on top of its request handling API. There is also a helpful looking project gwt-dispatch that implements ...
Adequacy asked 14/7, 2010 at 4:44
2
Ok, this is kinda dumb. I'm trying to wrap my head around the use of
the MVC and Command Patterns. The questions basically concern where to
place code.
In the MVC pattern, where are the Commands i...
Saucy asked 30/6, 2010 at 9:47
© 2022 - 2024 — McMap. All rights reserved.