clj/cljs shared (validation) code in cljc folder

16 views
Skip to first unread message

Xinhui ZENG

unread,
Jun 6, 2021, 2:46:41 PM6/6/21
to Luminus
Hi,

The idea of code sharing by cljc is certainly nice. On the other hand server side validation logic is exposed to client is that a concern?

Thanks.

Dmitri

unread,
Jun 6, 2021, 2:52:01 PM6/6/21
to Luminus

What ends up being shared is defined by the developer, so I don't see too much concern there. The main use case here is in cases where you want to do client side validation of the input before sending it to the server to improve user experience and optimize network load. Writing validation once is much better in this scenario since you won't have to maintain duplicate logic.
Reply all
Reply to author
Forward
0 new messages