Topic: ADUG Perth Meeting - May-2025 - 6pm Start (Perth AWST).
Time: 20th May 2025 18:00 Perth 2025-05-20T10:00:00Z
Join Zoom Meeting
Meeting ID: 823 7926 3676
Passcode: 142405
Topic: ADUG Perth Meeting - May-2025 - 6pm Start (Perth AWST).
Time: 20th May 2025 18:00 Perth 2025-05-20T10:00:00Z
Join Zoom Meeting
Meeting ID: 823 7926 3676
Passcode: 142405
I may go to gaol, Ned Kelly style, for having taken this long to upload Scott van der Linden’s epic presentation to us in November 2024.
The Principle of Loose Coupling. Scott did an amazing job, speaking coherently on the subject for 3 hours.
He has always been a great presenter, and this was another awesome one.
Zoom Summary :
Dependency Injection and Anonymous Methods
Scott van discussed the concept of dependency injection in programming, specifically using classes and constructors. He explained how to decouple a class from a specific widget by passing through a widget class instead of an instance. This allows for more flexibility in instantiating the widget at a later time. Scott also introduced the concept of anonymous methods to handle multiple constructors in descendant classes. Paul asked clarifying questions about the use of class of and the implications of polymorphism, which Scott answered. The discussion concluded with Scott explaining the need for a specific return type when using anonymous methods.
Loosely Coupled Code With Factories
Scott discussed the benefits of using anonymous methods and factories to create loosely coupled code. He demonstrated how to register and instantiate different classes using a single point of contact, which reduces dependencies and makes it easier to swap out units. Scott also showed how to use a factory to generate forms and how to pass parameters through the factory. He emphasized the importance of having a contracts page, or single point of contact, for all classes. Paul and Richard asked questions about the code, and Scott provided explanations and solutions to their concerns.
TValue, TVariant, and TType
Scott van discussed the use of Tvalue and Tvariant in programming, highlighting their flexibility but also their finicky nature. He explained that Tvalue can store practically anything but can be difficult to extract data from, while Tvariant is more straightforward but less flexible. Scott also mentioned the possibility of using TType for storing types, and the concept of an array of types. The team also discussed the mysterious “HFA” acronym, which was eventually identified as a specialized type of pointer used for optimizing storage and calling conventions on ARM and ARM64 platforms.
Lifetime Management in Object-Oriented Programming
In the meeting, Scott van discussed the importance of lifetime management in object-oriented programming, emphasizing the need to manage the lifetime of objects to prevent memory leaks. He explained that forms manage the lifetime of everything they own, and if an object is not part of the form’s descendant, it needs to have another way of dealing with it. Scott also discussed the difference between interfaces and objects, stating that interfaces are purely a contract and do not manage the lifetime of objects. He also mentioned that in C#, interfaces are not reference-counted, but rather managed by the garbage collector. Richard and Paul also contributed to the discussion, asking questions and clarifying points.
Delphi Interface Implementation and Casting
In the meeting, Scott van discussed the implementation of multiple interfaces in Delphi programming. He explained how to handle conflicts between interfaces with the same method or property, and how to use the “implements” keyword to specify the interface being implemented. Richard shared his experience of not finding examples for creating an object as an interface and casting it to another interface it supports. Scott also demonstrated how to use the “supports” keyword to check if an object supports a particular interface. The team also discussed the potential issues that can arise when casting objects between interfaces and the importance of using the correct syntax to avoid errors.
Interfaces, Properties, and Default Values
In the meeting, Paul and Scott discussed the use of interfaces in programming, with Scott explaining the benefits of using interfaces for loose coupling and high cohesion. They also discussed the use of properties in programming, with Scott explaining that properties can be used to enforce read-only or write-only access to fields. The conversation also touched on the use of default values in programming, with Scott explaining that default values can be used to suppress certain values when streaming data.
[As of right now - currently still processing]
I’m sorry, I forgot to post here.
ADUG Perth will be meeting for 2 hrs from 6pm AWST (about 30min away),
and then joining with the UK Dev Group to hear our own @vincent Parrett presenting, in person, in London.
Topic: ADUG Perth Meeting - May-2025 - 6pm Start (Perth AWST).
Time: 20th May 2025 18:00 Perth 2025-05-20T10:00:00Z
Join Zoom Meeting
Meeting ID: 823 7926 3676
Passcode: 142405
Last month we had a good bunch of people (14) turn up for “Delphi Interfaces for the Confused and Distressed”.
I have been making a summary of all the excellent elements that came out of the discussions, along with web links, and other references. BUT they are not typed in yet.
This is the meat of it :
Getting in to it, listening to @Vincent