You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello @lindyhopchris, first of all I would like to thank you for all the work you've put into this project, it is brilliant and nicely written.
I am currently building an API layer for a headless ecommerce store which consists of multiple packages all dealing with separate concerns. The initial thought was that there will be a core and then additional modules which add specific functionality.
There are at least 3 levels:
Core API package
Multiple other packages building on top of that
User application adding functionality on top of that
However, some of them need to extend already existing schemas, resources and so on. I spent long hours code diving, trying to figure out a way how to extend the base classes and ended up with writing singleton manifests in order to at least be able to compose the array return value of Schema public methods in order to make them extendable.
Current solution works, but it does not feel clean and it is somewhat inconvenient to have to call ...parrent::someMethod() in every single extendable schema plus there is no way to enforce it with a contract and so on.
If possible, could you please suggest a better approach to address this issue?
Thank you very much.
The text was updated successfully, but these errors were encountered:
repl6669
changed the title
Extendability
Question about extendability
Feb 9, 2024
Hello @lindyhopchris, first of all I would like to thank you for all the work you've put into this project, it is brilliant and nicely written.
I am currently building an API layer for a headless ecommerce store which consists of multiple packages all dealing with separate concerns. The initial thought was that there will be a core and then additional modules which add specific functionality.
There are at least 3 levels:
However, some of them need to extend already existing schemas, resources and so on. I spent long hours code diving, trying to figure out a way how to extend the base classes and ended up with writing singleton manifests in order to at least be able to compose the array return value of Schema public methods in order to make them extendable.
To make it less abstract, here is some code:
Current solution works, but it does not feel clean and it is somewhat inconvenient to have to call
...parrent::someMethod()
in every single extendable schema plus there is no way to enforce it with a contract and so on.If possible, could you please suggest a better approach to address this issue?
Thank you very much.
The text was updated successfully, but these errors were encountered: