On Dec 20, 2006, at 11:48 AM, Charles Yeomans wrote:

What is the difference between a console app and a service app, other than the support for Windows in service apps?

The 2005r4 LR is useful this :
A Service application is a special type of ConsoleApplication that is designed to run without any interface and even if are no users logged in. A Service application should not require any user interaction since it's possible that no user is logged in while your application is running. Typical examples of service applications are FTP servers, HTTP servers, and other types of servers that have no user interface.

Console applications rely on the Print and Input commands for communicating with the user. Services behave much the same (depending on how the service is installed, and on what operating system). For example, if your service is run as a daemon on Mac OS X or Linux using the inet.d scripts, then Print and Input will actually correspond to a socket that the system has already attached for you. This means that the Write method of the StandardOutputStream class will actually behave just like a socket and the Read method of the StandardInputStream class will as well.

It is worth noting that this behavior is not guaranteed for all operating systems. If you plan on deploying your service on multiple OS's, it is best to use a TCPSocket directly instead of relying on standard input and output being hooked up to a socket for you.

To create a service application, you must first create a regular console application. Choose File . New Project and choose the Console Application item. A console application, has a single project item called App whose super class is ConsoleApplication. Change App's super to ServiceApplication.

The ServiceApplication class is a subclass of ConsoleApplication class, so all the ConsoleApplication events and methods are available. In addition to the ConsoleApplication's events, there are three new events for a ServiceApplication. Some of these events will be fired only on operating systems that support them--and the only OS that supports them currently is Windows.





A service is a console app but a console app is not necessarily a service (esp on Windows)

On OS X and Linux they should be nearly identical
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to