data_kitten icon indicating copy to clipboard operation
data_kitten copied to clipboard

Mixins versus Sub-classes?

Open ldodds opened this issue 10 years ago • 0 comments

Is there any background to the decision to use mixins rather than sub-classes to handle the different ways that dataset metadata could be published?

Using a factory method to instantiate sub-classes of Dataset might be a simpler approach to the mixins that Data Kitten is using now.

The git origin has some helper code, but the other forms don't really add anything. Similarly the hosts don't add anything if the data is being published as RDF.

The existing code could be re-organised to have 2-3 sub-classes of Dataset and a factory method to instantiate those based on the access url. This would simplify some of the testing and code sharing between different mixins.

Marking this as a question, as there may be other plans for the hosts/origins/formats split

ldodds avatar Sep 23 '13 16:09 ldodds