I am guessing it is faster for the computer to run a console app. But really what are other purposes of making a console app, just out of curiosity? I do not see why people would find it to be worth it buying the console deployment in Xojo, when you have desktop deployment. Even if console apps run faster, I do not think it is worth the money unless there are purposes I am unaware of.
[quote=35890:@Paul Lefebvre]Console apps are commonly used for apps that run in the background, such as service or daemon apps. They can also be used to create command-line apps.
This blog post also describes how you can use console apps to do multiprocessing:
Before we close this out. Since I’ve never had an occasion to use a console app I’m curious as to how it’s different from just having a headless desktop app (default window = none).
A desktop app, even a headless one, includes resources that my not be valid in a service app. Therefore, your headless GUI app may not run as a service some platforms. A console app will.
Use console apps for programs that don’t require user input, or for an end-user that doesn’t mind a cruder interface. For example I once wrote a TCP Chat Server that only listened for incoming connections and responded to a few commands such as kicking a connected client or printing a list of connected clients. I didn’t need a GUI for that.
If you’ve ever gone and written a program in C or C++ that needs a GUI you’ll have seen that there are quite a few more things required to make a GUI work. First of all there’s a whole lot of extra variables and classes related to the GUI that need to be stored in the RAM. Secondly you need a giant event receiver to handle GUI events like users clicking buttons or typing into text fields. That all creates potentially unnecessary overhead.
Since you’re curious, look at this WinAPI in C++ example. That is a naked/hello world GUI application in C++. You’ll notice how much code is there. Xojo hides all of that technicality from you, but it’s still there.
Now look at your equivilent console application:
[code]#include <stdio.h>
int main(int argc, char **argv)
{
puts(“Hello world!”);
return 0;
}[/code]
There shouldn’t be any doubt which one is faster and uses less memory.