views:

29

answers:

1

Dear All,

I am new to iPhone programming and would like to be able to use the BLAST (is a bioinformatics server) URL's API from the iPhone. I would like to write a very simple application that queries the BLAST server and make some query. I have found the following I have found the following documentation on BLAST (http://www.ncbi.nlm.nih.gov/BLAST/Doc/urlapi.pdf).

I am not sure from where I should start.. I checked out the following on security concepts for Mac OS X and iOS(http://developer.apple.com/iphone/library/documentation/Security/Conceptual/Security_Overview/Concepts/Concepts.html) and then found CFNetwork library (http://developer.apple.com/iphone/library/documentation/Networking/Conceptual/CFNetwork/Introduction/Introduction.html).

But I don't really know from where to start..

theoretically I would like to query the BLAST url API from a .mm class method (so I can use standard C) and then show the results in a normal view.

Anyone would be able to guide me in these first steps?

Best regards and Many thanks!

A: 

The BLAST API is strange. It is a POST-only command-response API, but the commands you POST are things like CMD=Get&..., CMD=Put&..., etc.

The iPhone SDK provides a fairly convenient high level way to invoke URLs. Have a good read of the NSURLRequest documentation. You'll need to set the HTTPMethod property to POST, and populate the HTTPBody with whatever the BLAST API tells you to post.

Marcelo Cantos
Thanks I will now have a look.. I am not very familiar with the BLAST commands but I will try to catch up with the documentation. I will aim to write a small application requesting some GENE info from BLAST. Another step would be to add some user interface and display the gene info. The next big step would be to write a mini iPhone app to handle the different jobs sent to BLASTA (like being able to quit one or monitor when the job is finished). Any other better step-idea?