[Jackson-3] Proposal for Renaming of properties for Naming Symmetry
Proposal
I propose the following naming schema to provide a clear and consistent structure:
- Writer suffix for serialization classes
- Reader suffix for deserialization classes
Serialization Side
-
PropertyWriterremains the same -
BeanPropertyWriterremains the same -
AnyGetterWriter->AnyGetterPropertyWriter
Deserialization Side
-
SettableBeanProperty->PropertyReader -
ObjectIdValueProperty->ObjectIdValuePropertyReader -
CreatorProperty->CreatorPropertyReader -
SettableAnyProperty->AnySetterPropertyReader
Example Class Hierarchy
Current (AS-IS)
-
PropertyWriter->BeanPropertyWriter->AnyGetterWriter -
SettableBeanProperty->ObjectIdValueProperty/CreatorProperty->SettableAnyProperty
Proposed (TO-BE)
-
PropertyWriter->BeanPropertyWriter->AnyGetterPropertyWriter -
PropertyReader->ObjectIdValuePropertyReader/CreatorPropertyReader->AnySetterPropertyReader
Benefits
- Improved consistency and symmetry in class names
- Easier understanding of the codebase
Note
We will talk along the way the classes that are not mentioned here, yet.
I like this idea. I think I'd like to get https://github.com/FasterXML/jackson-databind/pull/4396 merged before this, but we can proceed with renaming right after (technically it is not strictly necessary to order things this way but might be slightly less problem merging).
I like this idea. I think I'd like to get FasterXML/jackson-databind#4396 merged before this, but we can proceed with renaming right afte
Sounds good to me ✅
Figured bring up this issue again, since concrete works for 3.0 been rolling in. Updated hierarchy tree 👍🏼
@JooHyukKim Could you extend description a bit to indicate specific renaming suggestion? I think you are suggesting changes to deserialization side, so SettableBeanProperty to... BeanPropertyReader? And leaving serialization side as-is, having Writer suffix (BeanPropertyWriter)? But want to make sure I understand specific suggestion(s).
@cowtowncoder Sorry for the fuss, I don't think we need to pursue this now 🤔
Initially I thought it would be sort of low-haning fruit with huge consistency benefit. But the classes in scope do not form actually deserialization-serialization symmetry with one another.
@JooHyukKim yeah I was wondering about that -- Reader/Writer symmetry has benefits, but in this case things are bit tangled so was not 100% sure how to easily improve things. Thanks for the update: it's perfectly fine to suggest/try things, even if just to find they don't work out in the end.