untangled

NEW CHANNEL: #fulcro
2017-06-11T15:39:25.875145Z

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

tony.kay 2017-06-11T17:13:30.177255Z

@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})

tony.kay 2017-06-11T17:16:34.187032Z

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.

tony.kay 2017-06-11T17:17:35.190301Z

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.

tony.kay 2017-06-11T17:18:39.193651Z

I’ve been working on a new Getting Started guide at https://github.com/awkay/untangled/blob/develop/GettingStarted.adoc

👍 3
tony.kay 2017-06-11T17:19:50.197244Z

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.

2017-06-11T22:20:21.198860Z

@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.

tony.kay 2017-06-11T22:43:36.269161Z

great, thanks for the feedback

tony.kay 2017-06-11T22:44:00.270342Z

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

az 2017-06-11T23:27:05.398883Z

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

tony.kay 2017-06-11T23:35:20.424914Z

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

tony.kay 2017-06-11T23:44:52.451709Z

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

tony.kay 2017-06-11T23:45:07.452503Z

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