snowplow / snowplow-java-tracker

Snowplow event tracker for Java. Add analytics to your Java desktop and server apps, servlets and games. (See also: snowplow-android-tracker)
http://snowplowanalytics.com
Apache License 2.0
23 stars 36 forks source link

Deprecate Builder classes #355

Closed mscwilson closed 2 years ago

mscwilson commented 2 years ago

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.