3 ms·
We really need to implement the missing functionality Java applets are providing in plain JS, so applets can die. The last time i absolutely had to implement an
by y0ghur7_xxx 13y ago
We really need to implement the missing functionality Java applets are providing in plain JS, so applets can die. The last time i absolutely had to implement an applet was to provide my client with this functionality that was not available with pure JS:
- direct access to printer: the user wanted to print on a specific tray of the printer, without selecting it every time. JS only implements window.print() with no fine grained printer control.
- serial/parallel/usb access: access to a POS for card processing, and we needed to write some data on a smartcard.
- plain TCP connections
- read/write files on the local filesystem.
I understand that all these features require more control of the underlying hardware and need to be somehow secured, but we did not want to write a desktop app just for these features, and applets gave us the means to implement what the user needed.
Once JS can do that, applets can die a quick dead.
- Joister 13y agoOut of curiousity, why did it have to run in the browser?
- y0ghur7_xxx 13y agoWhy not? - "we did not want to write a desktop app just for these features"
- Joister 13y agoFair enough. I don't see JS getting those features though, especially FS/peripheral access. By completely leaving them out it makes sandboxing JS so much simpler.
- skybrian 13y agoWhy not an HTTP server running on localhost that provides these things?
- y0ghur7_xxx 13y agoYes, we thought of that too, but the installation of the server on every client was a lot more work than writing an applet. But it was a valid alternative if the clients using the app where few.