Hello Folks!
Our next meeting is tonight on PWA and local files.
Monday, 6th December 2021 at 7:30 PM (AEDST) on Zoom.
Here are the meeting details:
CU tonight.
Salut,
Mathias
Hello Folks!
Our next meeting is tonight on PWA and local files.
Monday, 6th December 2021 at 7:30 PM (AEDST) on Zoom.
Here are the meeting details:
CU tonight.
Salut,
Mathias
Great meeting. TMS WEB Core ships with interesting demo located in Demos / Web / Dictaphone folder. It is actually a Progressive Web Application which allows you to record speech and saves it in-memory dataset.
With PWA technology on mobile device the web application is installed like native application which also can be used offline. For PWA to work you have to use secure connection with HTTPS. Fortunately Rohit Gupta had secure webserver available to test. It worked!
Tip: in dictaphone demo TWebLabel.Caption property is used to assign an icon as HTML string: use TWebLabel.HTML property directly.
For next time local files and local databases are still on the menu. With normal web application access to local file system is not possible due to security restrictions.
With TMS Miletus on other hand it is possible to develop native applications which have possibility to access local file system and local database.
IndexedDB
I made a project, adapted from one of the demos to show you can work with multiple databases that are stored on the client’s machine with IndexDB. I have uploaded it here
IndexedDB Demo
IndexDB.rar
has the full source. And you can run Test1.html
in the browser. Once running, in browser menu (not the application), there is a menu option “Install”, if you want to install on your device.
In the test above, the SwapDB button swaps between two databases. You can enter different tasks and see that it does save them and they are persistent.
Here’s a good description of IndexedDB, I cant get the link to work.Working with IndexedDB  | Web  | Google Developers. Its supposed to be present in all browsers, its non-sql. And is stored under the domain. This leads to two assumptions
I have had a few issues with a larger PWA application
On the plus side
css
is a bonus.If someone wants to have a look at this application, they can run/install from My Graphs, run My_Graphs.html
. Its work in progress. Much of the time has gone into grafting the forms, and implementing the menu system. The menu is disabled for some pages (intended so that they have to press ok or cancel). I am using a template form with these two buttons with images loaded at run-time rather than design time. This is inherited - yay this works. And the graph and edit pages are just adapted demos to prove that those components will work in the PWA. All components are now proven, so I can complete it now.