Accessibility Now
Join our upcoming webinar about accessibility standards and legislation. May 19, 2022.
Blog

Accessing hardware from web applications

By  
Ilia Motornyi
·
On May 3, 2016 4:30:00 AM
·

Web applications accessed with a browser are more powerful than ever, and in many cases they have already replaced desktop applications. For example, many of us have started to use GMail as the primary email client. However, there are still some areas where a browser-based solution does not work - hardware access.

Browsers use a technique called sandboxing to limit the API that the possibly unsecure code from internet can access. Sandbox limitations can often be overcome with trusted and signed code. Java applets used to be a common cross platform mechanism to achieve this, but as they are fading away, other alternatives are needed.

One of the alternatives is to use the low-level APIs provided by Google Chrome Platform. These APIs are accessible for signed Chrome Apps, but not for regular web pages or even for Chrome extensions. Otherwise you are using web app technologies to implement your application and you can embed a Vaadin based application in it and this way store the data from your hardware to the server.

I recently wrote a PoC and a tutorial for this kind of setup. The tutorial demonstrates how to write, run, and distribute an application which uses serial ports for collecting environmental data.

Read the complete accessing hardware tutorial
Ilia Motornyi
@Java since 1.1
@IDEA since 3.0
@Vaadin since 7.4
Other posts by Ilia Motornyi