Some time ago I was working at a healthcare technical support organisation who's responsibility was the development and maintenance of internal and external web applications. These applications were not patient centric, but more informational and were created mainly using the Umbraco platform. I was only a contractor at this organisation and as soon as I started there it became apparent that no one was actually monitoring the health of these applications in a proactive manner. Occasionally we would get phone calls about a site performing slowly or in some cases, just not there at all. I asked as to why there was no monitoring and the answer was that they didn’t trust third party software especially from outside the network to have access to what was inside. A monitoring tool was always something they wanted, but didn’t have the resources to implement. After my stint working there I decided to create an app that could be installed within the internal network and monitor basic statistics of web sites without having to punch a hole through the firewall. So I created the first incarnation of WebUp on the Universal Windows Platform using JavaScript and HTML (well I am a web developer after all). Over time I got a bit of traction and the app worked just fine. Now 3 years down the line, I have completely rewritten it using Xamarin Forms and it is now available in both the Windows Store and Google Play Store.

screen-3

screen-4

WebUp on Windows devices


screen-1screen-2

WebUp on Android devices


Technologies

I developed it using Xamarin Forms and has a SQLite data store using the sqlite-net-pcl package from NuGet. Messaging is achieved using the MailKit package which sends notification emails via SendGrid. Underneath, it is using .Net Core 2.0 with all app logic in a shared app project and individual projects for Android and UWP.

Issues

The original version of WebUp allowed the pinging of raw IP addresses which I also wanted in this version, however the Ping functionality is not available on the UWP due to security restrictions around sandboxed applications. I am still pondering on a work around for this.

The future

I have a few ideas of where to take this app in the future, one idea is the collection of long term data so users can drill down and see the performance over time of a web application.

Happy coding

I am working on an app for the Windows Store that requires mapping functionality. As it is a Windows app, it seems logical to use Bing Maps as they also provide an SDK for apps. Currently it is at version 8, but I had a few problems implementing that version so went for version 7 with the hope to upgrade it at some point when I get more traction for the app.

Firstly you need to go to the Bing Maps Developer portal and sign in to request an API key for your project.

Click on the Create Key link and enter some details about the app. For store apps, a key type of Basic should suffice as we are not doing any enterprise level development. Choose Universal Windows app for the type and any URL you have for your in dev app (I use a placeholder page on my website where the app privacy policy etc. are going to go).

Some transactions with the Bing Maps API are billable, but you have to exceed a limit of 50,000 transactions in any 24 hour period, a listing of billable transactions can be found here. The reason I am mentioning this is in case you are offering a free app and a large number of users start to hit the service you could be liable to paying out.

image

While there have a look at the feature set for V7 with the online examples. As these are all HTML and JavaScript based samples, they are also ideal for a WinJS UWP app.

To get the SDK for V7, you need to go to the Visual Studio Marketplace and download the Bing Maps SDK for Windows 8.1 Store apps.

This will give you a VSIX to install into Visual Studio.

Open up Visual Studio and choose New Project >> JavaScript >> Windows >> Universal >> WinJS App

image

This will give you a basic template with enough functionality to test out the mapping API.

Choose the Target versions to support (Build 10586 should suffice)

image

Add a reference to the Bing Maps for JavaScript extension.

image

It will highlight a compatibility warning linking to https://go.microsoft.com/fwlink/?LinkID=309181 as it is really should be used with Windows 8.1 apps.

So now when we expand the References in our app we can see the required files for the mapping functionality we are going to build with.

I like to structure my apps, so that the main entry view (index.html and main.js) do a check on load and change the view depending on screen size/device etc. So I create a home view which has the ready, unload and updateLayout functionality. This home view is then loaded from the main entry view and inserted into a content host element.

 

We now need to add the script references and an element for the map in the home.html file:-

The CSP is important because it defines which urls are safe to load from. The div with the id webview is where our map will go.

Then in the home.js file add this

There you go, our simple map in the app.

image

There is so much more functionality that can ne added to this app such as getting the geolocation of the user and adding pushpins to different locations, but I will leave that for another post.

Happy coding.

HTTP Endpoint Monitoring for both Windows and Android
WebUp App