helix

https://github.com/Lokeh/helix
Aron 2020-04-16T15:44:22.175100Z

I realized now that the fact that spec is not for production, this is now quite as helpful as I imagined to be πŸ™‚ I don't understand why people always want to implement great features in development that are impossible to ship for customers in production? Makes literally no sense, even Hickey said this about datomic that it's bad. Still, spec is said to not be used in production. I am baffled

lilactown 2020-04-16T15:49:57.175500Z

it’s still alpha software

lilactown 2020-04-16T15:50:48.176400Z

you are free to use it in production, and many people do, but they’re suggesting you don’t πŸ™‚

Aron 2020-04-16T15:51:07.176600Z

that's not what I meant πŸ™‚

Aron 2020-04-16T15:53:06.178800Z

"in production" like there is an unauthenticated person, filling out a form, and they are entering data on their side, I could ship code to them through browser to their mobile device where I use spec to verify/validate the data they enter and give feedback to the user, without sending back to the server the data

Aron 2020-04-16T15:55:35.180900Z

In my previous analysis I described an architecture where the schema is both used to describe access rights and namespaces for functions that manage the state, but also describes the UI structure (what page what to display, and if there is an interaction that results in data input, how that can happen and what data is allowed, what is not), and it also describes data that is expected by third party API servers for which I need to sanitize data

Aron 2020-04-16T15:55:55.181400Z

spec is just for the coder to check their own stuff, much more limited, no?

lilactown 2020-04-16T15:56:00.181600Z

ah, yes clojure spec is probably not the most ergonomic solution for that

lilactown 2020-04-16T15:57:46.183200Z

spec is mainly aimed at checking that data has the shape you expect and functions take in and return the values you expect

lilactown 2020-04-16T15:58:16.183800Z

it’s not going to be a good solution for access control, UI structure, or data sanitization

Aron 2020-04-16T16:00:57.184400Z

"spec is mainly aimed at checking that data has the shape you expect and functions take in and return the values you expect" all 3 categories are just this πŸ™‚

Aron 2020-04-16T16:01:49.185300Z

'access control' in the sense that which frontend compnent is controlling which part of the state

Aron 2020-04-16T16:01:59.185600Z

not which user is allowed to which resource

Aron 2020-04-16T16:02:15.186Z

That I couldn't do for a single user locally in a meaningful sense anyway.

Aron 2020-04-16T16:03:04.187Z

In clojure a lot of these already exist, while in javascript I didn't have keywords and namespaces to work with.

Aron 2020-04-16T16:06:18.190Z

It sounds very weird to me that the connection is not made between "spec is aimed at checking the shape of the data" and "does this data have the shape that is allowed to be written to some namespace path"? "does this data have the shape that requires validation message to pop up?" "read the shape of the data and for each shape display the predefined UI component" "does this data have the right shape to be sent to this API endpoint/method" ? To me it's clearly the same problem, requires the same solution.

Aron 2020-04-16T16:07:03.190900Z

So clear, that I already implemented it, so I am now just trying to convince people to not make arbitrary distinctions between software programmer and software user

Aron 2020-04-16T16:07:07.191100Z

πŸ˜„

dominicm 2020-04-16T16:31:53.192100Z

I've found these to be very different problems, based on my experience of trying to find the one true validation library.

Aron 2020-04-16T16:34:13.192600Z

"validation library" of course if you are looking for that

Aron 2020-04-16T16:35:01.193600Z

but what I described is agnostic on that front, you can use whatever validation library because the schema just describes the shape, it's on you to interpret it and implement the interactions

dominicm 2020-04-16T16:36:29.194600Z

In practice, not so. Forms define their shape differently from the JSON api, differently from the database storage mechanism.

Aron 2020-04-16T16:58:25.194900Z

@dominicm are you saying that my personal experience is not practice?

dominicm 2020-04-16T16:59:03.195900Z

Just relaying my own experience in this space.

Aron 2020-04-16T16:59:24.196400Z

no, you are disagreeing with me about what I experienced and you are explicitly denying my claims that I implemented this

Aron 2020-04-16T16:59:31.196600Z

: (

Aron 2020-04-16T17:00:04.197200Z

I just wish I wouldn't speak about it before I can make it open source because now it's just empty air, but wait some more and I will show you πŸ™‚

lilactown 2020-04-16T17:02:30.198500Z

I appreciate everyone discussing things that are important to app development in #helix but this is pretty off-topic and specific to #clojure-spec - please take this discussion there or into DMs if you want to continue

πŸ‘ 1
Aron 2020-04-16T17:06:40.199700Z

sorry, that was my fault. OTOH, I would be interested what you think you would need for helix components to be specced? I think that was the original subject from which we diverged?