0

We're investigating porting a fat-client .NET application to be an HTML5-based webapp, but a hangup is that we interface with a variety of usb/serial/shared devices (receipt printers, report printers, specialty archive printers, sigpads, scanners, webcams, etc).

Is there any feasible way to get an HTML5 site the ability to interface with local USB/serial peripherals, or with a local service (e.g., browse to www.site.com/app and have it interact with localhost:1234/api to request things like signatures and send stuff like print jobs)?

The other option I was thinking of is to have a local thin-client type setup, which requests UI elements from the remote server's API, but internally has logic to know what peripherals are doing and passes data via the API.

The least preferential item is to try to write some sort of browser plugin, which is is tied with using a java applet. Silverlight might work, but I haven't researched it too much.

Ideally we'd like to do this to make our app cross-platform, and we're not sure what the best practices are for our situation, or what is the path of least resistance, etc.

Jørgen R
  • 10,568
  • 7
  • 42
  • 59
Alex Ray
  • 71
  • 1
  • 5

1 Answers1

0

Try to embed a web browser into a standalone application and code the interaction in the backend: Some alternatives:

You could of course use a local service application to do the dirty work for you and you would have to communicate somehow: WebSockets, AJAX requests. There are ways around the security measures that are coded into modern browsers (cross domain requests and DNS trickery) but the major hurdle will be to get your customers to install a service. If you manage that, then the service could very well serve HTML pages directly and handle requests for peripherals.

Emil
  • 1
  • I was considering something like a local web service as well. E.g., Serve app from http://remotehost.org/App Serve local device API from http://localhost/API Use JSONP or CORS to let http://remotehost.org/App interact with host hardware via http://localhost/API. Does that sound feasible? – Alex Ray Oct 31 '14 at 17:37