File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,9 @@ An application is made of _components_. In this tutorial, a _component_ is an ob
2020that usually has at least one of the following properties:
2121
2222* it represents a "service" within your system, e.g. HTTP server, database access layer, etc.
23- * it has some initialization logic with side effects
23+ * it has a lifecycle: initialization and destruction logic (with side effects)
24+ * it acquires and releases resources
25+ * it is stateful
2426* it depends on other components
2527
2628
@@ -134,9 +136,9 @@ object MyApp extends Components {
134136
135137` .ref ` is not a real method. It exists only during compilation and is interpreted by the ` component ` or ` singleton ` macro.
136138A dependency reference is extracted by the macro out of the component initialization expression.
137- This way the macro separates initialization initialization of every component from initialization of its dependencies.
138- This technique makes it possible to inspect the dependency graph before any components are initialized .
139- This allows early cycle detection and lets us initialize independent components in parallel .
139+ This way the macro separates initialization of a component from initialization of its dependencies.
140+ This technique makes it possible to inspect the dependency graph before initializing any components.
141+ This allows early cycle detection and lets us parallelize component initialization .
140142
141143** NOTE** : If you're familiar with ` sbt ` , then ` .ref ` works somewhat similarly to ` .value ` in ` sbt ` settings & task definitions.
142144
You can’t perform that action at this time.
0 commit comments