Skip to content
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

Breaking code in app.go to multiple packags #55

Closed
kadel opened this issue Jul 22, 2016 · 3 comments
Closed

Breaking code in app.go to multiple packags #55

kadel opened this issue Jul 22, 2016 · 3 comments
Assignees
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/design Categorizes issue or PR as related to design. kind/discuss priority/P0

Comments

@kadel
Copy link
Member

kadel commented Jul 22, 2016

What if we would break app.go to multiple packages?

I suggest creating notion of loaders and transformers.
Loader would load input file and convert it to komposeObject.
Transformer would convert komposeObject to target format.
Every loader and every transformer would live in its own package.

pkg/loader/dockercompose/
pkg/loader/boundlefile/

pkg/transformer/kubernetes/
pkg/transformer/openshift/

It could look like this:

                  +------+          +-----------+
input file -----> |loader|          |transformer| -----> output files
                  +------+          +-----------+
                     |                    ^
                     |                    |
                     |                    |
                     +--> komposeObject --+
@kadel kadel added help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/design Categorizes issue or PR as related to design. kind/discuss labels Jul 22, 2016
@ngtuna
Copy link
Contributor

ngtuna commented Jul 22, 2016

Big +1 @kadel . It makes our code looks brighter and motivate new comers who would like to step forward. I will create docs folder then we can put all thoughts into. I can give a hand to implement this design if you'd prefer.

@ngtuna
Copy link
Contributor

ngtuna commented Jul 27, 2016

@kadel are you working on it? I can take this one if you'd prefer to keep working on OpenShift support #36 and preference file #39 .

@kadel
Copy link
Member Author

kadel commented Jul 27, 2016

I haven't stared on this yet. But I think we should do this before #39 and #36 because breaking app.go will probably involve a lot of code moving.

We can try together design some interfaces around komposeObject than it should be easy to break code and one of us can do loaders and other transformers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/design Categorizes issue or PR as related to design. kind/discuss priority/P0
Projects
None yet
Development

No branches or pull requests

2 participants