Re: [Nxtcommand-developers] static class vs. NetBeans vs. JavaBeans
Status: Beta
Brought to you by:
bbagnall
From: Brian B. <bba...@mt...> - 2006-11-08 19:01:47
|
I think I have a solution to the singleton/multiple NXT/instantiated objects dilemma. After reading about NetBeans, from what I can tell it's sort of an expanded version of JavaBeans that you can use visually in development environments like BlueJ, Netbeans IDE or Eclipse with the NetBeans plugin. The focus is making GUI apps that users can interact with visually. Also they can presumably be used as regular objects in plain text Java code, if we override the no-args constructor? I think we should keep the current static/singleton setup that mirrors leJOS and keep it in the package icommand.platform.nxt, but we could add another package for the Netbeans implementation. We should also aim for sharing common code between these two packages - for example, one place for code that calls Motor.forward(tacho) so that when we improve the accuracy of that call in one class it gets improved for all classes that use that call. It might be possible to just extend each Motor, Sensor, etc... class to make it into a Netbean? We need to figure out the proper architecture for this. - Brian ----- Original Message ----- From: "C.Ho" <cho...@al...> To: <nxt...@li...> Sent: Wednesday, November 08, 2006 12:25 PM Subject: [Nxtcommand-developers] static class > Static class has the limitation of its own. I prefer we change to use Java > bean methodology. One of the pitfalls of static class/method is we have > to look into the static class and method calls first before even trying to > encapsulate logics into one java class. > > I hope I communicate me points clearly. > > Cheung, > > ============================================================ > From: "Peter Joosten" <ptg...@ch...> > Date: 2006/11/08 Wed AM 11:25:59 CST > To: <nxt...@li...> > Subject: Re: [Nxtcommand-developers] icommand.nxtcomm.bluez > > This message was intended for the list > >> -----Original Message----- >> From: Peter Joosten [mailto:ptg...@ch...] >> Sent: Wednesday, November 08, 2006 6:24 PM >> To: Brian Bagnall >> Subject: RE: [Nxtcommand-developers] icommand.nxtcomm.bluez >> >> >> > >> > So rather than a package for each, we could just make an >> interface called >> > NXTComm with the relevant read and write methods, then have >> BluezNXTComm, >> > RXTXNXTComm, etc... The code could default to the best/most >> > common one but >> > if the variable exists then use the appropriate object. >> >> I will take care of it. >> >> > A user named Rojit from the leJOS mailing list says he got more >> > than one NXT >> > brick working with iCommand but then I changed it to singleton >> > static method >> > calls to match leJOS (i.e. Motor.A.forward() instead of >> > nxt.motorA.forward() ). Not many people have multiple NXT bricks >> > but if it's >> > possible to control more than one through Bluetooth we should >> > implement it >> >> I will see if I can come up with a proposal. >> I will also look at the usage of static, access modifiers, ... >> The existing code can use some cleaning up. >> >> > and close() althogether. People seem to favor the commands that >> > match leJOS >> > though. I'm not really sure what to do. >> >> Stick to the Lejos API as much as possible. >> >> > > icommand-bluez-native (eclipse CDT, c) >> > > ====================================== >> > > How about the name of the native library? >> > > Proposal: libicmdbluez.so >> > > >> >> I will commit a project icommand-bluez under icommand-projects >> >> Peter Joosten. >> >> >> >> >> >> > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Nxtcommand-developers mailing list > Nxt...@li... > https://lists.sourceforge.net/lists/listinfo/nxtcommand-developers > ============================================================ > > > Cheung, > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Nxtcommand-developers mailing list > Nxt...@li... > https://lists.sourceforge.net/lists/listinfo/nxtcommand-developers > |