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

Change the API for defining client_lib_id #36

Open
dlyash opened this issue May 13, 2016 · 1 comment
Open

Change the API for defining client_lib_id #36

dlyash opened this issue May 13, 2016 · 1 comment

Comments

@dlyash
Copy link
Contributor

dlyash commented May 13, 2016

The approach introduced in #34 assumes that library users will use the following code to set this identifier globally:

LibNameVersionHolder.setClientLibName("name");
LibNameVersionHolder.setClientLibVersion("version");

On my opinion this approach has some severe drawbacks:

  • Not straightforward. Users need some sacred knowledge to make use of this API: that there's some class in the library with static methods which affect library behaviour
  • Not flexible. No way to specify Client Lib ID on the fine-grained level (i.e. instance of client). Also, static methods mean no way to override them.
  • Not testable. Users of the library have to jump through hops to unit-test their code
@dlyash
Copy link
Contributor Author

dlyash commented May 13, 2016

@dimitrystd, @PavloMyrotiuk, @dkBrazz let's not forget to discuss this

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

No branches or pull requests

1 participant