Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Modern Web API's, dev tool protocol, serial/I2C,USB,BLE, ETC #6210

Closed
HansUXdev opened this issue Jun 9, 2020 · 5 comments
Closed
Labels
suggestion suggestions for new features (yet to be agreed)

Comments

@HansUXdev
Copy link

Part of what made node.js take off so much wasn't the http server, but rather, the runtime's ability to allow developers to use JS to write a server, mobile app, and even hardware.

In that same spirit, wouldn't it be advantageous to add direct support for serial, usb, ble, etc?

Also if the goal is to make it more "web like" or webby, adding support for modern web API's like #5954 mentions could be really help this.

There are also other API's beyond Serial API and the Native File System API, that could definitely help bring native-like app and hardware development to deno such as:

Browser Debugging:

  • Dev Tool Protocol
  • Would adding out of the box support for this drastically aid debugging between the server and client communication?
  • What about browserfy-like opening, refreshing, or even cross-browser visual testing?
  • Chrome, chromium-edge and firefox all use it (if I'm not mistaken).

Native / Mobile App API's

Light weight Database Stuff also addresses #5605

[Others Worth considering] (https://www.creativebloq.com/features/15-web-apis-youve-never-heard-of)

@nayeemrmn
Copy link
Collaborator

Duplicate of #4756 (deemed unhelpful to just list a bunch of web APIs), #1120 (devtools is already implemented), #1699 and #5605.

Please use issues to request a specific feature with a stated use case, and search for similar issues before opening a new one.

@HansUXdev
Copy link
Author

Please don't assume I didn't search for duplicates when I did. I searched for devtools and didn't see 4756 or 1699 similarly.

I get your request for a specific feature, which in this case is more about supporting hardware and native app development out of the box, which is why I wouldn't necessarily call it a duplicate of those or the one's I already mentioned.

Web API's are one way of doing it and more consistent with being "webby" but I'm sure there are other ways as well.

@HansUXdev
Copy link
Author

Although adding hardware/mobile app support isn't technically part of deno's goals, it is both what makes node shine and what holds it back in terms of making hybrid apps competitive.

The following core goals, in and of themselves make a compelling argument for adding web API's that allow hardware support out of the box.

  • "Given a URL to a Deno program, it is runnable with nothing more than the ~15 megabyte zipped executable"
  • "Deno programs which are written completely in JavaScript... ought to also be able to be run in a modern web browser without change."

Lets say even a few of the API's mentioned above were implemented (like serial and I2C).
Then lets say deno was used as runtime replacement for node on a PI, arduino, etc.
You'd have every thing needed to communicate to a hardware module.
On top of that, the device be able to run a single executable from a url or perhaps, better, watch the url for changes than re-run the denon program?
That could dramatically speed up dev time because it takes a hot minute to recompile code to a T2.

@monteslu
Copy link

monteslu commented Jun 9, 2020

as someone that's worked with node-serialport and noble (node BLE), i can say it's been a nightmare maintaining those projects as native plugins to node.

Would be awesome to see these as built-ins to deno. If there's any possibility to get webSerial from chromium into deno, we could have denobots powered by johnny-five :)

400px-DinobotsG1

@bartlomieju bartlomieju added the suggestion suggestions for new features (yet to be agreed) label Jul 14, 2020
@bartlomieju
Copy link
Member

Native / Mobile App API's

Some of those requested had already PRs opened, however they pose a significant challenge from the testing standpoint so I'm respectfully declining at this time.

IndexDB will make its way into Deno soonish. The rest of suggestions are not really actionable for us. Please open an issue with specific request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
suggestion suggestions for new features (yet to be agreed)
Projects
None yet
Development

No branches or pull requests

4 participants