Asynchronous (async) and Await are 'contagious,' making it challenging to choose whether interfaces should be Task-based. The discussion revolves around two types of interfaces: those enabling variability/extensibility in behavior, and those supporting automated testing. It outlines strategies for implementing async interfaces when needed and warns against preemptively making interfaces async, as it complicates APIs unnecessarily. It also emphasizes the use of Adapters to bridge synchronous and asynchronous operations.

17m read timeFrom blog.ploeh.dk
Post cover image
Table of contents
Interpretation #Conform #Kinds of interfaces #Strategies and higher-order functions #Seams #Where to define interfaces #Should it be asynchronous, then? #Library API #Domain Model #Application Model #Easier Adapters #Conclusion #
1 Comment

Sort: