Replies: 2 comments 6 replies
-
Hey @mario-nt I think It's a good idea for some reasons:
|
Beta Was this translation helpful? Give feedback.
-
Hello @mario-nt and @josecelano Thanks for brining up this topic. It is related to my new discussion about the future repo-naming and structure: https://github.com/orgs/torrust/discussions/13 Overall I think that it is pre-mature to think about merging these repos into either the backend or frontend repositories. The API that the frontend and the backend use to talk together is no specific to either. Additionally, I do not think that having a high semantic version number is necessarily a bad thing. — it could be indicative of bad design, but it could just be the nature that we have many backwards incomparable changes in our development process: it is not like that we have to coordinate with external parties who actively make use of our API. I invite @mario-nt to additionally consider the Repository Naming discussion in the context of our API definitions. |
Beta Was this translation helpful? Give feedback.
-
After giving it some thought, I think it could be a good idea to take the code that is inside the torrust-index-types-lib and torrust-index-api-lib and put it inside the torrust-index-frontend.
Having the code for the types and the api in external packages is a good solution, but I think It's better suited when the project (the types and the API) is more defined and mature.
After making some changes to these packages, I've noticed semver does not really support the versioning in a useful way, and making some other changes in the future (something that is very likely as we will probably add or modify new types for the API calls) will lead into a high major version number, which translates into a bad design.
My take on this would be to put the content of the packages inside two folders in the frontend, named for example, wrapper for the api package and types for the types package, and further down the road, once a contract for the API is made and is in a mature state, go back and maybe consider to split them into packages and make them dependencies from the main project. This may be really useful if the user wants to implement their version of the frontend, as it provides a level of abstraction from the framework.
This change can take a bit of time, but I think is worth considering the time needed to think about how to version the next releases of the packages plus the time spent managing the NPMs packages.
Also, usually, the less dependencies a project have, the easier it is to avoid the so called "dependency hell".
cc: @josecelano @da2ce7 @grmbyrn
Beta Was this translation helpful? Give feedback.
All reactions