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

Fluent Builder API vs Builder pattern #210

Open
jansupol opened this issue Nov 13, 2023 · 0 comments
Open

Fluent Builder API vs Builder pattern #210

jansupol opened this issue Nov 13, 2023 · 0 comments
Labels

Comments

@jansupol
Copy link
Contributor

The current Loader API looks

Loader.bootstrap().load()

However, we probably want to add other enrichments to the API, such as converters or sources. Then we would have something like

Loader.bootstrap().converter(...).source(...).load()

Which would make Loader mutable. Then we have two possibilities:

  1. To return a new instance of Loader for each converter, source, and other calls
  2. To use a Builder pattern using Loader.bootstrap().build().load() which would more nicely turn into Loader.builder().build().load()

In summary, should we use bootstrap() method, or builder() method?

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

No branches or pull requests

1 participant