How ciashanglin/eventtracker works
Main Components
a) Core Components:
• EventTracker (Singleton Object)
• Event Implementations (FlurryEvent, AnalyticsEvent)
• Builder System
• Analytics Services Integration Layer
b) Interface Layer:
• IEventTracker (Base Interface)
• IBuilder (Builder Interface)
• IGetBuilder (Builder Factory Interface)
┌─────────────────────┐
• EventTracker │
• (Singleton) │
• ┘
┌─────────────────┐ ┌─────────────────┐
• FlurryEvent │ │ AnalyticsEvent │
• ┘ └─────────────────┘
┌─────────────┐ ┌─────────────┐
• Flurry │ │ Analytics │
• ┘ └─────────────┘
Relationship Indicators
┌────────────┐ ┌────────────┐
• FakeFlurry │ │ UnitTest │
• ┘ └────────────┘
┌─────────────┐ ┌──────────┐
• IBuilder │←───│ Builder │
• ┘ └──────────┘
Key Elements to Highlight
• The sealed interface hierarchy of IEventTracker
• The dependency injection points for testing
• The builder pattern implementation
• The event flow from EventTracker to concrete implementations
Implementation Details
How the components interact:
Client → EventTracker → [FlurryEvent, AnalyticsEvent] → Concrete Implementations
• The extensibility of the system
• The clean separation of concerns
• The testability of the components
• The builder pattern implementation