Yii and PHP Frameworks

For a recent project of mine, I had to setup a fully functional web application as fast as possible. This meant that development had to be as automated and flexible as possible. For this solution, I chose a PHP framework called Yii. Within several hours, I was able to read through several chapters of documentation, setup and install an instance of my web application in my Linux Ubuntu machine. Not only does Yii help with installation, but configuring mysql tables, database wrappers, front-end user interfaces was basically a snap. The command line utilities were a huge time saver. 

PHP still is and has been for a long time, the programming language of the masses. I still remember a large corporation I worked for that dropped .NET for PHP simply because it was cheaper. Lately, there have been a set of fast, object oriented frameworks such as Phalcon. Today, I no longer develop for PHP. My days of hacking together WordPress themes and scriptlets are through. I’m sure I could make a decent living off enterprise PHP with Zend or Drupal, however, something about PHP still bothers me. I feel that Microsoft is advancing the C# language and tools a lot quicker. Even Java is gaining traction with the upcoming release of Java 8. C# and Java are still my favorite languages. I will always consider PHP to be more of an amateur scripting language.


Querying XML Attributes

I’ve been taking XML drills through Inner Working’s online certification. New ways of handling XML data have made it easier than ever. However, there are some pitfalls when querying XML. Below is an example. If you want to get and “ID” attribute from a document element, here is what you might do:

string documentID;
//Correct: Referencing the "Document Element" variable
documentID = xmldoc.DocumentElement.Attributes["id"].InnerXml;
//Correct: Selecting the "Document" node"
documentID = xmldoc.SelectSingleNode("document").Attributes["id"].InnerXml;
//Wrong: Selecting the "Document" node"
documentID = xmldoc.DocumentElement.SelectSingleNode("document").Attributes["id"].InnerXml;

Publishing an Android Game

Asterdroids was one of my first Android games that I published to the Android Marketplace. It took about a month to pull it off. It was the first time I had to use Java to program. To be candid, it was hard. The biggest difference from programming games in Windows to mobile game development was figuring out how to efficiently manage the game loop thread. In the end, it was a fun learning experience.