Board index » cppbuilder » Creating Service Applications with BCB5

Creating Service Applications with BCB5


2004-02-16 08:13:32 PM
cppbuilder75
Is it save to create service apps with BCB5 even if they are
not interactive ? Found some posts which are related to
Delphi and I''m not sure which BDB version matches ?
Take a look at this one for example:
tinyurl.com/2ljmc
Regards,
Frank
 
 

Re:Creating Service Applications with BCB5

"Frank Gruber" < XXXX@XXXXX.COM >wrote in message
Quote
Is it save to create service apps with BCB5 even
if they are not interactive ?
TService works just fine as a non-interactive service. I've created several
non-interactive services based on TService under BCB5 and 6 without
troubles.
A service should not include any visual elements to begin with, though. If
you need to do any UI work, you are better off putting the UI logic into its
own non-service application that communicates with the service when needed.
Service are primarily meant to be background non-visual tasks.
Gambit
 

Re:Creating Service Applications with BCB5

Quote
TService works just fine as a non-interactive service. I've created
several
non-interactive services based on TService under BCB5 and 6 without
troubles.
A service should not include any visual elements to begin with, though.
If
you need to do any UI work, you are better off putting the UI logic into
its
own non-service application that communicates with the service when
needed.
Service are primarily meant to be background non-visual tasks.
I agree with you here, but with VCL involved this seems to be impossible as
there
are often windows created under the hood. The problem seems to be that
as far as VCL is involved atoms are used to store some global data and
that the Windows atom atable is allways cleared on user logoff. Then when
a user loggs off and in again this will lead to invalid refereces causing
AVs.
Quote
A service should not include any visual elements to begin with, though.
It seems there are many service apps out there even from
popular companies ignoring this rule.
Regards,
Frank.
 

{smallsort}

Re:Creating Service Applications with BCB5

"Frank Gruber" < XXXX@XXXXX.COM >wrote in message
Quote
I agree with you here, but with VCL involved this seems to
be impossible as there are often windows created under the hood.
Which is fine, though, because the windows are not visual, they do not
interact with the user at all. I did not say that services cannot have
windows at all. The windows are created and used internally only within the
context of the desktop/workstation that the service itself is running under.
The situation becomes tricky to manage when the windows are made visual to
the user.
Quote
The problem seems to be that as far as VCL is involved atoms
are used to store some global data and that the Windows atom
atable is allways cleared on user logoff. Then when a user loggs
off and in again this will lead to invalid refereces causing AVs.
I have not run across that problem yet in my own services.
Quote
It seems there are many service apps out there even from
popular companies ignoring this rule.
It is technically possible to use visual interactive UI elements in a
service, but it is a bigger pain to program that than to simple create a
separate application that uses IPC internally instead.
Gambit