-
Notifications
You must be signed in to change notification settings - Fork 35
Standardise API for Tracker and Subject Builders #302
Copy link
Copy link
Closed
Labels
good first issueGood issue for a first time contributor.Good issue for a first time contributor.priority:lowNot on the roadmap.Not on the roadmap.status:completedCompleted - but might not be released yet.Completed - but might not be released yet.type:enhancementNew features or improvements to existing features.New features or improvements to existing features.
Milestone
Metadata
Metadata
Assignees
Labels
good first issueGood issue for a first time contributor.Good issue for a first time contributor.priority:lowNot on the roadmap.Not on the roadmap.status:completedCompleted - but might not be released yet.Completed - but might not be released yet.type:enhancementNew features or improvements to existing features.New features or improvements to existing features.
The Builder pattern is used extensively in the Java tracker. However, two different styles are implemented. For example:
Style 1:
There is a TrackerBuilder nested class.
Style 2:
There are Builder and Builder2 nested classes.
Tracker and Subject use Style 1. Emitters and Events (PageView, etc) use Style 2. This isn't great for usability.
Style 2 code is also quite hard to follow. It would be helpful to standardise all the public API classes to use Style 1.