Hacker News new | ask | show | jobs
by tjchear 1556 days ago
Seeing Pockit gives me an idea: can we do something similar for Web APIs?

Perhaps a web app with a 2D board where users can place modular blocks the same way one would place Pockit blocks on the magnetic breadboard. We could have a geolocation module, vibration module, button module, slider module, camera module, etc. Like Pockit, the system finds a script with the closest matching blocks to what's placed on the grid, and runs the script. E.g placing a camera flashlight module + button module on the grid triggers a script that would toggle the light when the button is pressed. User could also write their own scripts.

3 comments

This is what Web Components[0] was supposed to be, but it didn't really take off.

[0]: https://developer.mozilla.org/en-US/docs/Web/Web_Components

Far as I understand, web components are used to build websites / web apps. I was talking about how a phone carries a suite of sensors and various capabilities that we can make accessible in a manner similar to Pockit.
Oh, I misunderstood your comment then "can we do something similar for Web APIs?", I thought you were referring to a similar way to build web apps.
For a more recent development, https://blockprotocol.org/
It's already done. This is how these "website builders" (e.g. Wix) works - your put different modules onto a template and build your site out of these.

Also Drupal and Wordpress have similar funcionality via plugins.

Right, but I wasn't talking about website builders. I'm talking about enabling access to a phone's various sensors and capabilities through a manner similar to Pockit.
How would that be different from NodeRed? https://nodered.org/
What I have in mind is rather different. Imagine your phone simulating a Pockit experience, except the sensor modules are what your phone already provides (e.g geolocation, gyroscope, accelerometer, etc), the I/O are simulated buttons/sliders and screens.

That's what I'm thinking.

That is a cool idea :)