-
Notifications
You must be signed in to change notification settings - Fork 243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Having separate layers #5247
Comments
This is great. Thank you, @feloy, for writing this down 👍
Another thing that I would to see is consolidation of |
Thanks :) |
Remaining packages will be deleted or worked on for v3 |
/kind bug
As described in the comment #4057, the architecture of the code should use several layers (bottom to top):
k8s.io
packages)Packages in layers
The low-level layer is composed of packages that access the underlying platforms:
The business layer is composed of packages that manage the
odo
objects:The CLI layer is composed of packages in:
Other packages:
Import of CLI layer
Packages of the CLI layer should not be imported from outside this CLI layer. These imports should be fixed:
Interactions with the console
Interactions with user (and especially console) should be done only from the CLI layer.
Interactions with the cluster
Interactions with the cluster should be done only from the low-level layer.
Import of low-level layer
Packages of the low-level layer should be imported from business layer only.
Interfaces
Packages in the business layer and the low-level layer should declare an interface and a default Client implementing this interface so the upper layers use this interface and either use the default implementation, or create its own implementation for testing.
(to be continued)
The text was updated successfully, but these errors were encountered: