Skip to content

Commit d36e5e8

Browse files
scordioodrotbohm
authored andcommitted
GH-504 - Fixes and improvements for Fundamentals section.
1 parent 791910b commit d36e5e8

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/docs/antora/modules/ROOT/pages/fundamentals.adoc

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
= Fundamentals
33

44
Spring Modulith supports developers implementing logical modules in Spring Boot applications.
5-
It allows them to apply structural validation, document the module arrangement, run integration tests for individual modules, observe the modules interaction at runtime and generally implement module interaction in a loosely-coupled way.
5+
It allows them to apply structural validation, document the module arrangement, run integration tests for individual modules, observe the modules' interaction at runtime, and generally implement module interaction in a loosely coupled way.
66
This section will discuss the fundamental concepts that developers need to understand before diving into the technical support.
77

88
[[modules]]
@@ -25,10 +25,10 @@ That is the class, that is annotated with `@SpringBootApplication` and usually c
2525
By default, each direct sub-package of the main package is considered an _application module package_.
2626

2727
If this package does not contain any sub-packages, it is considered a simple one.
28-
It allows to hide code inside it by using Java's package scope to hide types from being referred to by code residing in other packages and thus not subject for dependency injection into those.
28+
It allows to hide code inside it by using Java's package scope to hide types from being referred to by code residing in other packages and thus not subject to dependency injection into those.
2929
Thus, naturally, the module's API consists of all public types in the package.
3030

31-
Let us have a look at an example arrangement (icon:plus-circle[role=green] denotes a public type, icon:minus-circle[role=red] a package protected one).
31+
Let us have a look at an example arrangement (icon:plus-circle[role=green] denotes a public type, icon:minus-circle[role=red] a package-private one).
3232

3333
.A single inventory application module
3434
[source, subs="+specialchars, macros"]
@@ -67,10 +67,10 @@ icon:cubes[] Example
6767

6868
In such an arrangement, the `order` package is considered an API package.
6969
Code from other application modules is allowed to refer to types within that.
70-
`order.internal`, just as any other sub-package of the application module base package are considered _internal_ ones.
70+
`order.internal`, just as any other sub-package of the application module base package, is considered an _internal_ one.
7171
Code within those must not be referred to from other modules.
7272
Note, how `SomethingOrderInternal` is a public type, likely because `OrderManagement` depends on it.
73-
This unfortunately means, that it can also be referred to from other packages such as the `inventory` one.
73+
This unfortunately means that it can also be referred to from other packages such as the `inventory` one.
7474
In this case, the Java compiler is not of much use to prevent these illegal references.
7575

7676
[[modules.explicit-dependencies]]
@@ -125,9 +125,9 @@ Kotlin::
125125
var modules = ApplicationModules.of(Application::class)
126126
----
127127
======
128-
To get an impression about what the analyzed arrangement looks like, we can just write the individual modules contained in the overall model to the console:
128+
To get an impression of what the analyzed arrangement looks like, we can just write the individual modules contained in the overall model to the console:
129129

130-
.Writing the application module arranagement to the console
130+
.Writing the application module arrangement to the console
131131
[tabs]
132132
======
133133
Java::
@@ -161,14 +161,14 @@ modules.forEach(println(it))
161161
+ ….internal.SomeInternalComponent
162162
----
163163

164-
Note, how each module is listed and the contained Spring components are identified and the respective visibility is rendered, too.
164+
Note how each module is listed, the contained Spring components are identified, and the respective visibility is rendered, too.
165165

166166
[[modules.named-interfaces]]
167167
=== Named Interfaces
168168

169169
By default and as described in xref:fundamentals.adoc#modules.advanced[Advanced Application Modules], an application module's base package is considered the API package and thus is the only package to allow incoming dependencies from other modules.
170170
In case you would like to expose additional packages to other modules, you need to use __named interfaces__.
171-
You achieve that by annotating the `package-info.java` file of those package with `@NamedInterface`.
171+
You achieve that by annotating the `package-info.java` file of those packages with `@NamedInterface`.
172172

173173
.A package arrangement to encapsulate an SPI named interface
174174
[source, text, subs="macros, quotes"]
@@ -205,7 +205,7 @@ Kotlin::
205205
package example.order.spi
206206
----
207207
======
208-
The effect of that declaration is two fold: first, code in other application modules is allowed to refer to `SomeSpiInterface`.
208+
The effect of that declaration is twofold: first, code in other application modules is allowed to refer to `SomeSpiInterface`.
209209
Application modules are able to refer to the named interface in explicit dependency declarations.
210210
Assume the __inventory__ module was making use of that, it could refer to the above declared named interface like this:
211211

0 commit comments

Comments
 (0)