---- QUOTE:
It could be nice when using only non-visual TWSocket.
Otherwise we receive additional troubles: derive our
own component; install it into IDE. And what if we
have to use other class, for example, ftp client?
What we should do in this case? Derive our new ftp
client class, redeclare Controlsocket and Datasocket
properties?
----

You do not need to "redeclare" the properties; all
you need to do is override the AssignDefaultValue()
method, like Francois said.  This method is virtual
for precisely this reason.

But, in general: yes, that's exactly what you should
do. That is the essence of Delphi and Object Oriented
Programming (OOP) in general.  This separates
functionally the underlying ICS classes from your
specific implementation and needs, which means that
if anything in ICS changes in the future, you most
likely only have to update the TWSocket libraries and
not have to worry about merging your changes back in,
which is time consuming and error prone.  Likewise,
if you need to add new functionality or update your
own implementation, you do not need to worry about
ICS at all.  This avoids potential conflicts, saves
maintenance time, and streamlines development.

Also, keep in mind that you do not necessarily have
to install your custom components into the IDE; you
can very well instantiate any component by calling
it's constructor directly.  Of course, you will not
be able to "drop" the component on a form, but
sometimes this is not a big deal.

---- QUOTE:
No, thanks... I'd better put several // in the code
and will be happy ))
----

As you wish.  But, in my opinion, this is a slippery
slope which ends up in trouble eventually.  One of
the worse potential problems with this tactic, which
I've seen before, is that it leads to developers
delaying or avoiding future ICS (or any thrid-party
library) improvements, revisions, and sometimes
important bug-fixes because of the overwhelming
thought of having to track down all possible
modifications and figure out how to merge them back
into the code-base; which ones have been obsoleted by
the update; and which new ones will be needed.

    -dZ.


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to