iphone development - iphone

i am sapna.and we have to develop an application in an iphone having features:-
Identifies a unique user and captures profile.
Admin module / configuration module to assist user define the data points and their bound values.
Support of upto 250 data points to monitor, and monitor upto 50 on the client side
Provide tabbed interface with not more than 10 points of data grouped in a single tab / tag
Output to be generated in text and graphical form
Support iphone features of touch etc
Web service to retrieve point data from the database.
we have learnt that mac os and iphone sdk is required.now for data transfer what is reqiured ? is it API.or web services.what is reqiured.what topics ahoulkd be studied for developing this project.i am fully new to this domain.waiting for your reply.

HTTP rest requests are very easy, and can be architected as non-blocking on the client side. The iPhone has minimal support for XML and JSON is far easier (IMHO) using one of the json libraries such as those here.
You may want to use the deviceID as the unique user identifier (depends on your definition of unique I guess)
To learn iPhone programming, I can highly recommend the CS193P course available (at the moment) on iTunesU.

For web transfers, you can do HTTP REST very easily so I would architect your server side to talk very simple HTTP. There is built-in support for XML, but you will have to parse results from the server manually.
For Tab UI support, you can just look at the examples included in the SDK, it's not difficult.
For graphical output, you will want to create your own UIViews that override the draw function. You will have to learn the CoreData API in order to produce high-quality renderings.
If you are new to this, and are more familiar with C# or even Java, I highly recommend looking at the MonoTouch system.

First of all u need a Mac based system and the iPhone SDK installed. I think you are trying to make an iphone version of the web application. it will be better for you to download the MAMP(Macintosh Apache MySQL PHP) Server and install it to debug your application. its simply the mac version of WAMP and LAMP. (hope you are familiar with PHP).
You can then configure you MAMP for debugging and once the debug is complete you can host these PHP files to the actual server.
Remember, you need to get the results from the server in the XML format. and you need to write code to parse the XML you generated at the server.
Hope this information is helpful.

Related

Generating Dynamically OpenTok Session ID from iOS

I am using OpenTokSDK for iPhone (using it Natively)
I have made the code for calling but just there is one problem.:-
I have to statically Add the SessionID. But i want to generate the ID Dynamically.
How can I do this ?
Please help!
Thanks In Advance
Full disclosure: I am a developer for TokBox.
The only safe way to get session ID and token credentials to the device is by developing an application server that suits the specific needs of your app. We have a number of server-side SDKs available on GitHub (link) that will interface with the OpenTok server API to generate this data.
Note well the server-side SDK is enough to get your credentials generated, but not all devices will be on the same session, so things like user management and application workflows are all considerations that cannot be easily written to an open source library.
That said, we did try to make some of these examples more clear by writing code examples on our blog (link). You can relieve much of the overhead of writing your own application server (no doubt a daunting task, especially the first time around) by leveraging one of the third party signaling services available, like Parse and Pusher, to name two.
Wobbals is correct, and In addition to what Wabbals has mentioned, generating sessions/tokens is very simple, the sample code required for each server language (PHP, NodeJS, C#, Ruby) is located in OpenTok's Github page.
Furthermore, if you choose not to have server side code and use Parse to handle your back-end, there is a wonderful writeup about how to use Parse's cloud code module for OpenTok to generate sessions and tokens.
Good Luck!
I strongly felt that the tokbox tutorial was quite basic but had steeper learning curve. So I ended up wrote out my own app-cum-tutorial.
Though late, I felt compelled to post here:
How To write your first iPhone Video Chat App using parse and opentok(tokbox)

Advice on iPhone App needing to connect to remote MySQL

My App needs to connect to and grab data from a MySQL database sitting on a server. I've successfully interfaced with local SQLITE databases in my Apps, but this is the first time I've had to interface with a remote MySQL database.
I understand this process involves:
1) the iPhone App sending this request to the server
2) some sort of API gets executed and it does the actual "talking" to the Database on the server, and then it returns the query results as XML (or JSON.)
3) the iPhone then parses the returned information and uses it however it needs to.
What I need help with is step # 2 - the API. I don't know PHP, I don't know PERL - do I really have to learn one of these just to write an API? I thought that this iphone-to-remote-MySQL task would be so commonplace that such API's would already be out there, available freely - but I'm not really seeing anything.
I know Objective-C really well - but should I be using XML or JSON for this? Should I be learning PERL or PHP?
any tips or advice would be highly appreciated.
It's hard to give you a definite answer without knowing more precisely what you are looking at, but it sounds like your web service/API part should be quite light. In this case, it should be quite easy to write it in any language. If you know Objective-C well, it should be very easy to pick up some PHP or Ruby.
You mention PHP and Perl. The good thing I see with PHP is that it's available on any hosting service. For instance, with PHP you can make MySQL queries in a few lines of code.
Otherwise, if the web service lives on a machine that you own or if you have more flexibility, it might be easier to write something using Ruby and a small framework like Sinatra.
Regarding using XML or JSON to serialize the data, this will depend on what type of data your API returns. Generally, JSON will be much simpler and the support is good on both side:
- With Ruby, you can see how easy it is to use JSON here: http://flori.github.com/json/
- With Objective-C, you would use NSJSONSerialization available starting with iOS5.
Well you can talk to remote MySQL server using Objective C client directly from iphone
as show here

