untangled

NEW CHANNEL: #fulcro
currentoor 2016-07-08T01:13:33.001999Z

@ethangracer: So this seems to be working https://gist.github.com/currentoor/f9fbc881b489718630f8ee36d6aaad75

currentoor 2016-07-08T01:13:59.002Z

I ended up not using the decorator pattern, just regular recursion.

currentoor 2016-07-08T01:15:24.002001Z

If I understand your usecase, this might work for you as well. Also I'll benchmark it but I doubt it has too much of a performance penalty, especially given the level of extensibility and reuse it offers.

currentoor 2016-07-08T01:22:33.002003Z

We'll probably move forward with this approach. It might be a little too custom-DSL-y for untangled. I'm happy to contribute it if there's interest? I promise my feelings won't be hurt if you guys don't want it!

2016-07-08T03:24:45.002004Z

@currentoor: Iโ€™ll play around with it for sure -- ultimately itโ€™s @tony.kayโ€™s decision to merge it, regardless we very much appreciate the work and thought that you and the rest of your team are investing in Untangled!

currentoor 2016-07-08T03:42:37.002005Z

No worries! We're happy to do what we can. We get a ton of value out of untangled.

2016-07-08T06:59:44.002006Z

@ethangracer: thx for your answers! the problem i see with this approach is when i have 2 autocomplete components on the screen (one for clients and one for products for example) and the user is changing the components faster than the server can respond and so the data gets merged in the wrong place because the params are overwritten by the other component

2016-07-08T15:01:20.002007Z

@w1ng: no problem! so with further thought I think I may still be misunderstanding. You have one autocomplete component class, but each component instance should have a different ident. So when you load data from the server, the data should be merged back to the location in app-state specified by that ident. Are you using different idents for the two autocomplete components that you mentioned?

curtosis 2016-07-08T15:44:10.002010Z

is untangled-datomic schema documented anywhere yet? it looks pretty much like yuppiechef/datomic-schema; is that a safe guideline?

tony.kay 2016-07-08T15:44:49.002011Z

@curtosis: exactly...we added some extensions

tony.kay 2016-07-08T15:45:20.002012Z

but those extensions are experimental..we're not even sure we want them

tony.kay 2016-07-08T15:45:42.002013Z

they were attempts at a general typing system with referential integrity checks

curtosis 2016-07-08T15:48:42.002014Z

I nosed around in the code and saw some of that, yeah.

curtosis 2016-07-08T15:49:41.002015Z

I had an apparently-justified raised-eyebrow response ... "this seems like it might be useful.... but maybe not...?" ๐Ÿ˜‰

tony.kay 2016-07-08T15:50:30.002016Z

right...it is less useful just from the fact that it is "advisory". You have to always use vtransact instead of transact

tony.kay 2016-07-08T15:50:49.002017Z

and any "run-time" by-hand changes to the db are not enforced

tony.kay 2016-07-08T15:51:07.002018Z

so, your data can still be made "incorrect"

curtosis 2016-07-08T15:54:52.002019Z

...which may be ok, since it feels like you have to be a little more thoughtful anyway about where you want to apply "invariants" in (idiomatic) datomic.

curtosis 2016-07-08T15:59:23.002020Z

may be ok, that is. As I said, thought-provoking. And thoughts I don't have time for on this project yet. ๐Ÿ˜‰

curtosis 2016-07-08T16:01:45.002021Z

I'm still in the land of datomic-schema-to-ui-query-schema impedance matching.

2016-07-08T16:23:42.002022Z

@ethangracer: I haven't used indents, but I think thats the right way to do this thx !