9 More Crazy, Experimental PHP Development Projects, Page 2
6. Objective-PHP and Moka
Objective-PHP and Moka are two ambitious projects headed by Stephen Lerodiaconou. They add Objective-C language and Cocoa framework features to the PHP language, respectively. The project documentation states these features could make PHP attractive to Capucchino developers seeking a language that complements their existing skills.
You can watch an impressive video tutorial in which Stephen demonstrates the capabilities of these projects.
Want to use your favorite programming language to interact with an Arduino, ham radio, or video camera? Believe it or not it's possible using the php-serial class. When installed, this class makes it dead simple to communicate with a port simply by calling the
deviceSet() function, passing the serial port name you'd like to use, and then using simple read and write methods as desired. For example:
$serial->sendMessage('Sending a message to the port!');
PHP seems to be increasingly popular within projects involving serial communication. For instance, check out this pretty amazing project involving arduinos, LCD screens, the XBee, and PHP.
As of iOS version 3.0 you can send push notifications to an iOS-powered device such as an iPhone or iPad. This feature has since become commonplace within countless applications, serving to keep the user abreast of weather alerts and news updates, or to let the user know it is his turn to make a chess move. These notifications are sent from the application developer's server, communicating with the Apple Push Notification Service (APNS) to send the messages.
You can use Apns-PHP to send these notifications via a PHP script, meaning it would be trivial to send users notifications in conjunction with blog updates, recent Tweets, or any other event that could be monitored by PHP or retrieved from a database. The Apns-PHP documentation indicates that implementation of the APNS API was completed on December 17, 2010, offering support for custom notification images and a localized action button, among other features.
A great tutorial highlighting Apns-PHP's use in a real-world application can be found here.
Continuing with the Apple theme, the Cocoa framework uses the property list to manage serialized data. These property lists can be managed using proprietary Apple utilities such as plutil. However, developers may wish to use other means to manage this data. As such, numerous open source projects have been created for this purpose. One such project is CFPropertyList, which allows PHP developers to create property lists which can then be sent to an iPhone application.
About the Author
Jason Gilmore is the founder of the publishing, training and consulting firm WJGilmore.com. He also is the author of several popular books, including "Easy PHP Websites with the Zend Framework", "Easy PayPal with PHP", and "Beginning PHP and MySQL, Fourth Edition". Follow him on Twitter at @wjgilmore.