snowplow/snowplow-java-tracker

Deprecate Builder classes

Closed this issue · 0 comments

Configuration classes were added in #340, along with the Snowplow class. The Config classes plus Snowplow static methods provide an easy-to-use API (fluent interface). However, this essentially duplicates the Builder classes found across the codebase, eg TrackerBuilder. It's no longer necessary to create Tracker, BatchEmitter, or Subject objects manually as the Config classes can be used instead.

In other classes, such as HttpClientAdapter, Builder classes are included even though only a few variables are involved.

Therefore, the builder methods can be deprecated to simplify the API and the readability/maintainability of the code.