|
-
Jun 12th, 2007, 08:03 AM
#1
Thread Starter
Hyperactive Member
window service vs window application
Hi. I've been thinking about ways in which I could take advantage of window services however in practice I have not been able to. Let's say for e.g. a simple program, running in the background and backing up the database nightly. I originally thought I could implement this as a window service. But then I needed ways to allow the user to input configuration details e.g. directories etc. So I had no choice but to implement it as a hidden window application with a notify icon that had the option to change configuration.
Is there any way I could take advantage of window services for the above program? Most of the implementation could be done as a window service except allowing the user to set and edit the configuration details.
Jennifer.
-
Jun 12th, 2007, 08:37 AM
#2
Re: window service vs window application
Implement the backup logic as a service and provide an application front-end for the service configuration.
-
Jun 12th, 2007, 08:59 AM
#3
Re: window service vs window application
The way I do this is to have a separate administrative program that's used to set the configuration information for the service. This data is saved in a serialized data file in the All Users data area for our product. When the configuration is changed, the service is restarted and it reads in the new configuration into its own configuration class and it's ready to go.
If you need something more sophisticated, you can use remoting or other lower level methods to communicate between the desktop app and the service.
-
Jun 15th, 2007, 08:58 AM
#4
Thread Starter
Hyperactive Member
Re: window service vs window application
Ok I understand. on a different note, let's take that same program that's backing up files nightly. Is there any significant advantage doing this as a service rather than an application without a form and just a notify icon?
Jennifer.
-
Jun 15th, 2007, 09:09 AM
#5
Re: window service vs window application
The advantage of a service is that nobody needs to be logged on to the system. This is particularly important for processes that run unattended.
-
Jun 15th, 2007, 11:53 AM
#6
Thread Starter
Hyperactive Member
Re: window service vs window application
Thanks for your response, was very helpful.
Jennifer.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|