demo-mobtv

MobTV is a mobile application showing how Convertigo can port an existing Web application to smartphones using Local Cache. The goal of MobTV application is to display the French TV listings for the current evening.

MobTV mobile application is developped through a Convertigo Mobile project, based on the Convertigo Templating Framework (CTF), jQuery Mobile and PhoneGap/Cordova.   It demonstrates several features of Convertigo Mobility Platform:
  • Convertigo HTML connector is used to access a TV listing website and extract data from its pages,
  • Convertigo Sequences are developed to filter extracted data and propose a dedicated web service to the mobile application,
  • Convertigo Server cache system saves information for each request in order to save execution time after a first access to the server,
  • Convertigo Templating Framework (CTF) creates the dynamic mobile application user interface with few lines of code,
  • Convertigo Local Cache stores locally on the device the Server responses.
 

Deep dive into the details

The Convertigo project extracts information from this public web site: http://www.programme-tv.net. It uses the HTML connector to parse the HTML, capture relevant information from the pages and generates an XML result out of them.   Then, a mobile-dedicated API is built using Sequences, data filtering and orchestration perfomed by the steps. Two methods are developed: one getting the whole night overview and one getting the details of one show.   Then, the mobile application is developed using the CTF and jQuery Mobile frameworks to call the sequences and display touch based user interface. Finally, PhoneGap turns this HTML5 coded application to a full native “appstorable” mobile application.  

Server Caching

The Convertigo Mobility Platform Server cache system is activated on the sequences of this project, configured to one day-long validity. This is a multi-user cache, meaning the data is stored in common for all clients connected to the Convertigo server.   After one execution, the response data is stored server-side. When the same request is received, the Server directly gets the data from the cache, it does not reconnect to the website each time the data is requested by a client.   As a consequence, the first user connecting to MobTV can experiment a slow session while the data is dynamically retrieved from the website. But all subsequent connections of all users the same day will be much faster as the data is stored in the Convertigo server and directly reused.  

Client Caching

The client Local Cache is activated through the mobile application code. After one execution, it stores the response data locally on the device. When the same request is issued by the application in the next hour, on the same device, the response is retreived directly from the local memory of the device. This functionality saves network traffic between the device and the server, needing only one connection by hour for the sequence retrieving the full TV listing, and one connection by hour by show for the sequence searching for a show details. The application is then able to display data when the device is not connected to the network.