Re: Design question ... Remote control and keyboard
Monday, September 8, 2008 01:26 PM
"Event" is generic.
"RemoteControlEvent" and "KeyBoardEvent" are specific. I call it "KeyBoardEvent" as remote also has keys. The Event and hence the inherited specific Events should have "Event Type" to identify what type of Event it is. Now write common events and make them specific.
You should also have a Helper which would help transform from KeyBoardEvent to RemoteControlEvent or vice versa if needed