aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kristof@marussy.com>2022-01-20 18:46:00 +0100
committerLibravatar Kristóf Marussy <kristof@marussy.com>2022-02-08 21:43:16 +0100
commit286abe8d982ec3b08580910157c6ed886aea20ca (patch)
treeb4289feb2bb9105c967b197b96d8e408170455e5 /docs
parentfeat: Add RuntimeService store (diff)
downloadsophie-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.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.