I like to put databases behind APIs. But I don't map URIs directly to 
database entities. I map URIs to use cases and queries. A use case could 
make multiple changes to the system, not just change one table. A query 
doesn't necessarily map to a single entity either. The result of one query 
might contain data from several entities.

So the key here is to use the API like an entry point into your system, NOT 
an entry point into your database.

On Wednesday, October 19, 2016 at 3:54:44 AM UTC-5, Peter Damoc wrote:
>
> *The problem *
>
> I know how to implement a REST API and interrogate that API from Elm but 
> that *seams very low level. *
>
> I was curious about a language abstraction that would isolate my Elm 
> program from the actual database strategy.  
>
> How do you approach dealing with the databases? What is your strategy? 
> What options are there?
> Do you have any pointers to interesting perspective/approaches? 
>
>
>
> -- 
> There is NO FATE, we are the creators.
> blog: http://damoc.ro/
>

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to