This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
76
Web Server - Ask For Help / Re: Multiuser strategies for record updates with WebServer applications
« on: May 24, 2021, 07:37:58 AM »
Thanks Bruce, I'll play around with it during the next week or two.
Gordon
Gordon
77
Web Server - Ask For Help / Re: Form prompt alignment when browser width is narrow such as on an iPhone
« on: May 24, 2021, 07:36:55 AM »
Thank you for the help and advice.
Bruce you are correct in believing I didn't know about using custom.css, I'll start looking at your suggestion, I'll also try to join the webinar this week.
Many Thanks
Gordon
Bruce you are correct in believing I didn't know about using custom.css, I'll start looking at your suggestion, I'll also try to join the webinar this week.
Many Thanks
Gordon
78
Web Server - Ask For Help / Re: Form prompt alignment when browser width is narrow such as on an iPhone
« on: May 21, 2021, 06:14:39 AM »
Thank you Vinnie, the app is used across a range of devices, is it possible in WebServer to determine the user is on a reduced width browser such as a phone and serve up a different page?
Gordon
Gordon
79
Web Server - Ask For Help / HTML data entry masks
« on: May 21, 2021, 04:11:45 AM »
Has anyone used html data entry masks, I'm particularly thinking about dates and times so the separators such as / and : are fixed in the input and the entry moves from dd to mm to yyyy as the elements are filled, no need to type a separator. I understand how this can be done in html code but I'm uncertain where to place the mask details in a webserver form field definition.
Gordon
Gordon
80
Web Server - Ask For Help / Form prompt alignment when browser width is narrow such as on an iPhone
« on: May 21, 2021, 04:03:54 AM »
I realise this is probably a theme css change but I thought I'd ask.
On a NetTalk 12 app using flexbox on forms, entry field prompts understandably move from being on the left of the entry to above the related entry when screen width is limited (eg on a phone). However and this is just my own preference I would really like the prompts to be left aligned with the related entries rather than centred where they can sometimes look detached and unrelated.
It there a simple global change I can make so the whole app behaves this way or do I have to override the css for prompts on every form. I use the base theme so perhaps the correct answer is
to modify the css, obviously I'll then have to maintain my own theme from this point on.
I'm new to WebServer so my question may seem naive, don't worry I'm a quick learner so I won't be constantly asking questions, once again any advice and guidance is welcome.
Cheers
Gordon
On a NetTalk 12 app using flexbox on forms, entry field prompts understandably move from being on the left of the entry to above the related entry when screen width is limited (eg on a phone). However and this is just my own preference I would really like the prompts to be left aligned with the related entries rather than centred where they can sometimes look detached and unrelated.
It there a simple global change I can make so the whole app behaves this way or do I have to override the css for prompts on every form. I use the base theme so perhaps the correct answer is
to modify the css, obviously I'll then have to maintain my own theme from this point on.
I'm new to WebServer so my question may seem naive, don't worry I'm a quick learner so I won't be constantly asking questions, once again any advice and guidance is welcome.
Cheers
Gordon
81
Web Server - Ask For Help / Re: Multiuser strategies for record updates with WebServer applications
« on: May 20, 2021, 11:25:00 PM »
Thanks Bruce, without wishing to sound dim what does the NotifyChangeSession do and when is it called in the context of ending a sesssion?
I was also planning to use the webserver ._DeleteSession as a tidy up point, does this make sense?
Cheers
Gordon
I was also planning to use the webserver ._DeleteSession as a tidy up point, does this make sense?
Cheers
Gordon
82
Web Server - Ask For Help / Re: Halting a WebServer program from an external process
« on: May 20, 2021, 11:11:15 PM »
Thanks Bruce, I'll do that.
Gordon
Gordon
83
Web Server - Ask For Help / Re: Halting a WebServer program from an external process
« on: May 20, 2021, 07:23:44 AM »
Thank you Jane, you've given me food for thought.
Cheers
Gordon
Cheers
Gordon
84
Web Server - Ask For Help / Multiuser strategies for record updates with WebServer applications
« on: May 20, 2021, 07:15:29 AM »
I'd be very interested to know what strategies people employ to manage potentially concurrent record updates. Being session based and given the vagaries of internet connections, I wouldn't use any actual record locking, in fact I don't use standard record locking in my multiuser desktop applications, I use a record hold control file to the same effect.
I realise that some multiuser application really don't need records to be held as they tend to partition off users to their own areas, however more general purpose systems run a real risk of data loss if record updates aren't protected in some form.
While I'm happy with my reliable approach for desktop apps, I'm also looking at optimistic locking, which is actually no locking until it is time to commit changes. The problem is that it is late in the day to discover someone got there first and your updates will overwrite their update or yours will be lost, merging changes is only a likely partial and potentially confusing alternative to the first two choices.
Therefore I think the approach I will take is extend my current locking strategy to use the sessionid (am I correct in believing this remains constant for the duration of a user's session?), that way the web users and desktop users can operate on the same data in harmony. In effect I will hold a record via my hold table if it is not already held. If it is indicated as held by a sessionid I will check the session is still active, if not I will purge that session's locks and lock the record for the new requester. When a record is updated or the update process is cancelled I will release the lock. I will also release all locks for a session at session timeout or user logout. The webserver would also purge all locks at start-up and I could also have a housekeeping background thread checking for litter, as in locks from no longer active sessions but this shouldn't be required if I get the rest right.
Before someone says don't lock/hold a record (real or via my method) I should say my clients deal with medical records and arbitrarily writing over changes to data is simply not an option.
Please feel free to comment, I'm not afraid of help or criticism.
I seem to have posted a few messages in the last few days, my excuse is I'm new to WebServer and this forum so please tolerate my posts, hopefully they aren't banal.
Gordon
I realise that some multiuser application really don't need records to be held as they tend to partition off users to their own areas, however more general purpose systems run a real risk of data loss if record updates aren't protected in some form.
While I'm happy with my reliable approach for desktop apps, I'm also looking at optimistic locking, which is actually no locking until it is time to commit changes. The problem is that it is late in the day to discover someone got there first and your updates will overwrite their update or yours will be lost, merging changes is only a likely partial and potentially confusing alternative to the first two choices.
Therefore I think the approach I will take is extend my current locking strategy to use the sessionid (am I correct in believing this remains constant for the duration of a user's session?), that way the web users and desktop users can operate on the same data in harmony. In effect I will hold a record via my hold table if it is not already held. If it is indicated as held by a sessionid I will check the session is still active, if not I will purge that session's locks and lock the record for the new requester. When a record is updated or the update process is cancelled I will release the lock. I will also release all locks for a session at session timeout or user logout. The webserver would also purge all locks at start-up and I could also have a housekeeping background thread checking for litter, as in locks from no longer active sessions but this shouldn't be required if I get the rest right.
Before someone says don't lock/hold a record (real or via my method) I should say my clients deal with medical records and arbitrarily writing over changes to data is simply not an option.
Please feel free to comment, I'm not afraid of help or criticism.
I seem to have posted a few messages in the last few days, my excuse is I'm new to WebServer and this forum so please tolerate my posts, hopefully they aren't banal.
Gordon
85
Web Server - Ask For Help / Halting a WebServer program from an external process
« on: May 20, 2021, 03:40:41 AM »
I have a question relating to the client software upgrade process.
During client system upgrades there is a requirement to close any running applications, perform the upgrade and then relaunch any applications that were stopped.
For years I have used an ini file to control requests to suspend and then restart, basically I have a suspend, a start and a control app for each background application in the suite, by using these I get reliable and graceful control over upgrades. However, it is something I have used for many years and I'm sure that there may be a better method of achieving inter-application communications, maybe using built-in Windows events, so feel free to enlighten me, perhaps WinEvent already provides this facility.
Now to the point, I have only recently added a WebServer application to the suite and it is working fine, but I do have one concern and perhaps Bruce is best placed to answer this question. By default I have a 1 second timer on the application's main Window (WebServer), each second I check an ini for a suspend request, if found the application closes gracefully. My concern is the effect a 1 second timer will have when running on the main WebServer window. The alternative is to launch a timer process on a separate thread and pass a user defined event or a notify back to the webserver window to instruct it to close down.
Any suggestions welcome, how do others close a webserver for software upgrades, there are too many clients to do this manually.
Gordon
During client system upgrades there is a requirement to close any running applications, perform the upgrade and then relaunch any applications that were stopped.
For years I have used an ini file to control requests to suspend and then restart, basically I have a suspend, a start and a control app for each background application in the suite, by using these I get reliable and graceful control over upgrades. However, it is something I have used for many years and I'm sure that there may be a better method of achieving inter-application communications, maybe using built-in Windows events, so feel free to enlighten me, perhaps WinEvent already provides this facility.
Now to the point, I have only recently added a WebServer application to the suite and it is working fine, but I do have one concern and perhaps Bruce is best placed to answer this question. By default I have a 1 second timer on the application's main Window (WebServer), each second I check an ini for a suspend request, if found the application closes gracefully. My concern is the effect a 1 second timer will have when running on the main WebServer window. The alternative is to launch a timer process on a separate thread and pass a user defined event or a notify back to the webserver window to instruct it to close down.
Any suggestions welcome, how do others close a webserver for software upgrades, there are too many clients to do this manually.
Gordon
86
Web Server - Ask For Help / Re: PDF viewing on IOS
« on: May 20, 2021, 02:54:37 AM »
Hi Bruce,
No that doesn't work on an iOS device (I tested it on an iPhone but iPads have the same issue), you can't scroll and are stuck with all or part of page 1. I suspect it is because it is using Safari's built in PDF viewer, which to be blunt isn't very good. Using PDF.js you aren't reliant on the browser's built in PDF viewer which may or may not be up to the job.
Hope this helps.
Gordon
No that doesn't work on an iOS device (I tested it on an iPhone but iPads have the same issue), you can't scroll and are stuck with all or part of page 1. I suspect it is because it is using Safari's built in PDF viewer, which to be blunt isn't very good. Using PDF.js you aren't reliant on the browser's built in PDF viewer which may or may not be up to the job.
Hope this helps.
Gordon
87
Web Server - Ask For Help / Re: PDF viewing on IOS
« on: May 19, 2021, 04:58:28 AM »
I hope the following is useful, it's certainly simple and seems to work fine on iOS devices in addition to others.
You can download PDF.js from this link, I used the prebuilt (stable version).
https://mozilla.github.io/pdf.js/getting_started/
Extract the files and you will have 2 folders (build and web) and a license terms file. I renamed the web folder to viewer, edited viewer.html as follows:
one simple edit, change the script reference to the location of pdf.js as below
<script src="/build/pdf.js"></script>
Copy the folders and subfolders to you applications web folder, the renamed folders don't clash with any standard folder names.
Simply insert the following html into your own web page at the appropriate position, please note file=%2Fgendocs%2FE0A59F8B-38E8-4607-9C73-179C93030D63.pdf
in this code refers to a subfolder of web called gendocs and the filename is E0A59F8B-38E8-4607-9C73-179C93030D63.pdf, the %2F represent the path / characters in the viewer file parameter structure, obviously use your own folder structure and filenames.
<div>
<iframe id="pdf-js-viewer" src="/viewer/viewer.html?file=%2Fgendocs%2FE0A59F8B-38E8-4607-9C73-179C93030D63.pdf" title="webviewer" STYLE="width:100%; height:1000px; overflow:auto; attribute:scrolling="no"; border:none"></iframe>
</div>
I hope this is useful, I'm no html expert so please feel free to improve on it and share the improvements.
Gordon
You can download PDF.js from this link, I used the prebuilt (stable version).
https://mozilla.github.io/pdf.js/getting_started/
Extract the files and you will have 2 folders (build and web) and a license terms file. I renamed the web folder to viewer, edited viewer.html as follows:
one simple edit, change the script reference to the location of pdf.js as below
<script src="/build/pdf.js"></script>
Copy the folders and subfolders to you applications web folder, the renamed folders don't clash with any standard folder names.
Simply insert the following html into your own web page at the appropriate position, please note file=%2Fgendocs%2FE0A59F8B-38E8-4607-9C73-179C93030D63.pdf
in this code refers to a subfolder of web called gendocs and the filename is E0A59F8B-38E8-4607-9C73-179C93030D63.pdf, the %2F represent the path / characters in the viewer file parameter structure, obviously use your own folder structure and filenames.
<div>
<iframe id="pdf-js-viewer" src="/viewer/viewer.html?file=%2Fgendocs%2FE0A59F8B-38E8-4607-9C73-179C93030D63.pdf" title="webviewer" STYLE="width:100%; height:1000px; overflow:auto; attribute:scrolling="no"; border:none"></iframe>
</div>
I hope this is useful, I'm no html expert so please feel free to improve on it and share the improvements.
Gordon
88
Web Server - Ask For Help / Re: PDF viewing on IOS
« on: May 18, 2021, 07:42:37 AM »
I have this working if anyone is interested, I build a page that uses PDF.js and it works fine for viewing on a desktop and also on IOS devices including scrolling.
89
Web Server - Ask For Help / PDF viewing on IOS
« on: May 18, 2021, 04:38:10 AM »
Normally embedded PDF's don't scroll on an IOS device, has anyone tried a solution such as PDF.js to get around this, if so how successful was it?
Cheers
Gordon
Cheers
Gordon
90
Web Server - Ask For Help / Re: Webserver iconized
« on: May 18, 2021, 04:35:07 AM »
Thank you Bruce.