Facade: split subsystem into one class per file, sync post code blocks to Java 25, add README mapping

This commit is contained in:
2026-06-24 15:33:22 +05:30
parent d6df1fd013
commit 083beb9780
10 changed files with 131 additions and 62 deletions

View File

@@ -249,6 +249,27 @@ javac 02-structural/decorator/*.java -d out/decorator
java -cp out/decorator decorator.Main
```
### Facade (`02-structural/facade/`)
| Post Section | File(s) |
|---|---|
| The Subsystem (Complex, But Unchanged) — VideoFile | `VideoFile.java` |
| The Subsystem (Complex, But Unchanged) — Codec interface | `Codec.java` |
| The Subsystem (Complex, But Unchanged) — Concrete Codecs | `MPEG4CompressionCodec.java`, `OggCompressionCodec.java` |
| The Subsystem (Complex, But Unchanged) — CodecFactory | `CodecFactory.java` |
| The Subsystem (Complex, But Unchanged) — BitrateReader | `BitrateReader.java` |
| The Subsystem (Complex, But Unchanged) — AudioMixer | `AudioMixer.java` |
| The Facade | `VideoConversionFacade.java` |
| Client Code: One Line | `Main.java` |
Note: the SLF4J `LoggerFactory`, JDBC `DriverManager`, and Spring `JdbcTemplate` snippets under "Facade in the JDK and Real Frameworks" are illustrative only — they are not part of this repository's runnable example.
Run it:
```bash
javac 02-structural/facade/*.java -d out/facade
java -cp out/facade facade.Main
```
## Reference
- *Design Patterns: Elements of Reusable Object-Oriented Software* — Gamma, Helm, Johnson, Vlissides