Question: If you were about to start designing a n...
# ask-community-for-troubleshooting
v
Question: If you were about to start designing a new service now that should have API and UI and you would like the approach "API and UI are equal, because the UI uses the API", • How far can one get with this approach in practice? • Would you consider something else than OpenAPI? • Why do you think for example GraphQL is not a fit for Airbyte? Is it because GraphQL is data-oriented and Airbyte needed something more RPC? • Would you start the UI by bootstrapping from https://github.com/facebook/create-react-app like Airbyte did? What alternatives would you consider? • What reading would you recommend about APIs? I found https://cloud.google.com/blog/products/api-management - but there are too many articles to grasp its usefulness right away. Thank you.
1
d
How far can one get with this approach in practice?
I would say this is the way to go, otherwise your UI will have to jump through many hoops to use the api. If you look at our API, we have low-level apis as well as higher-level apis grouped under
webBackend
. Our UI mainly utilises the
webBackend
routes, which are composed of the low level routes so anyone can build upon Airbyte.
Would you consider something else than OpenAPI?
Why do you think for example GraphQL is not a fit for Airbyte? Is it because GraphQL is data-oriented and Airbyte needed something more RPC?
In my experience, GraphQL is great for data intensive applications and to minimise chatty-ness. I’ve also seen GraphQL used as in front of backend OpenAPIs to power just the frontend. I wouldn’t say we need something RPC per se - our API could be more restful and use HTTP verbs. I’d say that we opted for the simplest solution at that time and that was post style endpoints with JSON payloads.
What reading would you recommend about APIs? I found https://cloud.google.com/blog/products/api-management - but there are too many articles to grasp its usefulness right away.
Depends on what you are looking for. If you are looking api design, the way I cut my teeth was following along one of the many tutorials out there (e.g. https://restfulapi.net/rest-api-design-tutorial-with-example) and designing my own APIs while looking at Stripe, Yelp and Facebook apis for live examples.
Would you start the UI by bootstrapping from https://github.com/facebook/create-react-app like Airbyte did? What alternatives would you consider?
@Artem Astapenko is better suited to answer this
v
@Davin Chia (Airbyte) Thank you. I worded this last question wrong. Of course I meant to politely ask the Airbyte devs about the hindsight on using https://github.com/facebook/create-react-app. But indeed anyone else's opinion is welcome.
d
Artem is our frontend Airbyte expert 🙂
a
Hey Vlada. I saw your message yesterday and was going to answer for it today :) I would say that CRA is a great tool and allows you to bootstrap your app quite fast. I have also used react-boilerplate in the past but I would say that it’s a bit more complex and outdated by now. Main advantage of CRA is that it’s easily replaceable in future if necessary - you could eject it and work as with simple webpack bundled app In our initial requirements I assumed that our app will be mostly statically bundled so CRA is a great tool for it. But if you need server-side rendering I will advise you to check next.js
Also I have an opinion that graphql is actually a great tool and it suits well in our case. I regret that we haven’t used it form the beginning but that’s a decision we had made. Also I would say that graphql is actually some kind of rpc implementation but with a specific syntax for getting the data.
v
thank you!