The problem with ref. counting classes is that classes could have
cyclic references which can't be handled properly by ref. counted data
types.
With Interfaces you have to avoid cyclic references too, else the object
will never be out of context.
Eg:
ObjectList -> Item
The ObjectList holds the Item in TInterfaceList, but if you have to know
what list owns the Item, you should use Pointer, else you will have cyclic
TItem = class(TInterfacedObject, IItemInterface)
private
FList: Pointer;
...
end;
I usually work only with Interface, this give a lot of flexibility.
Now Im finishing to implement 3 frameworks (Delphi) all Interface based,
but I think that will run in fpc too, if not I will port
VTF - ValueType Framewok
OPF - Object Persistent Framework
MVP - Model View Presenter
I have a alpha version for download at
http://jazz.liws.com.br/download/jazz_a1.zip
If anyone have interest to know more or have a updated version, contact
me at "jazz at liws dot com dot br"
Best regards,
Cesar Romero
http://blogs.liws.com.br/cesar
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives