Tips_tutorials   >   Studiojs202   >   Introduction
Welcome to the
tutorial.At the time of writing this tutorial I had not been monitoring my web apps to find out when and how often they were being used. When you create a web app it's nice to get some usage statistics, for yourself, and for your client.
In this tutorial we will delve into the area of monitoring and recording web app usage. It will be a learning experience for both of us!
You will also learn about sending emails from Omnis Studio and using timer objects.
This tutorial is provided to only. If you are not currently a please go to www.studiotips.net and click the link provided for becoming a StudioTips Member. The cost of membership is minimal and helps to cover the time and expense of creating these tutorials and maintaining the studiotips.net website.If you use the Omnis Studio
to create a remote task in one of the steps is asks if you want to inherit from a Monitor Task. If you select the checkbox it creates a web monitor task and window. Let's give this a try and then look at what the Omnis Studio creates for us.The code in the rtWizard_Monitor is what we need to study to figure out how web app monitoring works.
There are 3 methods:
The wMonitor window is keeping track of the following stats:
The wMonitor window has a tasks list which displays each remote task that has been instantiated, the IP address which made the request, time connected, last response, time disconnected.
The wMonitor window has quite a few methods which you can study. We are not going to review the wMonitor window code in this tutorial. Feel free to study it on your own.
The problem I have with the web monitor created by the Omnis Studio
Many web apps run remotely on a headless server, so it would make sense to create a non-visual object class which handles the web monitoring functions. is that it is a visual monitor. The code is inside a window class which must be instantiated for any monitoring to occur. If the window is closed, the monitoring ceases. The usage statistics are stored in memory, so when you close the window, the stats are lost.