Fork me on GitHub
#hyperfiddle
<
2022-09-13
>
Daniel Jomphe20:09:10

I got 20 minutes to show off and narrate Hyperfiddle & Photon as possible substrates for a future experimental stack at work. With all this automatic compilation of client & server interactions, someone asked: what will we do when we need to expose a classical HTTP API for third-party integration?

Daniel Jomphe20:09:28

Overall, I think the team was very impressed. Thanks for each demo, team!

🙂 1
Dustin Getz20:09:42

we're embedded in clojure, you still get clojure

Dustin Getz20:09:27

i.e. no need to use Photon for everything

Daniel Jomphe20:09:21

Yeah, that was my on-the-fly answer: iterate N times faster to a "perfect" design, and when you know it's the one good for your product, then finally, start expanding efforts to produce the integration endpoints which are required. At least you won't have had to start from there, iterating it like we're used to!

Dustin Getz20:09:04

What is the complete concrete circumstance the person has in mind? We can make an example to avoid confusion

Daniel Jomphe20:09:00

HF Photon is great to produce interactive client-server code for a UI, but what if we want to expose an HTTP e.g. REST API for some external clients to integrate with their backend instead of having someone clicking through our UI.

Daniel Jomphe20:09:20

B2B interactions.

Dustin Getz20:09:31

so a backend REST endpoint side by side with the photon app?

Daniel Jomphe20:09:56

yeah - I was wondering if Photon might be put to automation for this kind of task too.

Daniel Jomphe20:09:29

e.g., yes you generate this UI client, but also publish specs for external callers to the backend "api" you generated based on this DAG.

Daniel Jomphe20:09:45

obviously, not sure it's a good idea to have it auto-generated, since it's so easy to edit client-server code, programmers might forget they'll break external clients. Might be better to go the traditional route.

Dustin Getz20:09:24

We can probably generate HTTP endpoints from HFQL definitions, and with clojure specs to document the interface

1
👍 1
Daniel Jomphe20:09:26

Thinking about it, if this generated concrete artifacts (git-versioned files), then at least breaking changes would be apparent.

Daniel Jomphe20:09:08

Even if you didn't generate concrete artifacts, you'd gen data, and we could spit it to git-versioned files if-when it makes sense, I suppose.