A Developer’s Tale: Using Microsoft technologies to integrate Myzone device with Genavix application

It is no secret that digital technology is slowly shaping the future of the healthcare industry. The use of fitness tracking devices has grown rapidly, the philosophy being ‘that which gets measured can be improved’. The MetaSys team has worked on integrating tracking devices with Fitness and Nutrition Applications.  This article describes one such achievement, namely integration of Myzone into our clients’ application.

Our client: Genavix is a venture in the preventive health care services industry. It offers members comprehensive health and fitness solutions to reduce health risks and improve wellness. They provide various fitness and nutrition plans helping associates follow a healthy lifestyle.

About Myzone: Myzone is an innovative wearable heart rate based system. It uses wireless and cloud technology to monitor physical activity. Myzone allows the user to view their fitness efforts live on their phone, such as how many calories they are burning. Users are also able to make connections and compete with other individuals in the network. Based on their fitness efforts, users are awarded MEPs (Myzone Effort Points), which they can use to challenge others on the platform.

We at MetaSys were given the task of integrating the Myzone system with our client’s application. Our solution used the fact that each Myzone device has a unique belt number, which is registered with a particular wellness facility. Users are able to submit their Myzone belt number, after which a unique ID is assigned to their profile. The client system can then track all Myzone activities.

One of the challenges we faced in the integration, was that the data obtained from the Myzone API is only available for the last three months. As a long term health app, our client tracks fitness for a much longer duration. To resolve this issue, we decided to import the data every night by creating a task scheduler, which imports data from the Myzone API into the application SQL tables.

Each wellness facility with registered Myzone belts has a unique API key. Using this API key and Myzone Cloudbase API – 2.0.3, a web request API call is made which retrieves Myzone API data of each user in the previous three months. The data is received in JSON (JavaScript Object Notation), is then interpreted in Asp.net and imported into the application SQL tables. The imported data is used to build a user fitness diary that integrates the Myzone data with data that has been manually entered in the application by the user. The detailed tracking of fitness, such as tracking calories is used to help every user, achieve their daily health and fitness goals.

If you wish to collaborate on similar projects, feel free to contact us. We have extensive experience in integrating devices into web applications such as ASP.NET Framework, JavaScript, jQuery, Microsoft SQL Server. For more details, please visit – https://www.metasyssoftware.com/dot-net

 

Barcode Scanning for a web based application

In this article I will share some information about a recent barcode scanning implementation we did for a web based application for one of our clients.

Barcodes are nothing more than a machine readable form of data represented in the form of lines.  Nowadays, barcodes are an essential part of inventory management for a number of reasons. Firstly, saving time both in terms of data entry, and the automatic processing of the entries. Secondly, entry errors are reduced as the barcode scanning process has a very low error rate. Finally, barcodes help companies track the product across the entire production pipeline. Even after the product is shipped out, the company can track the product throughout its entire lifecycle.

Recently, we worked on a project for a client who wished to include barcode scanning capability in a personal health tracking software application. The required functionality was that the end-user could scan various food items and store the data in the applications web portal. This would allow the user to record their daily food intake conveniently, without wasting much time entering the data.

The first step in the implementation was a data import of standard food item barcodes, which we imported from an available data library. This gave us over 200,000 records of day-to-day food items of popular brands.

Since the users don’t typically own barcode readers, we required a solution that allowed the users to scan the barcodes using their personal electronic devices. Since most people carry mobile phones with a camera, we started looking into the option of using phone cameras as barcode readers.

Since we had a web-based application, it was preferable for us to use a client-side code library or plug-in. After evaluating a few possible options, we decided to use ‘QuaggaJS’ which is a JavaScript-based advanced barcode reader. ‘QuaggaJS’ can read various types of barcodes such as EANCODE 128CODE 39EAN 8UPC-AUPC-CI2of52of5CODE 93 and CODABAR.

