How specklesystems/speckle-sharp-connectors works
Main Components
• Desktop UI
– Represented by the DUI3 folder.
– This component is the entry point for user interaction in a desktop environment that manages, displays, and perhaps triggers connector actions.
• Connectors
– Organized by subdirectories under “Connectors”. Examples include Autocad, Rhino, Revit, ArcGIS, Tekla, and even CSi modules.
– These connectors are responsible for interfacing with native AEC software and exposing Speckle functionality.
– They include UI-specific plugins, bindings, dependency injection setups, and operations (for sending/receiving data).
• Converters
– Found under the “Converters” directory. They are also grouped by platform (Autocad, Civil3d, Rhino, Revit, ArcGIS, Tekla, and CSi).
– Converters contain the logic to translate data between the native application formats and the Speckle object graph.
• SDK / Core Libraries
– The “Sdk” folder has common modules such as connectors’ utilities, dependency injection modules, logging, caching, and geometry/mesh utilities.
– This acts as the core backbone that supplies common functions and libraries to both connectors and converters.
• Build & CI / Testing Infrastructure
– The Build folder and various test projects spread across the structure indicate automated testing, metrics, and CI/CD practices (e.g., GitHub workflows).
Relationships and Data Flow
– The Desktop UI (DUI3) sends user-triggered commands to the connectors.
– Connectors interact with the native AEC applications (Autodesk Revit, Rhino, etc.) through plugins, bindings, and host objects.
– When data is exchanged, the connectors use the Converters to translate native geometry and parameters to the Speckle data format (and vice versa).
– The SDK provides a common set of services (dependency injection, logging, caching, and instance management) to both connectors and converters.
• Inter-component Communication:
– Dependencies are managed via modules (for example, each connector has its own DependencyInjection folder and registration classes).
– There is a clear separation of concerns: the connector handles domain-specific interaction while the converter deals with geometry/data transformation.
Architectural Patterns and Design Principles
• Modularity:
– The project is divided along functional lines (Desktop UI, Connectors, Converters, SDK) allowing independent evolution and testing.
• Separation of Concerns (SoC):
– Data presentation (via DUI3) is separated from the underlying business logic (connector/plugin implementations) and conversion logic (converters).
• Dependency Injection:
– Each sub-component employs DI modules (e.g., ConnectorModule.cs files) that wire applications together, which helps in decoupling and testing.
• Use of Testing and CI:
– Multiple test projects, build scripts, and GitHub workflows indicate emphasis on automated builds and unit/integration testing.
• Avoid drawing every single folder or file; instead, concentrate on the main modules (UI, Connectors, Converters, SDK, and Build/CI).
Happy diagramming!