You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* All `src/*/index.ts` export everything in the same folder, so practically these folders are equivalent to modules.
226
-
*`root/` contains entry points and depends on all other modules.
226
+
*`root/` contains entry points and depends on all other modules except `test/`.
227
227
*`ghosttext-session/` doesn't depend on other modules.
228
-
*`ghosttext-*/` depends on `ghosttext`.
228
+
*`ghosttext-adaptor/` depends on `ghosttext-runner/`, which depends on `ghosttext-session/`.
229
229
*`root/` and `thunderbird/` can use Thunderbird API directly.
230
230
* Other modules define subsets of the Thunderbird API they use as interfaces in `api.ts` files in their directories, which are implemented by `thunderbird/` modules.
231
231
@@ -284,6 +284,29 @@ TL;DR: `root` module contains entry point and the [Composition Root][ploeh].
284
284
*`test/startup.test.ts` contains tests to verify that all classes registered can be instantiated successfully.
285
285
* See [FAQ](./faq-architectural.md) for some design decisions and justification.
Copy file name to clipboardExpand all lines: doc/faq-architectural.md
+1-2Lines changed: 1 addition & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@
20
20
21
21
### How does automatic instantiation help with maintainability?
22
22
23
-
* It makes coding less boring by automating a necessary coding task that occurs often: passing objects around to call their methods. This task gets harder as the software grows (which correlates to the number of hops required). I like to think of it as being similar to generating a Makefile.
23
+
* It makes coding less boring by automating a necessary coding task that occurs often: passing objects around to call their methods. I like to think of it as being similar to generating a Makefile. It's not a panacea, but I think it has some effect to extend lifespan of the code until it becomes unmaintainable due to the scale.
24
24
* It nudges us to adhere to the [Dependency Inversion Principle][dip].
25
25
26
26
### How does DIP help with maintainability?
@@ -33,7 +33,6 @@
33
33
34
34
* Maybe, but I intend to maintain this project for a while, and this was the best solution I could devise to adapt to breaking Thunderbird API changes, which seem to [happen every few versions][tbchanges].
35
35
* Also, adding DI after the fact tends to be very hard.
36
-
* I think DI may be over-engineered, but [the DIP][dip] is still valuable.
37
36
* We might drop the autowiring thing and instantiate manually with `new` if the project ends up being stable enough. The practice of initializing everything in `startup.ts` would [still be useful][ploeh], though. It's possible to drop autowiring without [giving up DIP][ploeh2].
38
37
39
38
### It looks like not using a dependency injection library. Why are you reinventing the wheel?
0 commit comments