here's a tech question for non-tech

I have not had occasion to want to do this before, so I'm hoping
someone can enlighten me. I have an app built in D7, and it's rather
complex in its functionality. Is it possible to rebuild the app to run
as a service? Would that require separating the user interface from the
app?
Thanks,
Bill
0
William
4/22/2010 9:20:18 PM
📁 embarcadero.delphi.non-tech
📃 5933 articles.
⭐ 1 followers.

💬 4 Replies
👁️‍🗨️ 2008 Views


William Meyer wrote on 4/22/2010 :
> I have not had occasion to want to do this before, so I'm hoping
> someone can enlighten me. I have an app built in D7, and it's rather
> complex in its functionality. Is it possible to rebuild the app to run
> as a service? Would that require separating the user interface from the
> app?
>
> Thanks,
>
> Bill
I'll take this softball question.
Yes.
More detailed?
It is easiest to handle this a two projects that have the
same files.  One project is a normal executable, the other
is the service project.
Work with the first until you have all the issues resolved.
Then try getting it working as a service.  Don't try to take
both leaps at the same time.   Not being able to debug or see
what is going on is just too much hassle.
HTH,
Brad.
-- 
To people who think about their lives, almost everything
that happens, or that they read, provides a way of learning.
To those who don't examine their lives, all the experience
of the ages is worthless.
0
Brad
4/22/2010 11:44:03 PM
On 2010-04-22 19:44:03 -0400, Brad White 
<bwhiteDONTINCLUDE@inebraska.com> said:
> Not being able to debug or see
> what is going on is just too much hassle.
True, but you can attach the Delphi debugger to your server process and 
debug as one does with a GUI app.  However, especially in the case of 
services, I find SmartInspect from http://Gurock.com to be an extremely 
useful tool.
--
Kevin Powick
0
Kevin
4/23/2010 12:18:57 AM
Brad White wrote:
> I'll take this softball question.
Thanks, Brad. The existing app is solid. So the conversion should not
be terrible.
Bill
0
William
4/23/2010 2:26:48 AM
> as a service? Would that require separating the user interface from the
> app?
From Vista onwards, services run in a different windows station and should not interact with the interactive user window station (see http://msdn.microsoft.com/en-us/library/ms683502(VS.85).aspx). Beware that circumventing this protection *may expose a system to dangerous vulnerabilities*, there are very good reasons why a service running with elevated privileges should not show a UI. If needed, ensure the service runs with limited privileges.
And there are terminal server/fast user switching issues too.
0
Luigi
4/23/2010 8:32:16 AM
Reply: