aboutsummaryrefslogtreecommitdiffstats
path: root/docs/architecture.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/architecture.md')
-rw-r--r--docs/architecture.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/architecture.md b/docs/architecture.md
index 0122809..791b57b 100644
--- a/docs/architecture.md
+++ b/docs/architecture.md
@@ -82,11 +82,11 @@ Instead, they purely rely on IPC messages to invoke actions in the main process
82 82
83In the main process, _controllers_ react to `MainStore` changes by invoking Electron APIs and subscribe to Electron events in order to invoke `MainStore` actions. 83In the main process, _controllers_ react to `MainStore` changes by invoking Electron APIs and subscribe to Electron events in order to invoke `MainStore` actions.
84 84
85For easier testability, controllers may rely on _services_ abstracting away the underlying Electron APIs. 85For better testability, controllers may rely on _infrastructure services_ (wrappers) abstracting away the underlying Electron APIs.
86The service has to come with a TypeScript interface and an implementation. 86Each infrastructure of the service has to come with a TypeScript interface and at least one implementation.
87In the tests, the default implementation of the interface is replaced by a mock. 87In the tests, the default implementations of the interfaces are replaced by mocks.
88 88
89The services and controllers are instatiated and connected to the `MainStore` in the [composition root](https://gitlab.com/say-hi-to-sophie/sophie/-/blob/main/packages/main/src/compositionRoot.ts). 89The infrastructure services and controllers are instantiated and connected to the `MainStore` in the [composition root](https://gitlab.com/say-hi-to-sophie/sophie/-/blob/main/packages/main/src/init.ts).
90 90
91**TODO:** 91**TODO:**
92While a service is a common term in MVC application architecture, we should come up with a different name to avoid clashing witch services, i.e., web sites loaded by Sophie. 92While a service is a common term in MVC application architecture, we should come up with a different name to avoid clashing witch services, i.e., web sites loaded by Sophie.