|
I was looking for a Command pattern implementation in Python... (According to Wikipedia ,
the command pattern is a design pattern in which an object is used to represent and encapsulate all the information needed to call a method at a later time.
)
The...
Answer Snippets (Read the full thread at stackoverflow):
Yes, you do miss something: the command pattern is only necessary in languages that don't have correctly, the Command pattern is about commands like "File - Save", not commands like "svn commit", which is what....
|
|
This should be easy,
I am trying to come up with the name for a command class that is a collection of other commands. All the sub commands will be run, when the master command is run.
Any ideals?
Started by Ian Ringrose on
, 7 posts
by 7 people.
Answer Snippets (Read the full thread at stackoverflow):
Just create a generic Command and pass in a list of sub commands) then I'd use something like CreatePreferences....
Could use as is (i.e.
Composite Command, maybe?
Composite Command?
"Batch Command" would be my choice.
|
|
My question is related to the command pattern, where we have the following abstraction (C# code) :
public interface ICommand { Execute(); }
Let's take a simple concrete command, which aims to delete an entity from our application. A Person instance, for...
Started by Romain Verdier on
, 12 posts
by 12 people.
Answer Snippets (Read the full thread at stackoverflow):
Of IDeletable interface, then make the command take whatever base class or interface your entities use the parameters with the command object, either by constructor or setter injection (or equivalent Execute<T>(T args); }
And encapsulate....
|
Ask your Facebook Friends
|
In my current project I'm dealing with EJBs implementing huge interfaces. Implementation is done through a business delegate, which implement the same interface and contains the real business code.
As suggested by some articles like
http://code.google...
Started by Guillaume on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Then you can wire up: I will try to....
In your case, your commands that service method as the API instead of using the command pattern altogether.
Except we did not use the command pattern like you are currently doing.
|
|
I want to issue a series of Command executions, but only when the prior command succeeded. Right now i am raising an event within the command object indicating whether the command succeeded or failed. I am using this to control execution, but it feels...
Started by Josh on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
In your case, you could have the command call the delegate and only ....
I created a Command object that holds other commands, then fire each of them in turn when Do is called.
I got around this by setting up a command "chain".
|
|
I am in the design process of an application, and I would like to use the command pattern for undo/redo purposes. I did some research into the command pattern but the only thing I don't get is: Should a command have the undo and redo methods, or should...
Started by slayerIQ on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
It would be used to maintain the state requiredThe command....
The memento pattern would be used in conjunction with the command pattern, it is not a replacement to the usage of the command pattern.
From the stack.
|
|
Hi all:
I remember windows getting a command to search a pattern inside a text. Does there anyone know that?
Thanks.
Answer Snippets (Read the full thread at stackoverflow):
Even before then, there's the FIND command (goes all the way back to DOS 2.0).
For usage info.
|
|
Hi,
I use following find command to find and show all files having the input text pattern.
find . -type f -print|xargs grep -n "pattern"
I have many project folders each of which has its own makefile named as 'Makefile'.(no file extension, just 'Makefile...
Started by goldenmean on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
-type f -name 'Makefile' | xargs egrep -n "pattern"
use egrep if you have very long paths
Duplicate-terminated method:
find .....
-name Makefile | xargs grep pattern
find .
Hence the command would be:
find .
Filename pattern.
|
|
I've done some WPF programing and one thing I never got was the command pattern. Every example seems to be for built in ones, edit, cut, paste. Anyone have an example or suggestion of best practice for custom commands?
Started by Brian Leahy on
, 6 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Sample chapter on Important New Concepts in WPF: Commands
MSDN article: The Command Pattern In WPF, and Handlers
Wikipedia: Command Pattern
MSDN Library: Commanding Overview
MSDN Library: CommandBinding important....
|
|
For performance reasons, I am using the the Curiously Reoccuring Template Pattern to avoid virtual functions. I have lots of small commands which execute millions of times. I am trying to fit this into the Command Pattern. I want to add tons of commands...
Started by Tristan on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
I can't tell if your command queue changes often.
Unless you are building your command queue during compile time, what you want is impossible.
Functions and see if that gives acceptable performance.
|