Benefit of ODM

  1. ODM provides us a framework to translate between objects in the backend code to the relational representation of data. It is easier for developers to manage data in the backend. 
  2. Classes (Models) are mapping to the database entities. It provides us a framework to do object oriental programming.
  3. We can decouple the Class method with APIs. So the class methods are reusable in different APIs. 

Design Diagram

backend-online-model-design

Next Step:

  1. Use flask-mongoengine for ODM control, enable the dataflow from localhost backend to local/online database.
  2. Implement Models and APIs for existed functionalities
  3. Create unit-tests for both APIs and class methods 
  • No labels