WORKSHOP |
WORKSHOP
28. - 29. april
Hotel Hesselet
Bogdan Polak
Modernisation
of highly coupled VCL applications
|
BESKRIVELSE |
This workshop will help you working with and
improving large legacy VCL applications. The foundation of software
engineering is code improvements which requires existing code refactoring.
However, for VCL projects, such changes have a high risk of introducing
many defects, because usually in these projects test coverage is too weak
or even there is no unit-tests at all.
During the workshop, we will practice how to split up a monolithic VCL
project into smaller pieces, and then cover them with automated tests.
Because monolithic systems are becoming too large to deal with, many
companies are trying to break them
down into
smaller pieces. Increasing pressure from the
microservices solutions forcing companies to change. This workshop will
help Delphi developers to be better prepared for upcoming challenges and
practice refactoring techniques in advance.
Day 1 will be dedicated to the use of class helpers and writing unit
tests. We will introduce TDD approach, improve code readability and reuse
and we will reduce lines of code in the forms.
Day 2 will learn how to extract business logics and how to test it. We
will introduce two patterns: (1) Delphi Command Pattern which helps in
extraction of long methods and (2) Delphi Data Proxy Pattern which helps
in extraction of business logic which is strongly dependant on TDataSet
component.
Used patterns and libraries:
- https://github.com/bogdanpolak/class-helpers
- https://github.com/bogdanpolak/command-delphi
- https://github.com/bogdanpolak/delphi-dataproxy
Bogdan Polak
Is a polish developer who has many years of Delphi development, especially
as a trainer and a consultant. Bogdan has been the coordinator of the
Polish Community, and has been a speaker at numerous Delphi Conferences.
Spare time is often used with recreational sports, like sailing and skiing,
|
PROGRAM |
DAY1
08:00 |
Arrival
and setup |
|
09:30 |
Welcome |
|
09:40 |
Large projects refactoring |
Introduction to challenges and requirements needed to
improve legacy VCL Forms application. How to break the barrier of
fear of change? How to protect against mistakes? |
10:10 |
Class helpers & DUnitX |
Class helpers as an example of very low risk
refactoring and very easy array to implement and improve unit
testing skills |
10:50 |
Break |
|
11:00 |
Extracting utility functions |
Review of possible use of class and record helpers.
Practical examples. Selecting and introducing good candidates for
the helpers |
12:00 |
Lunch |
|
13:00 |
Helper Good practices |
Understanding the “dark side of class helpers”.
Overview of helpers good and inconvenient candidates.
Test-first approach. |
14:00 |
|
|
14:10 |
Test
Driven Development |
Incremental and high velocity Red-Green-Refactor
cycles. Using TDD technique for expanding helpers library. |
15:00 |
|
|
15:10 |
Helpers maintenance |
Class helpers library as an independent project.
Planing, branching model and release cycle.
Continuous integration (CI/CD process). |
16:00 |
A
Word from Nohau |
|
|
|
|
|
|
|
DAY 2
09:00 |
Breaking out big methods |
Extracting big methods containing important business
logic into separate class using Delphi Command Pattern.
Copy-Paste technique. Injecting dependencies. |
10:00 |
|
|
10:10 |
Removing UI dependencies |
Cleaning extracted business logic by removing all
visual dependencies. Refreshing and notify visual controls. Removing
other irrelevant dependencies and the breaking down long method code
into smaller more logical pieces |
11:00 |
|
|
11:10 |
Coding against the interface |
Applying Dependency Invention Principle and Interface
Segregation Principle. Testable and non-testable code. Working with
project using many interfaces. |
12:00 |
Lunch |
|
13:00 |
Dealing with the datasets |
Using Delphi Data Proxy Pattern. Fighting with mixing
business logic with data manipulation and data management code.
Improving strongly coupled (spaghetti) code. Replacing SQL datasets
with fake memory ones. |
14:00 |
|
|
14:10 |
Mocking dependencies |
Extracting external dependencies from business logic.
Testing data proxy in isolation. Learning Delphi Mock Framework.
Mock vs Fakes. Testing private methods of bigger class. |
15:00 |
|
|
15:10 |
Decomposing extracted items |
Decomposing big classes into smaller ones. Safe vs
dangerous refactoring. Constructor injection and composing more
general classes form smaller items.
Application composer and Dependency Injection Container. |
16:00 |
Wrap-up and evaluation |
|
|
STED |
|
PRIS |
- Prisen for WorkShop incl. overnatning på
hotel og alle måltider er: kr. 6.200,-
-
Hvis du eller dit firma
ikke er medlemmer af DAPUG er prisen kr. 7.000,-,-
- Ekstra overnatning fra 27. april koster kr. 1.180,-
- OBS: Hvis beløbet er
indbetalt på regnr. 1551 konto. 4 76 67 76
inden 23. april er prisen kr. 5.700 (kr. 6.500, hvis man ikke er
medlem)
(International payments: SWIFT-BIC: DABADKKK - IBAN: DK10 3000 0004
7667 76)
|
TILMELDING |
Allersidste frist for
tilmelding er 27. marts 2020
Aflyst
pga. corona-virus / covid-19 situationen
|