Tuesday, August 14, 2012

iPhone Development - RSS, XML, ASP.NET, and general managers


As soon as your boss gets an iPhone, is going to be wondering how to achieve your corporate data from the road. The good news is that you will need to obtain both a Mac and an iPhone, but then you need to make it all happen. We focused on delivering a solution quickly that was very simple and fast adjustment on the market.

To us, we have corporate statistics that our executives wanted to be able to easily see from the road, without turning on a laptop, find wireless access for our web application, go to the stats page ... you know the drill. Instead, they should be able to pull out their iPhone and press a button 'statistics'. Boom! There are statistics.

Many people are looking for the iPhone application which can gold sample mode and forget that there is back-end infrastructure required to supply data for the iPhone applicant. To get this done, you're probably already thinking of a nice web service feeding back XML. SOAP comes to mind, but the current version of the iPhone SDK is the light in support. This is where the majority of people who will receive indications for use REST. REST is cool because it is based on an applicant URL but it takes a lot of work to configure it.

Remember that part of our aim is to 'quick-to-market' so why not consider the generic HTTP handler that is in Visual Studio.

Here's what you do:

1. follow the example to build an RSS reader and get it wired into your iPhone. Follow word for word, and work great. Here's the link: http://theappleblog.com/2008/08/04/tutorial-build-a-simple-rss-reader-for-iphone
2. now in Visual Studio, add a handler general public. This will be a file. Ashx
3. SQL database, create a table that contains a username to report ID iPhone
4. modify the generic handler to take two parameters - one for the requested operation (in our case: stats) and one for the ID iPhone.
5. if they are validated respond to them with the statistics in XML using context.response
6. verify this in your browser to pass the correct parameters so you know it's working before you start trying to hit the iPhone.
7. now adjust your iPhone application to use the new URL with parameters.

Once you get the basics working:

1. create a db table that houses corporate ID iPhone user Id relationships and check as the first operation on the operator. This makes the handler extremely secure because you can not go past the front door without a valid ID iPhone. BTW, we used to get the UDID addresses to use. You must do this for ad-hoc provisioning anyway so you're doubly covered.
2. create a logging function that writes the date, time, user, iphone and function to a table
3. improve the iPhone application to allow drill-down (just another operation)

A couple of notes:

-This is scalable through the passed parameters.
-You can adjust the output level asp.net instead of the iPhone.
-This is very safe as only the iPhone will be recorded into

No comments:

Post a Comment