[Lazarus] Some thoughts about the global 'Application' instance.
Hans-Peter Diettrich
DrDiettrich1 at aol.com
Thu Jun 18 21:56:29 CEST 2009
Joost van der Sluis schrieb:
>> Same in Delphi
>
> I know, but can't we come up with a better design?
>
>> I have service and forms application in same exe file, so i have 2
>> application in same instance.
In a redesign we also should consider the different handling of consol
applications with GUI on non-Windows platforms.
Should we (also) have a Process object, for the console part of an
application?
Should we have objects at all, for process/application management? When
the general TApplication methods are converted into (non-virtual) class
methods, these methods can be implemented and used for all application
types.
We also could create a true Pascal singleton, in an Application.pp unit.
The primary question IMO is about the role which the Application object
plays, in an application in general, and in specialized application
types. In the best case we can press all the methods and properties into
one class, and add the implementation of application-specific parts by
OnXYZ handlers.
DoDi
More information about the Lazarus
mailing list