ASOC app design question- communicating with serial devices and ASOC

Hi all,
This might sound like a philosophic question but it’s not meant to be, I just want to do the right thing as I develop my next app.
I am thinking about the design of my second ASOC app that will be using data from a connected USB-serial port device, and thought I would ask some advice from the MacScripter gurus before I decide on my approach. From days of Googling and study of the various options, there seem to be 3 options for me to integrate serial port functionality into my app:

  1. Using Serialport X , which would involve adding it as scripting addition in my app’s bundle and possible ongoing maintenance if/when it breaks with new OS releases. I would also need to seamlessly handle basic notifications such as the device unplugged, or added though, that I don’t see in SPX, and I know this can stop things in their tracks when not handled in code properly.
  2. Use the AMserialport wrapper classes by adding them to my project and calling the Cocoa functions from my app
  3. Installing the pythong-oblective-C bridge and using pyserial from a python script/app, or possibly writing in ASOC and calling the pyserial functions from ASOC if that can even be done. (I can’t see me learning another language (python) though just to accomplish this.

The app will only write to the device in initial setup and when the user changes the config of the device, but the data coming from the device is what has me concerned with stability/reliability, in that it sends an ascii string from once per second to dozens of times per second, although only 30-50 characters per string.

Although the easiest of the 3 at first glance seems to be Sp X, the best design might be to use AMSerial and call the functions straight from Cocoa keeping in mind memory and error handling that seems to be automated somewhat with the latter… I would also need to learn to incorporate those function calls into ASOC. Being only my second app I would like to continue to work in ASOC and use the experience I gained before, and since the GUI is going to a huge challenge, I want to make sure I am taking the best approach with the underlying serial port functionality.
Any advice is much appreciated.

I’ve been learning/coding/using Objective-C more and more in my apps, and I believe that it would behoove “all of us” (ie the Applescript community) to learn (some of) it because ASOC pushes us in that direction and from what else Apple is doing with Apps/sandboxing/etc it might mean more ObjC and less AScript (to do the same things).
I’d vote for the AMSerialport framework. Anything that needs to be high performance will push me into using ObjC when I can these days, and it sounds like a good candidate.
Over time you could move more code from ASOC to straight ObjC. One thing I’d do is try to ask the developer if AMSerialport is being updated or will be update and if it is or will be 64 bit, etc.

Thanks for the feedback. I too think it is probably the only sane choice. Unless there is something I haven’t discovered of course. Previously, with thanks to folks here, I was able to use a lot of shell scripts and call lots of Objc code from my ASOC app. Looking at the serial code both within AMSerial and the lower lever Apple code, it looks daunting though.
Again, probably the only way to move forward is with the objc framework and call it from ASOc. Just hope I can figure out the calling conventions to make it work!
Many thanks SMG.