Open table of contents
Conclusion
Contain an irreplaceable external API in an adapter and separate the application contract.
Context
Browser applications may need external services built around Windows COM and proprietary formats. Start by separating the application you can change from the external system you cannot.
Design and verification scope
Assess the following responsibilities and boundaries when designing and verifying a configuration.
- COM interface
- F# adapter
- Anti-corruption layer
- Domain model
- REST API
- React application
Decision rationale
A rewrite cannot solve the constraint that an external service is outside your control. Handle COM types and state in an F# adapter, then expose a domain model and REST contract to React. Separate preservation of service functionality from independence of application changes.
Trade-offs
An adapter contains change but does not remove Windows or COM dependencies. It adds mapping, error translation and contract-versioning work. REST also introduces latency and partial-failure considerations.
Limitations
Review types, error mappings and contract examples. Distinguish the advisor’s pre-existing adapter from CoRISE’s customer application work.
Related case context
These cases provide attributed design context. They do not establish that the proposed experiments or configurations were delivered in those engagements.