Making applications in Chrome Extensions for hardware - Page 1
Forum section: electronics / projects

author: Ribster
author_rank: Frequent Contributor
timestamp: May 09, 2017, 09:06:54 am
content: Hey,Has anyone had experience with chrome extensions for hardware ?My goal is to communicate via an RS485 transceiver of the sort, to make an interface application.I can do this in Qt, where i have a cross platform application, but it still needs to be compiled for all the different versions.I'm wondering if a web interface is the better choice, but the ability to couple to hardware needs to be present.I think you can achieve this with JAVA, although i don't have experience in that. Only C, C++, PHP, etc... Web, embedded and pc applications.Is going with the chrome plugin route a viable thing, or should i seek for something else to get my communication working with the web interface?Any input is valuable, thanks in advance!

author: Jeroen3
author_rank: Super Contributor
timestamp: May 09, 2017, 10:03:38 am
content: If you want your application to work 2 years from now you should definitely not use Chrome plugins. The environment is very volatile.Instead, use Qt. You could use a web-ish GUI implementation in Qt, or QML is you have the license. It'll compile for all platforms if you keep inside Qt api's.And there is the inevitable problem of the Chrome sandbox you'd have to break-out, and will be limited by.Don't use Java for end-user applications. Java's lifetime has expired. Support is crumbling away.

author: Ribster
author_rank: Frequent Contributor
timestamp: May 10, 2017, 01:25:17 pm
content: Hey Jeroen, Thanks for the reply!I was looking at the cleanflight chrome app as a starting point..https://github.com/cleanflight/cleanflight-configuratorCan you clarify what you mean with web-ish GUI implementation in Qt ?Host a webserver with the Qt application or what ?

author: Jeroen3
author_rank: Super Contributor
timestamp: May 10, 2017, 04:16:52 pm
content: Qt can use a webview that you can use for gui stuff. You could make a webserver if you're desperate enough. But you have a remote webpage that needs communication with local hardware?

author: David Chamberlain
author_rank: Frequent Contributor
timestamp: May 10, 2017, 04:51:59 pm
content: I would also avoid browser plugins and extensions as that will lock your users in to a specific browser vendor.Here is what I have done before. Write a little HTTP server with NodeJS (or Python if you prefer and plenty of tutorials on the web to do both) that listens on port 8080 or something. Then create your GUI as an interactive web app taking advantage of all the HTML5 goodness on offer. Then add to that an AJAX / SOAP interface to poll for updates that are buffered by the Web Server. No need for compiling things or Qt.The advantage of this are...a) The server will run on ANY OS that supports either NodeJS or Pythonb) NodeJS and Python will give you direct access to system resources (perhaps through third-party addons)c) is not running in a sandbox making point b) easier.d) With a little port forwarding magic on your router you could access and control your hardware from anyplace on the planet.e) will work in any browser even mobile ones.f) this list is endless.

author: Ribster
author_rank: Frequent Contributor
timestamp: May 10, 2017, 05:04:47 pm
content: Thanks for the input guys.@Jeroen3:But that Qt program still needs to be compiled for different platforms. So making it web based surely solves some issues, but it's still convoluted i think.I want to make a management software that communicates with a serial device. Simple in the beginning, but adding logging functionality in the future would be nice.@Pixulator:That's actually not a bad idea. It can be easy enough if i link it all together. What i'm missing a little bit is the ease of transfer... I should just be able to send someone a ZIP file, let them extract it, execute and ready to go, cross platform. This with minimal overhead of maintaining different versions for different platforms. The low level interfacing is just serial, so not that special...Thanks both for the input, i'll investigate it further before starting a proof of concept.

author: Jeroen3
author_rank: Super Contributor
timestamp: May 10, 2017, 08:58:34 pm
content: Python is actually a good idea. That would be truly cross platform, and it does not look like you need a very high performance.

author: sleemanj
author_rank: Super Contributor
timestamp: May 10, 2017, 09:44:44 pm
content: Quote from: Ribster on May 10, 2017, 01:25:17 pmI have been thinking about the same idea, use a browser to talk serial for runtime configuring stuff, looks like that cleanflight configurator would be a good place to fork from.