How do I create an iPhone app to take a picture and send it back to an Oracle database?

I'm trying to create a program that you can take a photo with your camera, and send it back, where it will then be attached as a field into an Oracle database. An existing app that this is similar to (if I'm not explaining it clearly enough) would be bank apps that allow you to photograph the front and back of your checks, then send them off to a different location to be processed.
From my understanding, I would need some sort of middleware and not access the database directly with the pictures taken, but I'm just trying to get the project off the ground at the moment.
So, my immediate questions are:
What sort of base project template would be the best to use for this kind of app?
What sort of code is required to send a file from one location to another? (I'm mainly used to these scenarios in .NET languages, not in xCode)
Expose an HTTP based service (and that can be written in any language and run on any platform e.g. GNU/Linux).
The app itself would be native iOS, and you can certainly consume web-services.
The server itself is just your basic CRUD system backed by a persistent store, in your case an RDBMS.
[iOS] <-----/net:HTTP/---->[server]<==/LINQ/==>[RDBMS]

How to store data client side?

I'm working on a web app using eclipse and gwt. I need to store some data. If I was building this for android, I'd use an sqlite db. But I'm making this for a Chrome Packaged App, the data needs to be stored with the client and remain there. I can't think of what to search for, does anybody have an example or tutorial or guidance? thanks
If you are allowed to use HTML5, Local storage will suit you best.
More info here and here.
GWT actually already has this.
Check it out:
http://code.google.com/webtoolkit/doc/latest/DevGuideHtml5Storage.html
You have tagged this as HTML 5 so I suggest trying localStorage?
The Chrome browser supports sqlite as well; should work more or less straight out of the box (at least it does for my apps). At least on modern Chrome releases.
Because you're building a Chrome Packaged App, you can use any storage API supported by Chrome. That includes Web Storage and Web Database, as others have already said, but also (on recent versions of Chrome, so it depends on your schedule) File API and Indexed DB.
Everything you can do in JS, you can do it in GWT.
As others have said, GWT gives you built-in access to Web Storage. The gwt-mobile-webkit project brings you Web Database. If you prefer the File API or Indexed DB, then you can use JSNI to access them from your GWT code (unless someone else already wrote a wrapper library).
If you choose the Web Database (which is just SQLite accessible from JS), you might want to set the unlimitedStorage permission.

How do I sync an offline web app (HTML+JS+CSS) with my server?

Do I need to implement my own sync methods in order to make an offline web app (html+css+js) stay up to date with changes made on the server (and viceversa)? I'm using MySQL on the server side.
I read Two-way sync between iPhone application and web application with some pointers but I think they're talking about native applications when they mention CFUUIDCreate and I wander if this is possible for the Web.
Does someone have some code to share or maybe can point me in the right direction?
Thank you!
P.S.: I hope my english is not that rusty ;)
To store static contents on the client-side, as Jethro Larson said, the Application Cache Manifest is the way to go to cache the static contents of your website (HTML, CSS, JS and images).
To handle dynamically generated contents offline, you can use javascript templates. There are several solutions for this.
To sync the two databases, there is a project called persistence.js (persistencejs.org) which is a javascript library which offers a unique API to work with WebSQL databases, Local Storage, etc. They have a plugin for this library called persistence.sync (persistencejs.org/plugin/sync) which syncs the remote database with the server's one. It consists of POST and GET requests to a specific url that you can configure (for example yourapp.dev/sync). They have an example back-end written in node.js and here is one for Rails. It's simple to understand and persistence.sync is well documented.
Look at the offline cache:
http://www.webreference.com/authoring/languages/html/HTML5-Application-Caching/
http://www.google.com/search?q=offline+cache+html5
http://www.slideshare.net/search/slideshow?q=offline+cache