Home > Articles

  • Print
  • + Share This
Like this article? We recommend

How the Data Is Gathered

Now we have our bases covered for the interface display, but how do we manage to show all the current data from all those games at the right time? Let's review the constraints for this problem: no binary downloads; fast, reliable data transfer; minimal interface changes upon update; and no change to the interface if there are no updates.

Depending on your past experience, this might sound somewhere between fairly trivial and absolutely impossible. I assure you that it is actually somewhere in between. The only requirement at this point is to have a hidden frame and a couple of JavaScript functions in the frameset.

As discussed in the previous article in this series, requests to the ASP take the following form:

http://[url]/clientUpdate.asp?gameid=1234&gameid=2345&gameid=3456

The ASP retrieves the records associated with each game_id and formats the data in a JavaScript-readable format. When the response is written, the HTML automatically calls a frameset function, as follows:

<script language="javascript">
       [data]

       parent.getNewData();
</script>

Many mechanisms are possible, but all this function call truly needs to do is notify the client that new data is available. If nothing has changed since the last update, the client doesn't need to do anything. If new data is available, the values contained within the table are updated by grabbing the data from the hidden frame and transferring it to the visible frame.

It is through this method that an API of sorts has been created. Of course, it would be possible—and illegal—to deconstruct the way in which data is being passed. Such is the nature of the beast. By allowing partner sites to pay for such access, those sites would be able to not only provide a look-and-feel skin alteration, but they also would be able to simply drop the client data onto any Web page in a custom format.

The possibilities for new and unforeseen features extend from there, and the creation of markets that revolve around your product is a known route to a successful business.

  • + Share This
  • 🔖 Save To Your Account