Delegates and Events or Command Patter

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Reg

    #1

    Delegates and Events or Command Patter

    Hello, I have a situation where a text based protocol comes to my component
    to be handled.

    Protocol has differnt commands and they have different arguments.

    The question is that which is in C# world's way to handle different command
    a J2EE style Cpmmand Pattern Design Pattern or C#'s Events and Delegates?

    Any opinions of that? If Events and Delegates are proper how should I deal
    with differents of commands into Delegates and Events? Also return values
    may vary depending on command.

    thanks.


  • sloan

    #2
    Re: Delegates and Events or Command Patter

    I would consider delegates and events the DotNet "built in" implementation
    of the Observer Pattern, not the Command Pattern.

    check out dofactory.com and their "free design patterns" section as well,
    for C# specific code.




    "Reg" <reg@re.dot.net wrote in message
    news:fbn04b$uh0 $1@nyytiset.pp. htv.fi...
    Hello, I have a situation where a text based protocol comes to my
    component to be handled.
    >
    Protocol has differnt commands and they have different arguments.
    >
    The question is that which is in C# world's way to handle different
    command a J2EE style Cpmmand Pattern Design Pattern or C#'s Events and
    Delegates?
    >
    Any opinions of that? If Events and Delegates are proper how should I deal
    with differents of commands into Delegates and Events? Also return values
    may vary depending on command.
    >
    thanks.
    >
    >

    Comment

    Working...