Closed banctilrobitaille closed 7 years ago
The ISerializer are composite (they contain ISerializer and implement ISerializer), and each ISerializer only depends on the object they should serialize.
This is the old arcchcitechture as it is now, there are so many unwanted dependencies. The worst part is that the models cant live without the serializer. This should never happen. Example: If we delete the ISerializerInterface all the models can't build, a model should be able to live by itself as it's just data reprensentation.
The object being serialized has a dependency on its subparts serializer. For example: RingMetadata.class has a dependency on RingMetadataPartSerializer.class which is bad, also it violates the Single Responsibility Principle because the RingMetadata models now act as a serializer for itself. RingMetadadataSerializer should contain and use the RingMetadataPartsSerializer.