anyway, this is more implementation detail i suppose, but the general spirit of bringing app state and db into one place i find compelling! i end up doing that with most of my personal app experiments (in frontend, bc i always avoid using dbs)
Conversation
yeah makes sense! curious if you have opinions on tools like yjs / automerge that help manage JSON data?
Also hear you on being afraid of SQL. Some of that is SQL's fault for being weird in various ways. But I'd like to see the core idea of relational used more in frontend...
2
3
Eg, any time you have flat normalized collections in JSON (eg, array of authors and array of books, instead of embedding books inside authors), that's starting to approach something where the relational model can be so helpful!!
1
1
100%, spoke to this in my other reply but thats kinda what i'm driving at — is what if riffle used json instead of sqlite (and sure, it can store the json in a sqlite or indexdb or whatever, but the SQL-ness is completely hidden from the app dev)
2
2
I think a lot of "SQL-ness" is off-putting not because of the core conceptual ideas (relations, joins, normalized data, declarative queries) but because SQL itself is just old and weird. I'm a big fan of relational queries but I kind of hate how the queries look in our demo.
1
1
It's fun to think about what a query language that's actually as nice as (or even nicer than?) working with JSON in Javascript would look like.
1
1
I think that GraphQL sets the bar for the projection language (i.e., the SELECT clause where you describe how the results are shaped).
I like the vibe of PartiQL for working with tree-structured data (like JSON) in a relational context: partiql.org
1
1
yea! agreed. i think i def spent a few weeks noodling on my ideal json-based language and ended up describing graphql lmao
1
2
Yeah, it's hard to beat for a lot of things! actually build out a little GraphQL -> SQL translator to make his app dev more ergonomic. My biggest beef with GraphQL is that the non-projection features seem much less flexible than SQL's; maybe I'm just a newbie though.
Replying to
yea ive never used it outside of the selector/projection stuff (and imo its really the killer feature) and any time i had to do anything outside of that i'd just give up lol


