Convert desktop helper app to console or web app

The wonderful Valentina database has one major drawback: it doesn’t have a full text search. For a local database adding an index in SQLite was totally easy. For the server version of my app I had to do a very simple sort of SQLite server. Which started it’s life as desktop app. There aren’t many features: connect to an SQLite database, write, delete, read and close the SQLite database.

Now I want to simplify the setup for the server version. Part of this is making the helper app less visible.

I know about console and web apps but don’t have any experience with them. Which is easier to handle? I had a look at the Aloe framework which seems to be “web lite”. Any tips or advice? Oh, and I will need a Linux version in addition to macOS.

Xojo Web has a desktop-like U.I. whereas open-source Aloe is HTTP server code running as a Xojo Console app - there’s no user interface framework with Alloe. Thus Xojo Web is quite chatty over the network whereas Alloe can handle more users. Using Xojo Console and a sockets alone you get to control the main thread whereas with Xojo Web the main thread is largely inaccessible - which is usually not a problem.

Which one to go for often depends on how many users you want to support as they are all single processor bound. But if you keep using SQLite I imagine Xojo Web will be fine - plus you can build Web browser apps - provided your queries can execute quickly enough to avoid contentions holding users up. But if you need more HTTP requests than Xojo Web can support I suspect you may well be maxing out your SQLite anyway, although I am far from a database expert.

What I can say is I’ve tested SQLite performance on Linux with Xojo and its fine, and it can run purely in memory too if you want for blistering read-only speed. However Xojo Web buttons may need to be bigger than the IDE indicates to fit all text in at runtime in my experience. Where no U.I is needed use HandleURL in Xojo Web to avoid the U.I overhead.

Keep developing in the Mac IDE if your security context allows as the Linux IDE requires some TLC from Xojo Inc. However I have found our own apps run fine on Debian-based linuxes (at least), on both Intel and ARM processors.

Thanks, Eric, that was helpful. If I use Aloe I would have to make the interface in the main app. Don’t know, yet, about the number of users. So I think I’ll try with a web app first.

Sounds like a plan.

Might mention though that Web UI updates are usually sent across the wire only at the end of the call stack, unless your UI update code is running in a WebThread. That is quite different to a desktop app where display is incompatible with threads. Also, WebThreads (and Threads for that matter) running on a server obviously are not interrupted by the user holding down the mouse since that happens in their browser.

Not so obvious is that WebTimers fire on the browser and raise an event on the server, so if your client goes away, your timer does too. If that’s a problem you can use WebThreads with a Do…Loop & Sleeps. My understanding is ordinary Timers run code in the main event loop of the Web app which isn’t a good idea as it interferes with processor scheduling between Web user sessions each of which have their own Session thread to which their respective WebThreads relate .