Buoyed on by the new App Builder reward program in the UK, combined with my attempts to loose weight (some little success with the 5:2 so far) I have developed a new App using the YouTube API to show a selection of feedback from users of popular diet programs.
One of the things encouraged by this new program is the use of Azure Mobile Services. Great! thought I, I have been keen to have another look at Azure for some time so this looks like the perfect opportunity.
I was surprised and encouraged by how easy it was to make use of Mobile Services and managed to incorporate some logging into the App that I felt would be useful further down the line.
With a view to adding a future feature to the app I wanted to log favourites that were highlighted by users within the App (I may add an extra panorama item that shows the 10 most popular favourites for the App at some time in the future).
I was surprised how easily I was able to achieve my aim. I simply had to add the following script to the insert statement for the logging table:
This simultaneously created the new column and inserted a new date time value. The operation->insert option offers similar functionality to a standard SQL server insert trigger (although the syntax is c# rather than T-SQL)
(Ordinarily this flag should be set to false when the App is submitted. In reality I still have this flag set to true as the App has not yet been published in the store).
Now when I add a video to my favourites within my client App (as shown on the left, above). A record is created in my back end table within Azure:
How easy was that?
You can download ‘Which Diet’ for free here once it passes certification (trial version is ad-enabled with nag screen)