What kind of design pattern is the Microsoft BotBuilder modeled after? It seems like an single monolithic SOA application? Are there multiple designs used for the main portion of the builder?
2 Answers
The Bot Builder SDK uses several design patterns. For example, the IPostToBot
middleware and IBotToUser
interfaces are often augmented by decorators.
The composition root (following the terminology in this book) is where we use instantiate the services registered in the Autofac dependency injeciton container. This composition root could be unified with the hosting ASP.NET dependency injection container as well. In general, we try to avoid the service locator anti-pattern.
The pattern used for the bot framework itself is the Composition Root pattern, and they are using an inversion of control framework called "autofac" for it.