Skip to content

Create better abstractions to decouple from db layer #33

@supermacro

Description

@supermacro

Look into domain modelling so as to not model objects based on how they're modelled on the database layer.

Perhaps consider having a models folder as an abstraction over the db.

Examples of its benefits:

Imagine having a Admin model where I could call a serialize method which represents the representation of the model that I'd like to send to the front end.

This is a nice pattern because I can encode into each model what is "exposable" data and what is "non-exposable" / irrelevant / sensitive data (in the context of the front end).

Best example being password. You don't want to send over user passwords over the network. So you would serialize the data to exclude this sensitive data.

Metadata

Metadata

Assignees

No one assigned

    Labels

    architectureArchitectural question / note / concern / suggestion

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions