Chapter 2-Wordpress and Google Apps APIs Came to My Rescue
This is the second article in a series about my learning curve in building an online business simulation model in WordPress. Check here if you didn’t catch the first article. The setup was an assignment to bail out a distressed project for the Department of Defense (Air Force specifically). I got the project through a consultancy attached to The University of Tennessee in Knoxville.
They had been using the services of one of the business school faculty to code a new online simulation game to teach DoD personnel how to improve the process of managing asset acquisition projects (fighter jets specifically). The atmosphere was one of intense scrutiny by the taxpaying public and the Pentagon over a history of gruesome cost overruns, so there was considerable pressure for an effective training tool. The developer/professor had a brilliant reputation as an original developer of a very popular B-school management simulation game called “Marketplace”, used by several universities. He also had ninja level PHP coding skills. He was coding the entire process from scratch using MySQL and PHP, with no apparent use of a foundational CMS platform. The code base became a textbook case of “spaghetti code”. While the developer was quite skilled, the time pressures were simply too intense for him to do code documentation and commenting.
It became a classic instance of a “single point of failure”. Tragically, this valued professor/developer suddenly died at his desk one day. Now what??!! The project team panicked. I was offered an opportunity to take up the baton and continue the website development. Against my gut instincts, I said with a perfectly straight face, “OK, I can do that”. There was no way I nor any other mere mortal developer could figure out what the developer’s code base was doing; I tried but that was going nowhere. But I had an ace up my sleeve.
Regarding the basic website structure of page content, site navigation, styling, and all the other built-in goodies in a CMS, I knew that WordPress would provide a quick way to do all the heavy lifting for at least that portion of the simulation. Secondly, I recognized that the fundamental process of the simulation model was one best suited for a spreadsheet environment. The idea was that team players would experiment with alternative management tactics and decisions in managing the contract for the aircraft acquisition process. Those decisions were captured in a series of input screens, and those decisions then rippled throughout a very complex, convoluted network of effects on other stages of the process.
The team players then evaluated the efficacy of their experimental decisions on the overall financial and operational success of the program. This was a classic spreadsheet situation if I ever saw one, but the original developer was coding all of those complex interactions via raw PHP code and MySQL calls.
My second ace-up-my-sleeve was that I knew I could capture the complex interactive simulation logic in a parallel online spreadsheet like Google Sheets. While Microsoft is moving slowly in this interactivity direction, Google had move further down the road in providing programmatic interactivity with its spreadsheet tool, so I followed that direction. I was vaguely aware that Google had developer APIs to interact with their tools, but early on, I had no idea how tightly integrated I could make it within the context of a WordPress website.
An unsatisfying scenario would have been to have a typically polished WordPress website for the participants to read instructions and follow the assignment process, and then devolve to a parallel multi-sheet Google spreadsheet, open in a separate window to do inputs and evaluate results. That would in a rudimentary way, satisfy the basic requirements for the simulation, and at least get us out of the immediate problem. But needless to say, it would have been a very unprofessional and less than seamless interactive process.
My best case scenario would be to have an embedded, non-branded input form or table inside the appropriate pages within the website, and a series of data visualizations, tables, icons, etc., in the simulation “results” pages. After a considerable research process, I found some effective ways to do precisely those things. Ideally, team participants wouldn’t even be able to recognize that they were interacting with a background spreadsheet at all. They would only see that their decisions impacted results in appropriate ways, and all of that would be seamlessly contained within the context of a polished, professional website.
ROLE-BASED SIMULATION PROCESS
One more key requirement of the simulation process… The team participants all fell into specialized roles in the simulation, comparable to their real-world job descriptions. This meant that some individuals could see and interact with certain decisions (pages) in the process and not others, depending on their roles. Others could see and interact with all of them. WordPress’ role & capability management features satisfied that need perfectly. I used Justin Tadlock’s well-established Members plugin to allow me to manage selective role-based page access throughout the site.
In subsequent articles on this saga, I’ll drill down into the details of how I implemented specific site interaction with the background Google spreadsheets and how I utilized their charts & graphs tools.