Open FabienArcellier opened 3 months ago
suggestion of @madeinjs :
What prevent us to use one JSON file per component ?
Here a quick example of a Tree structure like
Ok, it requires to walk in the directory but I see few advantages:
.
└── root
├── 1d195388-35a3-43e1-b825-1d263b100a28
│ ├── 90fbfa9d-3178-4fc2-b445-c31e1acfa6a7
│ │ └── index.json
│ └── index.json
├── 771dc336-69b2-400e-9ea3-e881e2332c9d
│ └── index.json
├── 9c77aee4-e2a0-4e8b-9c2b-377f939bb51e
│ └── index.json
└── index.json
That may be interesting. We would have to think of .wf
as similar architecture of .git
directory. The user should not open it.
.wf
└── components
├── 1d195388-35a3-43e1-b825-1d263b100a28
│ ├── 90fbfa9d-3178-4fc2-b445-c31e1acfa6a7
│ │ └── index.json
│ └── index.json
├── 771dc336-69b2-400e-9ea3-e881e2332c9d
│ └── index.json
├── 9c77aee4-e2a0-4e8b-9c2b-377f939bb51e
│ └── index.json
└── index.json
└── workflows
└── metadata.json
Storing writer framework IDE files poses several challenges when several developers are working on the same application.
data managed by the IDE is stored in .wf. This folder contains files that are generated and read by the writer framework IDE. These files are not intended to be edited by hand.
/.wf
a file is dedicated to each high-level concept. This reduces the risk of conflicts when several developers work on the same application.
the json line is used for storage. This format defines a json record on each line. It is simple to parse. Conflict resolution is also simplified because a conflict takes place between 2 lines.
/.wf/components-page-0-c0f99a9e50044e75a6c636f17490b134.jsonl
/.wf/metadata.json
loading and writing the contents of /.wf is atomic. Writer framework loads data all at once in the form of a consistent data structure. This approach keep the complexity of writer framework low.