Re: [Nxtcommand-developers] Making Icommand ready for different NXTCOMMimplementations
Status: Beta
Brought to you by:
bbagnall
From: Brian B. <bba...@mt...> - 2006-11-10 01:11:50
|
> We should separate API (for end users) from implementation. > > At this moment from the icommand.nxtcomm package the NXTCommand class is > part of the API (method close()). > > package icommand.nxtcomm should NOT be part of the API > > Proposal: > > Make an interface NXTCommand in the package icommand.platform.nxt > with open() and close() methods. Should we just call it NXT in keeping with the other physical objects (Motor, Speaker, etc...) - On second thought, see below. > Change access modifiers in icommand.nxtcomm to package (= no access > modifier) as much as possible to prohibit access by end users. > > In the distribution Javadoc of package icommand.nxtcomm will not be > included, since it is no longer part of the API. I agree with that. End users won't be using that. > Puttng the NXTComm interface in package 'icommand' would even be better. > I need this interface to support multiple implementations. > > Then I do not need an Interface NXTCommand. > > This would however mean a "bigger" change in the API. > > NXTComm.open() and NXTComm.close() instead of NXTCommand.close() That's fine. Makes more sense really, since you are opening/closing the communications link. - Brian |