Skip to content
This repository has been archived by the owner on May 6, 2021. It is now read-only.

Use Goa to generate REST client for Tenant service #105

Open
hferentschik opened this issue Feb 14, 2018 · 5 comments
Open

Use Goa to generate REST client for Tenant service #105

hferentschik opened this issue Feb 14, 2018 · 5 comments

Comments

@hferentschik
Copy link
Contributor

hferentschik commented Feb 14, 2018

No description provided.

@kishansagathiya
Copy link
Member

kishansagathiya commented Feb 26, 2018

@hferentschik
Let's discuss this a bit more. From what I know there is a historical argument behind moving to Goa ( since other go projects are using Goa, it would bring a uniformity). I had done some research on what framework should be used for APIs in Golang. Most places suggested not to use a framework and pick and plug independent libraries as required.
I have played around a bit with writing APIs without a framework and I didn't find much difference in terms of the amount of code I had to write. ( Did not write any tests for that project)
Goa autogenerates a lot of code. It adds unnecessary layers. I am not saying that Goa is bad. There are good things about Goa. I find it helpful that Goa autogenerates tests.
From my discussions with colleagues, most people don't know why we are using Goa, but they also haven't found any major problem with it so far and it serves the purpose.

Probably some discussion around this would be helpful. What do you think?

@hferentschik
Copy link
Contributor Author

Let's discuss this a bit more.

Sure. I should make clear that I don't see this as a high priority anyways.

From what I know there is a historical argument behind moving to Goa ( since other go projects are using go, it would bring a uniformity).

That's for sure one argument. There is also the aspect of documentation (you get for example a Swagger file) and as you point out the fact of generated tests. There is also the aspect of being able to generate a REST client on the caller side. This for example ensures that the callers are in sync with whatever they are trying to use.

I had done some research on what framework should be used for APIs in Golang. Most places suggested not to use a framework and pick and plug independent libraries as required.

Everything has its pro and cons. Which places are you referring to? Can you provide some pointers?

I have played around a bit with writing APIs without a framework and I didn't find much difference in terms of the amount of code I had to write.

I agree. I doubt there is less code to write. On the contrary maybe. However, reducing the number of lines one has to write is not one of the goals here.

Goa autogenerates a lot of code. It adds unnecessary layers. I am not saying that Goa is bad. There are good things about Goa. I find it helpful that Goa autogenerates tests.

Exactly. There are pro and cons. There are always trade-offs. Overall I think the benefits (see above) might outweigh potential drawbacks.

@kishansagathiya
Copy link
Member

kishansagathiya commented Feb 26, 2018

Exactly. There are pro and cons. There are always trade-offs. Overall I think the benefits (see above) might outweigh potential drawbacks.

Makes sense. Now that I think more about it, we can surely benefit from extra functionalities that Goa provides and probably layers by Goa won't hurt us.

@kishansagathiya
Copy link
Member

kishansagathiya commented Feb 26, 2018

@hferentschik

Sure. I should make clear that I don't see this as a high priority anyways.

In that case, we should change the tag to priority/minor.

@hferentschik
Copy link
Contributor Author

Makes sense. Now that I think more about it, we can surely benefit from extra functionalities that Goa provides and probably layers by Goa won't hurt us.

+1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants