[HN Gopher] Building data-centric apps with a reactive relationa...
       ___________________________________________________________________
        
       Building data-centric apps with a reactive relational database
        
       Author : austinbirch
       Score  : 44 points
       Date   : 2022-03-02 17:39 UTC (5 hours ago)
        
 (HTM) web link (riffle.systems)
 (TXT) w3m dump (riffle.systems)
        
       | rmah wrote:
       | From what I can tell, it sounds sort of like a simplified
       | spreadsheet as a code library.
        
       | whiddershins wrote:
       | So ... would this pair even better with Svelte, so we become even
       | more reactive through the whole stack?
        
         | gklitt wrote:
         | Yeah, Svelte or Solid is probably a more natural fit than
         | React. But at the end of the essay we propose a weirder
         | alternative, which is to implement the UI templating itself as
         | just part of a DB query.
        
           | acidbaseextract wrote:
           | I've always had a soft spot in my heart for PHP style "raw
           | query in the template". Even as we've moved away from that I
           | feel like GraphQL recapitulates a lot of the reasons why
           | having queries tightly bound to views is convenient.
           | 
           | It feels like "put the template in the query" is a great Uno
           | reverse to "put the query in the template" and the associated
           | issues it brings, but I'll have to think on the consequences
           | more. Thought provoking article!
        
       | gillytron wrote:
       | Why should I care about this?
        
       | intrepidhero wrote:
       | An event driven, local-first, UI that automatically reacts to
       | changes in the underlying database is a pretty old idea.
       | 
       | https://docs.microsoft.com/en-us/dotnet/api/system.data.data...
       | https://doc.qt.io/qt-5/qsqltablemodel.html
       | 
       | Am I missing something novel in the article? I really feel like
       | I'm missing something.
        
       | michael_j_ward wrote:
       | If you are interested in this, they are presenting at an upcoming
       | indi-conference: "Have You Tried Rubbing A Database On it".
       | 
       | https://www.hytradboi.com/
        
       | brundolf wrote:
       | This is a very similar philosophy to the MobX library (normally
       | paired with React), and also to the programming language I'm
       | building: https://github.com/brundonsmith/bagel
        
         | gklitt wrote:
         | Yeah, MobX is a great tool for fine-grained reactivity +
         | managing state outside UI tree. I haven't seen anyone try
         | relational querying in MobX, would be curious if that's a
         | thing.
        
           | aidos wrote:
           | I've just skimmed the article but I'm definitely going to
           | give it a proper read.
           | 
           | We've built an architecture somewhat like this where we're
           | using MobX objects in the frontend (a graph of the db objects
           | effectively) that's patched by subscriptions to tables via
           | hasura. So we effectively have all the data on hand locally
           | all the time and use the reactivity on top of that.
           | 
           | We actually played around with sqlite in wasm because I
           | really really miss having a real relational db in the
           | frontend. We decided that there was just a few too many
           | unknowns to proceed further with the idea. Initially we were
           | using indexdb as a frontend cache but dropped that since
           | without adding more layers to it it doesn't provide much
           | value.
           | 
           | (Also played around with using Solid's direct mobx -> jsx
           | library without having react inbetween
           | https://github.com/ryansolid/mobx-jsx but, again, too much
           | unproven tech to build on).
           | 
           | The work you're doing here is super exciting. The developer
           | experience of what we currently have is pretty nice and I can
           | definitely see your model working out well in the future.
        
       | kureikain wrote:
       | anyone how what tool we can use to make those chart? It looks
       | friendly.
        
         | dhash wrote:
         | This art style screams Paper by FiftyThree
        
           | gklitt wrote:
           | Yep, we drew them with Paper. Great app.
        
       ___________________________________________________________________
       (page generated 2022-03-02 23:01 UTC)