1 ... Introduction ... 11
... 1.1 ... What are Design Patterns? ... 12
... 1.2 ... Communication in Design Patterns ... 13
... 1.3 ... Design Patterns in Software Design ... 14
... 1.4 ... Success Story: The Project and Its By-Product ... 15
... 1.5 ... Formatting and Naming Conventions ... 17
... 1.6 ... Prerequisites ... 18
... 1.7 ... Structure of the Book ... 25
2 ... The Demo Application ... 29
... 2.1 ... Demo Application Server Version Compatibility ... 31
... 2.2 ... Object Orientation ... 32
... 2.3 ... Demo Application at Work ... 32
... 2.4 ... Application Model ... 38
... 2.5 ... SAP GUI Application Controller ... 41
... 2.6 ... Web Dynpro Application Controller ... 42
... 2.7 ... Running the Application While Reading ... 44
... 2.8 ... Summary ... 45
3 ... The Singleton Pattern ... 47
... 3.1 ... Case-Study Problem: Running Main Program Only Once ... 48
... 3.2 ... Singleton in the Application Model ... 50
... 3.3 ... Summary ... 51
4 ... The Adapter Pattern ... 53
... 4.1 ... Case-Study Problem: Application with a Command Tree ... 53
... 4.2 ... The Adapter in the Demo Application ... 55
... 4.3 ... Interface ZIF_DPD_TREE_OBJECT ... 55
... 4.4 ... Usage of the ZIF_DPD_TREE_OBJECT Interface ... 61
... 4.5 ... Summary ... 64
5 ... The Factory Pattern ... 65
... 5.1 ... Real-Life Example ... 67
... 5.2 ... Case-Study Problem: Docking Containers Orderly Arranged ... 67
... 5.3 ... Class ZCL_DPD_DOCK_CONTAINER_FACTORY ... 69
... 5.4 ... Summary ... 77
6 ... The Model-View-Controller (MVC) Pattern ... 79
... 6.1 ... Two MVCs in the Demo Application ... 81
... 6.2 ... Case-Study Problem I: Single Application in Different UI Technologies ... 83
... 6.3 ... Case-Study Problem II: SAP GUI -- Displaying Table Data in Different Controls ... 84
... 6.4 ... The Application Model: Class ZCL_DPD_APP_MOD ... 86
... 6.5 ... Class ZCL_DPD_MOD_DBT ... 91
... 6.6 ... Class lcl_mod_dbt_carriers ... 97
... 6.7 ... Other lcl_mod_* classes ... 100
... 6.8 ... Controller 1: The Program ZDPD_APP_CON_GUI ... 100
... 6.9 ... Class lcl_main_program ... 102
... 6.10 ... Class lcl_con_alv ... 111
... 6.11 ... Class lcl_con_dd ... 121
... 6.12 ... Dynpro Screen: An Alien in All-Objects Program ... 129
... 6.13 ... Class lcl_con_dynpro_screen ... 135
... 6.14 ... The Controller 2: Web Dynpro Component ZDPD_APP_CON_WEBDYNPRO ... 142
... 6.15 ... Summary ... 165
... 6.16 ... Appendix: Process "Open Object -- Close Object" ... 166
7 ... The Façade Pattern ... 171
... 7.1 ... Case-Study Problem: Editing Comments on Each Flight Schedule ... 174
... 7.2 ... Class ZCL_DPD_ST_TEXT_EDITOR ... 179
... 7.3 ... Façade in Web Dynpro ... 188
... 7.4 ... Summary ... 188
8 ... The Composite Pattern ... 191
... 8.1 ... Case-Study Problem: Organizing Flights by Date ... 194
... 8.2 ... Class lcl_mod_dbt_flights ... 196
... 8.3 ... Summary ... 209
9 ... The Decorator Pattern ... 211
... 9.1 ... Case-Study Problem: Lookup Data for Internal Tables ... 213
... 9.2 ... Class ZCL_DPD_ITAB_DEC ... 218
... 9.3 ... Class ZCL_DPD_ITAB_DEC_AIRPORTS ... 224
... 9.4 ... Class lcl_itab_dec_fl_sched_comment ... 231
... 9.5 ... Other Decorators in the Application ... 234
... 9.6 ... Implementation of the Decorator Pattern in the Application ... 235
... 9.7 ... Summary ... 236
10 ... Summary ... 237
... 10.1 ... Examples of Extension ... 237
... 10.2 ... Benefits of Combining Objects with DPs ... 245
... 10.3 ... Closing Word by the Author ... 247
... The Author ... 249
... Index ... 251