Implementing Command Pattern in Web Application
Posted
by
KingOfHypocrites
on Programmers
See other posts from Programmers
or by KingOfHypocrites
Published on 2012-04-04T16:48:43Z
Indexed on
2012/04/04
17:41 UTC
Read the original article
Hit count: 201
I'm looking to implement the command pattern in a web application (asp.net c#)... Since the commands come in text format from the client, what is the best way to translate the string to a command object? Should I use reflection? Currently I just assume the command that comes in matches the file name of a user control. This is a bit of a hack.
Rather than have a select case statement that says if string = "Dashboard" then call Dashboard.Execute(), is there a pattern for working with commands that originate as strings?
© Programmers or respective owner