Wednesday, December 3, 2008

iPhone app implementation

I have been trying to find the best way to implement our application on the iPhone and I have run into a few problems and a variety of different solutions. The main problem with connecting to the database server can be solved by installed an app already written for the iPhone, Mobile Can 2.0. Another option is to install an SSH client to make the connection, and there and several of those are available: iSSH, pTerm, and TouchTerm. Each of these programs are available from the App store for a fee. One large problem arises with using these is that only one application can run at a time on the iPhone unless special software is installed to allow this which requires you to "jailbreak" the iPhone in order to install this app which makes changes to a critical config file. This would not let me take advantage of this software and allow me to "listen" to the outputs of these programs in an external program.

Since this seems to not be a very viable solution, I have trying to find other methods for obtaining data remotely from our database. Another option that I have discovered is a program called phpPgAdmin which is a web based postgresql database administration tool. This would essentially make the database available for updates and modifications just by visiting a web address. This would be much easier to use in the iPhone since no other additional apps would be required to install, and updates (for example blocking a hallway) could be executed by constructing SQL queries and sending them through the iPhone's web interface to the database server. However, this would require that the database server also be a web server with PHP enabled. This means that we would have to get Scott to install the software, as well as enable Apache and PHP for CCID147.

The great thing about using the phpPgAdmin web interface is that any mobile device with access to the internet can make updates to the database, not just the iPhone. This means that any program we write for the iPhone can be ported to another mobile OS (ie. Windows Mobile 6, Android) relatively easy without having to use proprietary iPhone software.

If this is not possible there are other routes that we can take such as creating a REST API to send/receive data. This would also allow for interoperability across multiple platforms other than the iPhone.

I am awaiting an email on whether to proceed with the phpPgAdmin installation.


Iphone Programming resources

I have been tasked with creating an extension of our program to be used on the iPhone. I have looking around the web for tutorials and explanations on how to program using Cocoa Touch, Objective-C, and other tools. Here are some useful websites that I have discovered related to these topics:

CS193P - Stanford iPhone programming class lecture notes and other information
http://www.stanford.edu/class/cs193p/cgi-bin/index.php

iPhone development blog (3rdparty)
http://icodeblog.com/

Apple iPhone Dev Center
http://developer.apple.com/iphone/

Getting started video
http://www.wonderhowto.com/how-to/video/how-to-get-started-with-iphone-programming-in-cocoa-184437/