Settings

Theme

Ask HN: Is there any API to UI tool?

2 points by patlola 9 years ago · 2 comments · 1 min read


I mean, hit an API and render the UI, basically dynamically create UI from API. would love that kinda tool for rapid prototyping for my personal project.

smt88 9 years ago

That's basically what the entire web is: a data service that describes the UI to the front end. It wouldn't make sense to create (from scratch) an entirely new protocol/language for an API to create a UI when such a thing already exists.

And if you don't have a description of the UI that comes to the client along with the API payload, then how can the client know how to render it? It's too ambiguous -- data schemas are not deterministic when it comes to UIs. That's why HTML/XML are not sufficient for rendering UIs. You need CSS to tell the browser how it looks and JavaScript to tell the browser how it behaves.

The best you could do is an API explorer. But maybe React + Relay would get you closer to what you want.

oblib 9 years ago

You'd have to sketch out and describe some pseudo code for me to better understand what you're wanting but I'll mention that Bootstrap makes it pretty easy to rough out a UI.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection