How winglang/polycons works
Main Components
a) Core Framework Components:
• Polycons Registry System
• Polycon Factory Interface
• Polycon Base Implementation
• Type Resolution System
b) Integration Points:
• CDK Framework Integration (AWS CDK, cdktf, cdk8s)
• Construct Tree Management
• Factory Registration System
Specific Elements
Rectangle: Core Components
Hexagon: External Systems
Diamond: Factory Components
Oval: Concrete Implementations
Factory Registration Flow
App (Root) -> Polycons.register() -> Factory Registry
Polycon Resolution Flow
Client Code -> Polycon Instance -> Factory Resolution -> Concrete Implementation
Type System
IPolyconFactory -> Concrete Factory -> Concrete Implementation
Important Details to Capture
• Relationship between IPolyconFactory and concrete factories
• How type resolution works with the unique string identifiers
• Demonstrate the transformation from Polycon to concrete implementation
• How the construct tree is maintained
Implementation Flow
1. Client creates Polycon
2. Polycon requests resolution from Registry
3. Registry delegates to Factory
4. Factory creates Concrete Implementation
5. Concrete Implementation is returned to Client