Java読書会BOF「Practical Design Patterns for Java Developers」を読む会 第4回議事録

[ 戻る ]


========================================================================
Java読書会BOF「Practical Design Patterns for Java Developers」を読む会 第4回
========================================================================

.. csv-table:: 開催概要

  "日時", "2023年11月18日 10:00 - 17:00"
  "場所", "Skype"
  "出席者(敬称略)", 高橋(徹)、高橋(智)(書記)"

Part 2: Implementing Standard Design Patterns Using Java Programming
====================================================================

4 Applying Structural Design Patterns
=====================================

Incompatible object collaboration with the adapter pattern
----------------------------------------------------------
* P103 Figure4.1のVehicleからEngineへの線は、継承ではなく関連の誤植
* P103 Figure4.1のPetrolEngine,ElectricEngineからEngineへの線は、継承ではなく実装の誤植
* P104 Example4.2のengine.tank();の行は不要だろう
* P104 Example4.2のdefaultの記述は今回の場合は不要だろう。ただし、Java21のコンパイラが必要かも
  * 宿題!!

Decoupling and developing objects independently with the bridge pattern
-----------------------------------------------------------------------
* P108 Figure4.2のSportVehicle,PickupVehicleからVehicleへの線は、実装ではなく継承の誤植
* P108 Figure4.2のPetrolEngine,DieselEngineからEngineへの線は、継承ではなく実装の誤植

Treating objects the same way using the composite pattern
---------------------------------------------------------
* P110 Figure4.3のVehiclePart,SportVehicleからVehicleElement,Vehicleへの線は、継承ではなく実装の誤植

Extending object functionality by using the decorator pattern
-------------------------------------------------------------
* P112 Figure4.4のStandardVehicle,SportVehicle,TunedVehicleDecoratorからVehicleへの線は、継承ではなく実装の誤植
* P112 Figure4.4のSportVehicleからTunedVehicleDecoratorへの線は、関連ではなく継承の誤植
* UML図用のツールにはどのようなものがあるか?
  * 無料なら 【2023年版】無料オープンソースのUMLエディタ おすすめ12選を徹底解説! https://notepm.jp/blog/21305
  * 有償なら Enterprise Architect https://sparxsystems.com/

Simplifying communication with the facade pattern
-------------------------------------------------
* P116 Figure4.5のInterfaceはVehicleの誤植
* P116 Figure4.5のDieselVehicle,PetrolVehicleからVehicleへの線は、実装の誤植

Using conditions to select desired objects with the filter pattern
------------------------------------------------------------------
* P117 staticブロックの実行と、staticなフィールドの初期化処理の、順番は?
  * Example4.11のコードの順番は大事なのか? 逆にするとコンパイルエラーになるはず?
    * 宿題!!
* P119 Figure4.6のRuleAnd,RuleOr,RuleType,RuleAnalogからRuleへの線は、継承ではなく実装の誤植

Sharing objects across an application with the flyweight pattern
----------------------------------------------------------------
* P123 Figure4.7のVehicleTypeからVehicleへの線は、関連ではなく実装の誤植

Identifying instances using the marker pattern
----------------------------------------------
* P126 'the maker pattern'は'the marker pattern'の誤植

Exploring the concept of modules with the module pattern
--------------------------------------------------------
* P131 Figure4.10のBreaksModuleはBrakesModuleの誤植
* P131 Figure4.10のBrakesModule,EngineModuleからVehicleModuleへの線は、継承ではなく実装の誤植

Providing a placeholder for an object using the proxy pattern
-------------------------------------------------------------
* P134 Figure4.11のVehicleReal,VehicleProxyからVehicleへの線は、継承ではなく実装の誤植

 Discovering multiple inheritance in Java with the twin pattern
---------------------------------------------------------------
* P136 Figure4.12のVehicleBreaksはのVehicleBrakesの誤植
* P136 Figure4.12のVehicleEngine,VehicleBrakesからAbstractVehiclePartへの線は、実装ではなく継承の誤植

5 Behavioral Design Patterns
============================

Limiting expensive initialization using the caching pattern
-----------------------------------------------------------
* P141 Figure5.1のBreakSystemはのBrakeSystemの誤植
* P141 Figure5.1のBrakeSysten,EngineSystem,SuspensionからVehicleSystemへの線は、継承ではなく実装の誤植
* P141 Figure5.1のVehicleクラスの「- systemCache: SystemCache(3)」の「(3)」はどのような意味なのか?

Turning information into action with the command pattern
--------------------------------------------------------
* P148 Figure5.3のStartCommand,StopCommandからVehicleCommandへの線は、継承ではなく実装の誤植

Giving meaning to the context using the interpreter pattern
-----------------------------------------------------------
* P149 Example5.7の'left, right);'は'leftExp, rightExp);'の誤植
* P150 Figure5.4のMinusExpression,PlusExpression,IntegerExpressionからExpressionへの線は、継承ではなく実装の誤植

次回は、P150のChecking all the elements with the iterator patternから


[ 戻る ]