‘QuaggaJS’ implements the following steps:

  1. Read the image and convert it into a binary representation
  2. Find the location and rotation of barcode
  3. Decode the barcode

We wanted to allow the users to scan barcodes using their laptop as well as mobile phones. We kept specific benchmarks about camera resolutions, and if a user’s laptop or mobile camera met those benchmarks, then they could scan the barcode. We also required an alternative solution for users with older mobile phones which did not have cameras that met the benchmark. We decided to let the user choose any of three options to enter a food on the portal:

  1. Live scan: using the mobile camera to scan the barcode
  2. File upload: upload an image of the barcode on the portal
  3. Manual entry: enter the barcode numerically

After entering the barcode, the user can look up various information about the item if it is in the library. The library includes valuable information such as calories, portion sizes, and nutritional content. Our goal was to make food tracking on the application very user friendly, and using barcode scanning we managed to provide the user a very quick and easy way to track packaged foods.

Feel free to contact us if you are interested in a similar implementation for your application.

Improve Performance of Web Applications

We all know how frustrating it is to see the progress spinning wheel going on and on while navigating through a web app. It’s due to these performance issues that users lose interest in a web application, which can hinder the success of the app. Improving performance is an important task for any app developer, and there are many commercial tools available that can be useful. In this article I will share my experience and opinions on two commercially available tools; ANTS Performance Profiler and New Relic.

ANTS Profiler

ANTS Profiler can be used on any .Net application, either web based or in Windows to identify slow processes. We have found that it is useful both at the development stage, and the QA stage. Using the tool involves starting up the ANTS Profiler, and navigating through the app to view the pages with slow performance. Once the profiling is complete, we can dive deeper into the processes that the profiler identifies as slow.

To give you an idea, here are some examples of performance issues we were able to identify and address:

  1. The first step we took when analyzing a slow app using the ANTS tool, was to check the database calls. The profiling showed that certain stored procedures were taking a lot of time. The problem was addressed by rearranging joins used in the stored procedures, and selecting only those columns necessary for the output. This significantly improved the rendering time for the page.
  2. The profiling also showed that in a single page, there were multiple stored procedure calls which were increasing the database hits and slowing down the app. To overcome this problem, we combined multiple stored procedures into one, which improved the page performance.
  3. It was further identified that whilst rendering the page, multiple JavaScript and CSS files were getting loaded, making rendering very slow. The ANTS Profiling helped identify the slowest web requests. This allowed us to use the bundling concept to group files together in order to reduce the number of web requests, thereby improving the speed of rendering.

New Relic

New Relic is another commercial tool which can be used to analyze performance once an app has already been launched. It provides real-time data of user experience with the application in the production environment, which is extremely useful to optimise the process of improving application performance.

To give you an idea of how New Relic can be used, below are some insights we gained from New Relic when trying to improve a customized web application.

New Relic

  1. The data showed us that as the number of users increases, the rendering time for the page increases as well. It was able to give us a lot of insight into how CPU and memory is used by the application.
  2. The data also showed us which pages are most viewed, allowing us to focus on improving the performance of these pages. It also showed us on which pages errors were most frequently encountered, as well as the time taken for web requests and database calls on these pages. These were then fine-tuned to significantly minimize the frequency of errors.
  3. The tool gives us analytic information about the most frequently used browsers and devices used to access the web application. This information helped us focus the application implementation in order to improve the user friendliness on those browsers and devices.

Improving the app performance in terms of speed and user friendliness will improve the user experience and thereby significantly increase web traffic. Although working on application performance can be a pain, ignoring it is not advisable for any developer. The use of these tools can be very helpful at different stages: ANTS Profiler is most useful at the development environment and for QA, whereas New Relic is most useful in the production environment to analyse the user data.

MetaSys has extensive expertise in improving application performance, including the use of the different tools, some of which have been described in this article. Feel free to contact us for help with improving your application performance. For more info https://www.metasyssoftware.com/dot-net