Sorry to keep sounding like a broken record, but I need some more advice.
1. I am starting to feel that an "all in one" B4J app
doing both (
POS interface front-end) as well as back-end (
SQLite database and reply to remote devices) may not be the best design. For example, if the front-end has a login screen or various "confirm?" (modal dialogs) then this will stall (pause) the back-end stuff until user responds, correct?
2. Can I have
two separate Java UI apps (running on the same PC) instead for division of tasks?
How would I handle communications between the POS front-end app and the other app handling database and network reply?
The only thing I have found is
https://www.b4x.com/android/forum/threads/communication-between-ui-and-non-ui-app.54548/#content which seems to indicate that you use either a TCP/IP or UDP communication to communicate.
So I guess this would be something like
UI front-end app connects to other UI back-end app at UDP port 2000
UI back-end app opens ServerSocket on TCP/IP port 3000 for remote network devices to connect to it. It also listens on UDP port 2000 for communication with front-end). (UI could be used to display status screen)
UDP ports used since both are running on same PC and no need for extra TCP/IP overhead?
Is there any other way to have 2 different apps communicate with each other? (I have seen
https://www.b4x.com/android/forum/threads/b4x-the-networkers-guide-to-the-galaxy.68974/ )
The only disadvantage here is that testing/debugging both is more complex. However since it seems that you can have more than one instance of B4J open I guess you could work on both in separate B4J windows?