Fork me on GitHub

Hello! Is there some example on how to use untangled client with non-Om based server? A legacy REST server, for example?


@bbktsk No, but it isn’t that hard. Look in the network namespace(s) in Untangled for the UntangledNetwork protocol and implemetation. Essentially you make such a networking object that can take your client request from the UI and turn it into the proper REST calls, and transform the response into EDN. So, summary: 1. Implement UntangledNetwork (essentially write a send method that can deal with your REST comms) 2. Install an instance as a remote on the client. Possibly as an alternate remote, like :rest 3. In your queries/mutations, name that remote: (load this :kw Component {:remote :rest})


then just remember that the Om query (from a component) is used in data normalization, so even though you may not need that to talk to your REST server, you’ll want the load system to know the full query so that when you obtain it, the value can be normalized into your db.


I.e. (load this :some-kw nil {:remote :rest}) will work, but any data you return from the remote will just end up as an opaque blob of data at the root of your db at :some-kw.


It isn’t done yet, but I think it improves over the other resources I’ve written (to date) in giving a summary of the motivation and benefits of the overall model. The loading bit isn’t done yet (possibly today), but the db and normalization stuff, I think, is pretty good.


@tony.kay Awesome, thanks, I will try that! I’ve read the new Getting Started and it made a couple of things clearer for me.


great, thanks for the feedback


the loading stuff I’m working on should also make that part much clearer. I added a section on traditional REST (yet to be written) because it keeps being asked


Hi @tony.kay, thanks for the great work on untangled. Was wondering what your thoughts were on building a realtime app with untangled


I think it is pretty well-suited, esp since websockets support is available as a networking option.


if that’s what you mean…if you mean like animation in gaming? less so.


you’d write most of that kind of thing in lower-level stuff for speed