diff options
author | Kristóf Marussy <kristof@marussy.com> | 2022-01-20 18:46:00 +0100 |
---|---|---|
committer | Kristóf Marussy <kristof@marussy.com> | 2022-02-08 21:43:16 +0100 |
commit | 286abe8d982ec3b08580910157c6ed886aea20ca (patch) | |
tree | b4289feb2bb9105c967b197b96d8e408170455e5 /docs | |
parent | feat: Add RuntimeService store (diff) | |
download | sophie-286abe8d982ec3b08580910157c6ed886aea20ca.tar.gz sophie-286abe8d982ec3b08580910157c6ed886aea20ca.tar.zst sophie-286abe8d982ec3b08580910157c6ed886aea20ca.zip |
refactor: Rename main services to infrastructure
Makes it clear that we are talking about wrappers for nodejs and
electron functionality, and not the services being displayed by the
application.
Signed-off-by: Kristóf Marussy <kristof@marussy.com>
Diffstat (limited to 'docs')
-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. |