CMPUT301F18T24 / Mark-Me

This is an Android app for keeping track of medical issues.
Apache License 2.0
4 stars 4 forks source link

Elastic Controller Refactoring: Rename controller to Utils and other fixes... #91

Open vppatel111 opened 5 years ago

vppatel111 commented 5 years ago

-However, as of right now most of the query logic seems to be handled by the ElasticSearch Controllers. Controllers are generally for mediating between Models and Views, and it would be ideal to have the model classes perform their own respective queries/database interactions (perhaps via static methods), rather than bloating the controller logic. -Having classes inside the controller for the sole purpose of creating new content is also ad-hoc and repetitive: your model code, or at perhaps a data access layer that interacts with the model code would be a better place to create new objects for saving in the database, rather than mixing that with controller logic

TLDR: We should make an adapter class where the adaptee, the data models, is adapted to the ElasticSearchController(ElasticSearchUtils). We should refactor the "temp data classes" we create in the elastic search controller to this adapter.

rizwan146 commented 5 years ago

resolved in #94, named ElasticSearchIO instead. (Includes adapters)