Conversation
| this.courses = courses; | ||
| } | ||
|
|
||
| // parent and children |
There was a problem hiding this comment.
These attributes were left unimplemented because we considered it necessary also to have a control mechanism to avoid circular references. For example, in course A you could declare B as its child, and in course B you could also declare A as its child. When requesting the children of A, this could lead to an infinite loop A → B → A → B → A… which would need to be handled. This example is very simple, but in tree‑like structures the control logic becomes much more complex in order to prevent circular references anywhere in the hierarchy, that can easily go out of control
There was a problem hiding this comment.
I need if for eduxchange because it requires the ability to expand the parent property.
As for the circular references, yes they could introduce problems but only when clients are trying to traverse the entire graph. In that case, it's the clients problem to keep track of which programs they already seen.
Can I add an issue for this here on gh, to point out this should be added as a constraint when adding a program?
losalo
left a comment
There was a problem hiding this comment.
I’ve completed a visual review of the code and added comments with suggested changes. I’ll now run tests with real data to validate a few of the updates.
First part of #12.