-
Notifications
You must be signed in to change notification settings - Fork 3
API Launcher
One way to introduce greater modularity in a software solution is by creating several REST service API applications that work together to provide overall application functionality. Microservice architectures take this kind of approach.
ASP.NET is a great platform for building microservices and API-driven architectures. That said, developers can experience some challenges with this kind of approach, especially during testing. Consider a solution in which the main application needs to communicate with five different API applications, all of which (including the main application) need to communicate with an Identity Server's APIs. Visual Studio provides a mechanism for starting multiple projects, but this mechanism doesn't work with unit and integration tests. The developer could start the integration tests in one instance of Visual Studio and all of the child APIs in a separate instance of Visual Studio; however, it would be much more convenient to use just one instance of Visual Studio for testing all of applications.

ApiLauncher is a feature of the EDennis.AspNetCore.Base library. ApiLauncher allows the developer to setup automatic launching of child APIs when a parent application is launched. ApiLauncher automatically assigns random, available ports to all child APIs. ApiLauncher recognizes when more than one parent application needs the same child API (e.g., Identity Server) and only launches this shared API just once. ApiLauncher launches all of the child APIs in such as way that the developer can debug from parent applications into child APIs. When spot-testing applications (not through a test runner), a single console window controls all of the applications, including parent and child APIs (and grandchild APIs ... etc.).
(to be continued)
Development Support
- Temporal Entities
- Base Repository Classes
- Base API Controller Classes
- ApiClient and SecureApiClient
- Security Utilities
- IServiceCollection Extension Methods
- HttpClient Extension Methods
- ScopeProperties
- MigrationsExtensionsDbContextDesignTimeFactory
Testing Support
- API Launcher
- Testing Strategy and Infrastructure
- Xunit Support Classes
- Testing Security Utilities
Related Projects