Skip to content

[IMPROVEMENT] Api improvement #35

@HomeOfTheWizard

Description

@HomeOfTheWizard

Hi,

First of all, Kudos for the initiative to continue evolving the vault-java-driver library! 👍 🙏

I would like to suggest a change in the API.
I think a Public Interface instead of a Class would be better for the clients, and the maintainers of the API.
This pattern has several advantages, as explained in effective Java - Item 1.

For myself, I am using the library from betterclouds, and find it not easy to mock and test.
Also it would be easier for the client to decorate the class if an interface was available, for example if I want to add a wrapper class for caching.
For the maintainers, it would allow to change the implementation easily without changing the public API.

Since there is no other project using your project, as I can see from github, It would be easy for you to change the API and hide the implementation class.
Or you can keep it, in case you want to maintain retrocompatibility with clients using the old library from betterclouds.

I did a fork, if you are interested in the change I can do a PR so you can review.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions