Parsing/validation in addition to mapping #324
Closed
martinothamar
started this conversation in
Ideas
Replies: 1 comment
-
The goal of Mapperly is to provide a fast, reliable and easy to use Object-to-Object mapping library. We want to keep the scope of Mapperly as small as possible and therefore only include features which directly help to achieve this goal. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi! This library is a great solution for object mapping. In projects I work on we now try to default to Mapperly for object mapping. As far as I'm concerned Mapperly is the best solution for these kinds of things, and a recent video by Nick Chapsas has also solidified that for me as this seems to be the most performant solution currently.
But, there is another concept that depending on how you view things is closely related to mapping, which is validation, or rather parsing. The more experience I get in languages with strong type systems and functional characteristics the more I want to tie these concepts together. It's often referred to as type-driven development or parsing instead of validation (as described in this great article).
The way I see it, parsing/"type driven design" is what you get when you put mapping and validation together. What I want to do in future projects is to express that validation has occurred in the typesystem itself. I think the article above explains the benefits and approach very vell.
I don't think there is a good solution for this in the .NET ecosystem currently, at least I am not aware of any validation/mapping library that tries to do both at the same time. I'm not sure how it should be implemented either, hence I open this discussion.
Is this something that you have thought about yourself? Do you see any path where Mapperly could tackle these together?
Beta Was this translation helpful? Give feedback.
All reactions