4 ms·
Frontend development involves I/O (server data fetching), which has implications - it is async - it can fail - it is slow TLDR you need a programmer to hand
by dustingetz 10y ago
Frontend development involves I/O (server data fetching), which has implications
- it is async
- it can fail
- it is slow
TLDR you need a programmer to hand-orchestrate the I/O.
REST (HATEOAS) link abstraction permits a general solution to data-driven user interfaces (this is why web browsers are a generic user interface for simple html-only applications), but they are slow due to the way the data fetching is handled - see former facebook manager Pete Hunt's quote here (2014) which predates GraphQL https://news.ycombinator.com/item?id=7601774 https://news.ycombinator.com/item?id=7601774. Essentially we are talking about the object/relational impedance mismatch, which has performance implications and generally requires hand optimizing by a programmer (tweak the backend queries to batch a lot of stuff and minimize database round trips; tweak the frontend to do as few network requests as possible..this causes the backend-for-frontend pattern (anti-pattern) where you get N backends each hand coded... you can't abstract over this and also have good performance. http://samnewman.io/patterns/architectural/bff/ http://samnewman.io/patterns/architectural/bff/) So you need programmers to figure out the right perf compromises and write the same shitty glue code over and over.
BUT if you have a graph oriented database with something like GraphQL to query it from the frontend, it's pretty easy to imagine abstracting over this stuff in a way that doesn't require hand-tuned performance e.g. Relay and Netflix Falcor, just needs one generic backend, and this paves the way for generic CRUD app word processor that outputs performant apps. If you abstract over I/O, the actual user logic code isn't async, there's exactly one place doing I/O (the generic runtime) so user code can't fail, data fetching is automatically batched properly so user code isn't slow. Don't need a programmer anymore, what you need is more like a business analyst who can write excel formulas.
My startup is building exactly this, it's called Hyperfiddle, email me directly if you'd like to talk about this or be on our mailing list when we launch this year. You can read a little more about it in this transcript of my LambdaConf talk last summer: https://docs.google.com/document/d/1hb9qB_d9jlDUpgTSBcFELGhKuWVecVzgGCcOeR9UueE/edit#heading=h.up2n5n7x3shf https://docs.google.com/document/d/1hb9qB_d9jlDUpgTSBcFELGhK...