diff options
Diffstat (limited to 'docs/architecture.md')
-rw-r--r-- | docs/architecture.md | 8 |
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 | ||
83 | In the main process, _controllers_ react to `MainStore` changes by invoking Electron APIs and subscribe to Electron events in order to invoke `MainStore` actions. | 83 | In 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 | ||
85 | For easier testability, controllers may rely on _services_ abstracting away the underlying Electron APIs. | 85 | For better testability, controllers may rely on _infrastructure services_ (wrappers) abstracting away the underlying Electron APIs. |
86 | The service has to come with a TypeScript interface and an implementation. | 86 | Each infrastructure of the service has to come with a TypeScript interface and at least one implementation. |
87 | In the tests, the default implementation of the interface is replaced by a mock. | 87 | In the tests, the default implementations of the interfaces are replaced by mocks. |
88 | 88 | ||
89 | The 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). | 89 | The 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:** |
92 | While 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. | 92 | While 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. |