Skip to content

[DESIGN] Improve DX/UX of the public APIs #91

@webknjaz

Description

@webknjaz
  • Define the public APIs
  • Separate internal APIs

Thoughts 💭

  1. It's not clear what are the usage scenarios of the lib (API-wise).
  2. It is too low-level (mostly).
  3. Most of the exposed classes implement managing resources and require calls to open/connect and close/disconnect. The idiomatic way of working with them is to implement context manager interfaces that guarantee that the managed resources are closed once unneeded, no matter what.
  4. The usage sequence seems to require passing extra initialization params to the connect method. This is an antipattern: objects must be ready to use right away after the initialization. So things like credentials should be passed to init, not connect.

Metadata

Metadata

Labels

bugSomething isn't workingdocumentationImprovements or additions to documentationenhancementNew feature or requesthelp wantedExtra attention is needed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions