[fpc-pascal] Browser and exe

Marcos Douglas B. Santos md at delfire.net
Thu May 25 15:14:38 CEST 2017


On Wed, May 24, 2017 at 4:23 PM, Graeme Geldenhuys
<mailinglists at geldenhuys.co.uk> wrote:
>> 2. How did you garantee that others applications aren't being using
>> the same port as your application to avoind conflicts?
>
>
> I looked at the official IANA list of registered port numbers and chose a
> port number that hasn't been taken yet.
>
>    http://www.iana.org/assignments/port-numbers
>
> Under FreeBSD you can review the /etc/services file. I believe Linux has
> something similar. Or simply use the URL above.

Thanks for that link, I didn't know.
But I meant, how do you know if another app is already using a port
that you want to use?

>> 3. How was the best way to start the application as a server and
>> keeping it alive?
>
>
> In our case, the user double clicked our application icon on the desktop.
> This started a desktop GUI application, which at the same time started the
> embedded HTTP server (which was built into that desktop application). They
> then searched and scheduled their assigned tasks for the day/lesson. They
> then clicked "view module", which then launched the installed web browser
> with the correct URL as parameter - thus connecting to the embedded HTTP
> server. In the mean time the desktop application stayed open - otherwise the
> embedded HTTP server will obvious shut down. We also had a user configurable
> option that when they clicked "view module", it could also minimise the
> desktop application before launching the web browser.

Maybe you or me has understood wrong...
I understood that your desktop application open an URL in the browser
— I didn't understand either it is an embedded one inside in the GUI
or using the default browser — which was given by desktop app as a
parameter, when they click in "view module".
But as I understood, your main application is the desktop, which uses
a browser to show the content.

In my case, the website is the main app which ones was installed in a
webserver on the web, not locally. So, my idea is to use the local
webserver only in a few cases. The main website will request for the
URL http://localhost/myapp , get and process which was returned and
still continue in the main website — all this using asyncronous
JavaScript.

What do you think about it?

> We thought of implementing a Windows Service & *nix Daemon, but that would
> require more effort to install etc. The desktop application was the simplest
> solution and worked perfectly.

Yeah, simple is better.

Best regards,
Marcos Douglas



More information about the fpc-pascal mailing list