Fork me on GitHub
#untangled
<
2016-04-19
>
therabidbanana17:04:44

Added a new one to the list there - more routing/browser history examples

adambros17:04:48

hey guys, I’m considering making a change on untangled-client involving untangled.client.mutations/post-mutate, and I’m wondering if anyone is using it?

tony.kay17:04:13

@adambros: Please talk to me before making changes

tony.kay17:04:46

I'm writing lots of docs...need things to be in my head

adambros17:04:22

would you prefer i describe it here, private chat or in person?

tony.kay17:04:46

possibly with Ethan, since he is also in the midst of touching up stuff

currentoor21:04:18

Anyone have an example of how to create a migration with enums in datomic?

tony.kay21:04:07

migration to change them, or add them?

tony.kay21:04:17

in terms of syntax (we added extensions, but they don't affect that)

currentoor21:04:46

awesome thanks!

tony.kay23:04:54

@currentoor: So, that answered your question?

amashi23:04:26

So @tony.kay: can I ask you a very broad and maybe slightly contentious question?

amashi23:04:27

I've been looking at re-frame, and it makes a lot of sense to me. I actually wrote a gui app for Google last year that had a very similar architecture- not as FRP, because it was in Python, but... as similar as you can get in Python. So re-frame makes a lot of sense to me, intuitively. Nice and simple.

amashi23:04:11

I understand what they are doing, and why.

amashi23:04:56

Om.next is a bit of a puzzle to me, and I am sure that is only because I don't understand it.

tony.kay23:04:37

Ah...so, I have not looked at re-frame, but I need to. We're developing Untangled for our own purposes, started on it before r-f. Untangled makes om.next quite a bit easier, and the docs we're building should make it quite easy.

amashi23:04:56

So- and here is the contentious part- what is the advantage of Om.next? It looks complicated to me.

amashi23:04:11

Maybe just because I am not so familiar with its ideas.

tony.kay23:04:35

Right...simple vs easy. Om.next's central idea is quite elegant and simple, but foreign.

tony.kay23:04:48

It is also hard, because out of the box it does not supply what you need

amashi23:04:16

I think we can agree that any nice framework in cljs is excellent work- I'm not asking you to say that re-frame is bad, etc.

tony.kay23:04:16

then it has some complex bits (the parser)...that in my opinion are not really even needed on the client

tony.kay23:04:34

I cannot comment on re-frame...don't know it

amashi23:04:50

But I am curious about what you think the trade-offs are.

amashi23:04:03

OK, understood.

tony.kay23:04:16

yeah, have you watched my PDX talk on Untangled?

adambros23:04:23

as a note: re-frame is built on reagent if you know that one

amashi23:04:38

I have watched a bit of them- I should watch more I suppose.

amashi23:04:05

I have to admit that I really like text over video.

tony.kay23:04:46

I talk about the general merits of Untangled/Om.next in the portland meetup talk....that is the best I can do

tony.kay23:04:02

it takes quite a bit of time to cover the "why", but that talk is my take on most of it

tony.kay23:04:26

though it does assume a bit of knowledge about om.next....the Clojure West talk (also on YouTube) is a better beginner's guide.

tony.kay23:04:16

Reagent encourages a lot of embedded state, doesn't use a central atom (no support viewer), etc. I think in the small it is great. In the large, maybe not as great...but lots of ppl build great stuff with it, so YMMV

adambros23:04:56

im reading up on re-frame and it looks like it’s more of a pattern than a framework/library, and it uses a single source of truth

tony.kay23:04:26

Reading the intro to re-frame, it sounds quite interesting...I need to play with it

adambros23:04:40

they keep comparing themselves to elm

tony.kay23:04:50

and elm is pretty nice

amashi23:04:05

Well- I have only looked a bit at Elm, but it does indeed seem very nice.

tony.kay23:04:12

From what I see, the lack of a server interaction story seems to be a big missing bit. Om next/Untangled have a nice full-stack story

tony.kay23:04:49

but that could also be an advantage (of sorts)

amashi23:04:31

The thing that really made me sit up and take notice with some of the clojurescript frameworks is how they resembled the ad-hoc stuff I've been doing for a while, but hadn't really reasoned about.

tony.kay23:04:13

Quote from website: To build an app using re-frame, you'll have to: design your app's data structure. write and register subscription functions (query layer). write component functions (view layer). write and register event handler functions (control layer and/or state transition layer).

amashi23:04:17

I have actually really had to fight with people to get the "single app state" accepted as a reasonable idea.

amashi23:04:39

It makes a lot of sense though.

amashi23:04:57

The thing is- what do you do with transient state?

tony.kay23:04:30

The first 3 sound like Om/Untangled. The last is just different. In Om these are top-level abstract transactions. But they do actually sound quite similar

tony.kay23:04:37

transient state: see the talks

tony.kay23:04:54

got a meeting... @adambros can probably keep going simple_smile

adambros23:04:03

from the parts that ive read: re-frame => om-next The Signal Graph => Query Event Flow => Transactions

amashi23:04:08

OK- maybe we can talk more about this some other time.

amashi23:04:04

I will take a closer look at untangled in the meantime.

adambros23:04:30

i can tell you from having read the re-frame readme that untangled covers a lot more ground in terms of getting a production application up and running

adambros23:04:57

things like config, internationalization, server stack, (full-stack) testing, etc...

ethangracer23:04:19

@amashi: transient state in untangled can be handled either with React's component local state or a special namespaced keyword that doesn’t get sent to the server, so even though it goes in your app state, it never pollutes the server interactions

amashi23:04:25

Interesting. Does untangled have an opinionated view of synchronizing client state with server state?

adambros23:04:03

i dont think its any more opinionated than om next

adambros23:04:18

but that statement might need to be revised

amashi23:04:54

OK, well I might mean om.next as much as I mean untangled.

amashi23:04:16

Because for me- that's actually the hardest thing I have to deal with in many apps.

amashi23:04:26

I should note that I write a lot of hybrid apps- js running on phones with intermittent connections.

adambros23:04:34

currently you write a client side mutation and you return a map with :action for optimistic/client side updates and for each remote you would put under its name the value true or an updated ast (which you can think of as the params being sent)

amashi23:04:07

Where I have to give the user instant feedback, but be able to roll back user actions when they don't succeed.

adambros23:04:16

for intermittent connections the optmistic update covers the instant feedback

amashi23:04:28

And that's of course something that no framework can handle- you need policy for that.

currentoor23:04:35

@tony.kay: yes that answered my question

amashi23:04:42

But having to roll that policy myself in js is often painful.

adambros23:04:44

and then i think untangled keeps a queue of remote messages so it’ll send them off when it can

adambros23:04:06

and then we’re working on polishing the tx/fallback case, which is what you called “rolling back user actions when they didn’t succeed"

adambros23:04:57

the basic idea is that you tell it the name of the mutation to run in case things didn’t succeed

adambros23:04:27

and it can do any arbitrary action, eg: refreshing, showing an error dialog, etc...

adambros23:04:22

does that answer it?

amashi23:04:47

Well, the devil is in the implementation details, but having first-class support for that would be great.

amashi23:04:27

The last client project I did was a hybrid app, and... you wouldn;t believe how much code in it was about handling errors sensibly.

adambros23:04:11

well i would say at navis we all want it done well, and you are in the right time period to involved in the discussion and design of it

cjmurphy23:04:15

There is more work with reframe because of all the subsrciptions/reactions. With Om Next you don't even have to think about those, even as your components become quite complex. See the amount of work Colin Yates had to do just to get a table going with reframe.

amashi23:04:17

It is of course something that can;t be solved, really, by any tech. Policy is important.

adambros23:04:06

(in case i just threw out a name, navis is the company all of us working on and with untangled work at)

amashi23:04:21

Ah, OK. I will take a look at that. Thanks @cjmurphy. It is precisely cases that re-frame doesn't handle well that I am asking about.

cjmurphy23:04:51

You know the example? I'll find it...

amashi23:04:08

Hmm- what are you guys doing? I am ashamed to admit that I am not familiar with you.

adambros23:04:57

no worries, we’re in the hospitality industry

adambros23:04:26

tony mentions this in one of his talks, but untangled is the framework to move the company from VB/.NET

amashi23:04:31

ack. I'm afraid I have a bit of a prejudice against dotnet.

amashi23:04:03

It's not that I think there aren't great programmers on the platform- there clearly are.

amashi23:04:41

It;s just that every time a client asks me to deal with their backend people on dotnet it turns into an insanely bad scene.

adambros23:04:46

its not even the .NET that scares me (see F#), but the VB part

amashi23:04:56

I literally refuse to work with dotnet people now.

amashi23:04:26

OK, well I wouldn't do so if they were F# people.

amashi23:04:34

It's just that- well last year I was working with a company and...

currentoor23:04:35

@amashi: no offense but I recommend you don't proclaim your prejudices so casually. There really isn't much to gain by doing that IMHO.

amashi23:04:50

I had to co-ordinate with their back-end guys and...

currentoor23:04:20

especially when there could very well be ".net people" here

amashi23:04:28

I recognize that there are lots of great people working on dotnet.

amashi23:04:19

But I have found working with the platform very dangerous in the past.

amashi23:04:01

I don;t mean any offense.

adambros23:04:31

lets get back to #C0PULSD25, do you have any other questions?

amashi23:04:14

I imagine I will- I am going to spend some time working through your examples.

amashi23:04:00

I suppose the bigest question I have is a simple one. What does Untangled/om.next do better than other frameworks?

amashi23:04:25

It is clearly more involved than, say, re-frame.

amashi23:04:33

What does that buy you?