Hacker News new | ask | show | jobs
by lewisjoe 1725 days ago
This is beautiful. I used to think about this problem deeply. The best imaginary system I did imagine was:

- A system that starts with our database schema

- a language in the front-end that abstracts away server connection and db access

- this imaginary language should allow defining react-like components but treat the db as a local datastore

- Most clients are UI stricture interpolated with that user’s data queried from the central db. So this imaginary front-end language should allow querying from user-level views from the db

Most of what I read from the post, looks like a realization of this dream.

2 comments

>"- A system that starts with our database schema

- a language in the front-end that abstracts away server connection and db access"

Optimal data layout for storage and for processing / presentation can be quite different. Automatically mapping one to another I think can not be efficiently implemented in automatic fashion. I've tried different frameworks that claim to achieve it but at some point you always hit the wall. As a result I've long abandoned all those attempts and do manual transformation in code that are optimal for my particular situations

You need to treat clients as zero-trust. Your db is just a vector for DOS attack if you don't.