Identifying the best pattern
Posted
by
Daniel Grillo
on Programmers
See other posts from Programmers
or by Daniel Grillo
Published on 2011-03-02T20:03:47Z
Indexed on
2011/03/02
23:33 UTC
Read the original article
Hit count: 323
design-patterns
I'm developing a software to program a device.
I have some commands like Reset
, Read_Version
, Read_memory
, Write_memory
, Erase_memory
.
Reset
and Read_Version
are fixed. They don't need parameters.
Read_memory
and Erase_memory
need the same parameters that are Length and Address.
Write_memory
needs Lenght, Address and Data.
For each command, I have the same steps in sequence, that are something like this sendCommand
, waitForResponse
, treatResponse
.
I'm having difficulty to identify which pattern should I use. Factory, Template Method, Strategy or other pattern.
© Programmers or respective owner