Flax Engine: GWT Asynchronous HTTP communication with PHP back-end
Well here is the first of our successful modular time-boxed tasks which I spoke about earlier this week in Flax HTML5 Game Engine Development Diary Part 6. Earlier this week after I had fixed up a few bugs I committed a completely working build of the Flax Engine. So I uploaded it to a live server to make sure everything was working fine. Unfortantaly this was not the case the GWT RPC wasn’t working and to cut a long story short we realized that the File-handle modulehad never been properly tested on a live server for some strange reason again in an Aglie approach we would of identified the RPC as a high-risk requirement in the beginning of the project and would have developed and tested the code extensively. Mistake are there to be made, we learn from them.
Google Web Toolkit RPC
- Reading of JSON maps files to be loaded into the engine
- Writting JSON map files to the server in the case of the Flax Engine editor Weave etc
Google Web Toolkit Asynchronous HTTP
So with those requirements in mind we modified the file-handle system to use GWT Asynchronous HTTP requests. So that JSON map files could read and loaded into the engine without the need for any servelets. For some apps like the Flax Engine editor Weave we need to be able to write JSON map files to the server so I wrote a PHP backend script to handle this.
Code size: The GWT Asynchronous HTTP code is significantly smaller then the GWT RPC.
Experience: PHP was my first language to learn and used it to build many apps over the years so I can in future expand on the functionality of the PHP backend.