Monday, October 6, 2014

Extracting useful data from HTML pages with XQuery

When building in-house solutions or mobile enterprise applications, you are often faced with having to deal with legacy systems and data. In some ancient systems, the data might only be available as CSV files, in other cases it might be arcane fixed-length text reporting formats, but if the legacy system is less than 20 years old, chances are pretty good that someone built and HTML front-end and so the data is available through a browser interface that renders it in some poorly formatted HTML code that loosely follows the standard. And very likely you will find the data intermixed with formatting and other information, so extracting the useful data is usually not as easy as it sounds.

In addition, when you are building mobile solutions, you may sometimes need some government data that is not yet available in XML or another structured format, so you again are faced with having to extract that information from HTML pages.

Common approaches to extracting data from HTML pages, such as screen-scraping and tagging are cumbersome to implement and very susceptible to changes in the underlying HTML.

In this video demo I want to show you a better way of extracting useful and reusable data from HTML pages. In less than 15 minutes we will build a mobile solution that - as an example - takes Consumer Price Index data from the US Bureau of Labor Statistics, parses and normalizes the HTML page, and then uses an XQuery expression to build nicely structured XML data from the HTML table that can then be reused to build a CPI chart. I will walk you through the creation of the XQuery expression step-by-step so that you can easily apply this method to similar problems of HTML data extraction:

As you can see in the above video, it was fairly easy to create nicely structured XML data from a table in the HTML page and to create a first simple chart that plots the CPI data over time.

But the true power of this approach is that you have much more flexible charting capabilities in MobileTogether and the XML data is now reusable, so you can calculate annual inflation rates directly from the underlying CPI data and plot it as well.

Sunday, October 5, 2014

moto 360 Review

A while ago I wrote about my somewhat disappointing experience with the original Galaxy Gear, Fitbit, and Google Glass in an article "The (Broken) Promise of Wearables". It seems that I may have to revise my opinion a bit based on the new moto 360 smart watch:

First of all, I will admit that I'm a huge watch aficionado and have a collection of several beautiful mechanical timepieces and complications, as well as functional sport watches. So the Galaxy Gear  just hurts from a design perspective - both in its original form as well as the Gear 2 and the new Gear S. I have also been less than impressed by the new Apple Watch. Despite all the claims by others that it is beautiful, in my eyes it has the same flaw as the Galaxy Gear: the watch is square. Most display screens are rectangular, so they just built a watch around a square or rectangular screen.

However, there is a reason that the majority of watches have evolved with a circular dial. It is the most comfortable to wear, because it doesn't limit the movement of your wrist. And it has a timeless elegance to it.

Wednesday, October 1, 2014

Building a stand-alone mobile solution with MobileTogether

In a recent blog post I introduced our new MobileTogether platform for building mobile in-house solutions. Today I would like to give you a little demonstration of how easy it is to build a mobile solution with MobileTogether Designer.

As an example, we're going to build a simple tip calculator app for your next restaurant visit. Since this particular solution doesn't need any back-end data, we're going to create it as a stand-alone mobile solution so that it can be used even without a server connection once it is deployed.

As you can see, it just took about 8 minutes to build this app. MobileTogether lets you focus on what is really important, and handles everything else for you. If you want to try for yourself, you can download MobileTogether Designer here.

You can also watch more MobileTogether Designer video demos here.