haxwell / quizki

A question and answer database that generates exams.
http://www.quizki.com
GNU General Public License v2.0
4 stars 14 forks source link

Entities are too tightly bound to serializing methods used by outer layers #231

Open jdisser opened 6 years ago

jdisser commented 6 years ago

AbstractEntity has a default toJSON method that results in Entities that must implement a serial data interface that is determined by outer classes of the app thus requiring the entity classes to have knowledge of and be dependent on these outer classes. An improved design will utilize an Adapter class to serialize the entity objects and separate that functionality from the entities to increase the flexibility of the code.