Life Update and Gamer Footprint Update

7. August 2014 09:03 by Cameron in   //  Tags: , , , , , , , ,   //   Comments

Hey guys, I know it's been a while since I've written a blog post. I've been busy with wedding planning and other life events! I'm still alive and kicking!

Gamer Footprint (GFP) continues development in the spare time that I have. It's making slow but sure progress. I've moved Gamer Footprint to use a single page application (SPA) approach. The previous iterations of GFP were based on strict ASP.NET MVC, but as of late, I've been on a single page application kick. :) The advantages to SPAs are excellent over traditional multi-page applications. With SPAs, you can load your application shell and then load/post content on demand. This gives a perceived faster and more responsive application. 

With GFP, I've been playing around with Web API 2 and Durandal. Web API 2 is Microsoft's take on RESTful API development. It's very robust and supports all types of HTTP calls as defined by the REST design principles. By using Durandal, I can use RequireJS, Knockout.js, and jQuery to build rich single page applications. This proves to be a good choice for the development of GFP because I already have experience in RequireJS, Knockout, and jQuery. If I had chosen to use AngularJS, it would have required to learn a completely new framework. While some might not worry about that, I've already been using Knockout in some projects at my day job, so naturally, it made sense to learn Durandal.

XBox Live Data

20. September 2011 14:32 by Cameron in Programming, Xbox Live  //  Tags: , , , , , , , , , , ,   //   Comments

While my gaming social networking site, IGA: International Gamers' Alliance, is still under beta, I have been looking at ways to provide a more rich experience for my users. Lately I've been working on a way to gather data from XBox Live so that I can provide content to my users on IGA. I used to have a way to gather data from a RESTful API, using the official XBox Live API, that Microsoft employee, Duncan Mckenzie, used to host on his website. However, his service is no longer available. While there is an official XBox Live API, access to this API is restricted to those who are in the XBox Community Developer Program. Acceptance into this the XBCDP is very limited at the moment and it seems that only well known companies with sponsors receive membership into the program. 

While it would be very nice to get official access to the XBox Live API, it may be a while until I can get into the program. My social networking site, IGA, is still in beta and has much to be done on the roadmap to completion. Currently I am the only developer for the project and I am also in school so development is slow. Maybe once IGA is closer to completion, Microsoft will be more eager to accept me into the program. In the meantime, I have a solution for gathering data from XBox Live.

There are a couple of places to get data from XBox Live. There is the publicly available user's gamercard and the user's protected XBox.com profile. Getting data from the public gamercard is very easy. One could write a parser in PHP, C#, or even jQuery to get the different values from the HTML elements on the page. Retrieving data from a user's XBox.com profile requires a little more skill and resources. You cannot simply use cURL to remotely login to XBox.com since it has anti-bot mechanisms in place to check against the browser agent, browser cookies, and many other aspects that can't easily be manipulated with cURL. There is a remedy to this problem however.

This past summer, I learned about a headless webkit browser called PhantomJS from some co-workers while working on a project at work. We needed something that could run without a GUI on a server that could manipulate the DOM of a webpage. PhantomJS gave us exactly what we needed. After working on the project at work, it occurred to me that I could use PhantomJS in addition to jQuery to manipulate the DOM and screen scrape data from XBox.com.

I'm currently working on scripts to pull data from users' profiles including the users' games, the achievements earned in each game, and more information not publicly available on users' gamercards. Please understand though that screen scraping should only be done on a last resort and it is taxing on both ends to make numerous requests per day. I will implement some sort of data caching that will pull new data on a schedule to limit bandwidth usage. I plan to release this code to my Git hosting when it is finished. 

Month List

Tag cloud