The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

Windows service applications

What are the advantages of running an application as a windows service as opposed to a regular application running minimized in the taskbar or in the system tray?
Tuesday, February 26, 2008
A windows service can be run even when no one is logged on to the system.
Tuesday, February 26, 2008
Also, because of what I stated above, a windows service can be run using a built-in service account which is not the same thing as a regular user account.
Tuesday, February 26, 2008
Services are typically used for server-type applications with no user interaction.

* You can set the service to log in as a specific user, regardless of who's logged into the "console" of the computer.

* The service can be made to start automatically when the system starts, so you don't have to wait for someone to log into the PC.  This makes services more appropriate for unattended applications, and explains why services don't have any windows UI.

* Since the service can be started under an account other than the one logged into the console, it can also be protected so that users can's shut the service down, as they'd be able to with an app running on their desktop.
D. Lambert Send private email
Tuesday, February 26, 2008
Tuesday, February 26, 2008
Note that running anything that has a user-interaction element, like starting up an automation copy of Excel or with a confirmation dialog ("Delete file yes/no?") is not a good candidate for running as a service.

Or... Make sure your service doesn't have any direct user interface.  Abstract it out to another application, like the way that SQL Server has it's UI in the SQL Management Studio.  That way the service can run even before anyone logs in.
Monday, March 03, 2008

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
Powered by FogBugz