HolismHolding / Issues

1 stars 0 forks source link

Change Database.json to Module.json #75

Open Nefcanto opened 9 months ago

Nefcanto commented 9 months ago

We intend to keep up with good work in the world. Clean architecture is more semantic, less tech-dependent, and more durable. Therefore we intend to make things more abstract and meaningful.

Database.json is not a bad term per se, but I think Module.json would open doors for us to get closer to domain-driven design.

We would define our domain in a abstract manner, and our generators would help us get most of the boilerplate-based code done.

MohammadMiras commented 8 months ago

I think the name module.json does not mean the function of this file. What is the reason for creating this file? Our purpose in creating this file is to create a database and models,

MohammadMiras commented 8 months ago

I think Entities.json would be a better name

Nefcanto commented 8 months ago

@MohammadMiras, we have a couple of concepts. Let's review them:

  1. Entity type => an abstract idea that usually gets translated into classes in programming languages, and documents or tables in databases.
  2. Entity => an instance of an entity type; a real thing; this is the most concrete thing we can have in this terminology
  3. Entity set => it's a couple of entities. A set of entities. It's more abstract than an entity. It could be a list, or an array, or a list of records in database (commonly called a record set)
  4. Module => in our architecture which is modular monolith, it's a subset of a system that has its own boundary, its own domain.

Based on these terminologies, the Entities that you suggested would simply mean a set of entities. It is not a semantically correct name. But the Module.json is more encompassing, more semantic, and more extensible for future additions and expansions based on domain.

Nefcanto commented 6 months ago

It's better not to use JSON and YAML at all. https://github.com/HolismHolding/Issues/issues/130

Also, I would recommend naming the file Module.