[fpc-devel] interfaces vs classes in dll

Helmut Hartl helmut.hartl at firmos.at
Mon Dec 3 11:22:58 CET 2007


>> One advantage is that it can be easely used on many languages, 
>> althougth the usefulness of that for ideintf is probably very small.
>>   

>I suppose you mean programming languages not spoken languages.
>But Interface is a Delphi language keyword. I don't see what this has
to with C or whatever.
>To interface Delphi Language "Interfaces" with other programming
languages additionally to the Delphi language construct a common ABI
needs to be defined.

>I do see that in Windows this is the case with a Delphi language
"Interface" assigned to a Windows "COM" interface, which "on the other
site" can have an interface to a 
>function written in any language (as a DLL, OLE thingy or whatever).
But as FP is supposed to be OS independent, the ABI between the FOP
program and "the other site" needs >to be done without Windows specs.
> -Michael

If one speaks of "interfaces", he could also mean it in the following
"computer science" relateted contexts:

http://en.wikipedia.org/wiki/Interface_%28computer_science%29

and

http://en.wikipedia.org/wiki/Design_Patterns (!)

The book about design patterns is a very valuable source of information,
and a good starting point for the
"interface" concept, beside CORBA, COM and Keywords.

Software Design using interfaces provides a big chance of reusing your
software, simplified tests 
(by just changing the class implemting the interface) and a clearer
contract between many programmers.

So the concept is also be Usable on its own without the link to CORBA,
COM, OLE.

ZEOS Database Libraries are based on the GoF Design Patterns,
extensively using interfaces, if someone wants
a practical implementation, that is FPC source code and not necessarely
windows centric....

helmut



More information about the fpc-devel mailing list