iphone app

I'm looking into creating an iphone app to get data from my SQL server.  Is this possible?What safeguards can  be in place to restrict access? Thanks for your help.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
It depends on your definition of an app.  

If you make a webview, you just make an html5 website as you almost normally do.

If you make a true native app, you will will convert all data functions to a webservice and use ajax calls to to your database and oAuth.

If you want to make an app and use MS, you might want to check into using azzure http://www.windowsazure.com/en-us/develop/mobile/tutorials/get-started-ios/
mfonyAuthor Commented:
With the website, can I limit the use with .htaccess? I need to make sure the app is the only thing that can access the site.
I agree with padas however, even if you do restrict access at the server level a user can easily spoof their os/browser.  The issue this brings up is are you willing to be ok with non iPhone users ( more advanced users ), accessing the site in this fashion?  The HTML 5 solution offers a ton of advantages especially reusability and I think that's the biggest advantage IMHO.  With that being said, I would approach it by creating some restful web services that serve data out to a native iPhone application.  Why would I go the extra distance to do this?  I think that the native development offers some advantages in the context of speed and offers some more security.  Anyways the questions you need to ask yourself:  what does the app do, what users am I targeting, what level of control do I need...

Hope this helps
mfonyAuthor Commented:
Could you define?:

restful web services that serve data out to a native iPhone application.

Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
In ultra simple terms, a webservice is referring to hitting a url to manage your data functions.  You would use a webservice to create, retrieve, update and delete data (CRUD).

As example, you might have www.yourdomain.com/api/contacts/list which would list out all of your contacts.  This would be instead of using a connection string in your code to access your db as you would not be able to do this in a native app.  (you could, but it would be like adding your connection string along with password to your db to everybody's personal computer).

It is more complex however and better explained in the first article.  The 2nd compares REST with another type of webservice SOAP.


There are very good reasons to make a native app.  However, if this is new to you, I think you are better off starting with making a webview allowing your to make the app in html5 as you typically make a website.  

You can use tools like phonegap http://phonegap.com/ to help you as well.  This will make it easier for you, although for some apps, you will see some lag compared to native apps because in part of all the things that make it easy, also add layers of resources.

Another option is to use a platform like http://factory.joshfire.com/.  Warning though, there is a free tier, but the jump to paid is expensive.  It does make the entire process very easy though.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Swift Programming

From novice to tech pro — start learning today.