简体   繁体   中英

Best cross-platform GUI and USB language

I am interested in developing a cross-platform application (mostly for Windows and Mac, Linux not so much) that will need a somewhat, but not overly, complex GUI (displays of graphed data) and will also have to receive input from an external controller via USB. I am interested what languages or combinations of languages (or frameworks, or whatever) stack overflow readers would recommend and why. I am familiar with C#, Java, Python and Ruby and have dipped my toes in the functional language pool, but would be willing to learn something new if it made sense.

Tcl/Tk is worth considering. It's arguably as much or more cross-platform that just about any other language. If you're developing a product you wish to distribute, no language has anything close to what tcl/tk has with starkits, tclkits and starpacks (confusing terminology; google is your friend). Think single-file distribution that contains everything (dlls, images, sounds, code) in a virtual file system.

It doesn't have usb support per se, but a great strength of Tcl is that it's very, very easy to extend the language with code written in C. So, do the USB-specific code in C and then create the GUI in Tcl.

Some people don't like Tcl -- it's a slightly unusual language that you can nearly master in a single day, or you'll work with it for a year and still not quite grok it. That depends somewhat on how open minded you are.

Some people also say Tk is dated or ugly, but a) ugly is in the eye of the beholder and b) sometimes ugly doesn't matter. If you're doing an in-house app, does it really matter if the app looks 100% like a windows app, or is 90% good enough? Often, good enough is plenty good enough.

I would suggest Java plus JFreeChart for a good graphing toolkit.

You haven't mentioned what kind of USB device you're talking to, but I've had some success using a USB device with drivers that create a virtual COM port (which I then accessed via rxtx ).

Googling around for Java USB libraries, I found jUSB (Windows + Linux) javax.usb (Linux + alpha Windows support). I suspect that supporting OSX will be difficult.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM