Good Day Ladies and Gentlemen,
This is a slightly involved question, but I want to run it by some veterans to see if my thinking is correct. I have an SQLite database with X columns, Y of which are part of BaseClass (see below) and the remaining columns are the fields of BaseClassOne and BaseClassTwo. The reason I am doing this is that BaseClass is a required component, whilst the other two are optional components. Changing my database structure is much less involved and I can keep my core functions the same. Each of the extensions either add and/or override BaseClass functions. I would like to keep the extensions separate from my BaseClass, so that in my android UI I can create fragments that will accommodate any combination and allow for easy implementation of any future additions. Currently, Scenario 1 is the one that I am leaning towards, but I am not 100% certain if that would be the best approach. I've considered Scenario 2 where I am just extending BaseClass using inheritance or keeping the extension classes entirely separate in Scenario 3 and just sync the ID fields. Your input is greatly appreciated and if you have any improvements or other solutions, feel free to share them. Thank you in advance!
Scenario 3 no relation {see below in comments; will edit once limitations are removed}
PS: I would have liked to add the UML diagrams in the post, but since I am a newbie, I need to earn that privilege first. :P
Aucun commentaire:
Enregistrer un commentaire