Question

I know this is kind of a broad question, but I'm new to servers. I've searched for weeks for some kind of how-to or tutorial all over the internet and even at book stores, and I still can't seem to find a good article or book that shows and explains how to make a web server, so I can push information to an iOS app that I'm working on. Does anyone know of any good books or tutorials that I can go through to get the basics of web servers for use in iOS apps? I've purchased Mac OS X Lion Server and got the web server working with my website, but I can't seem to figure out how to add a username and password to this--let alone push information from the server into the app.

If anyone has any experience using Lion Server with an iOS app, I would love to hear your two cents.

Was it helpful?

Solution

This is a very common problem but it is hard to find a good answer. My personal suggestion is it use Parse. This allows you to focus on the app development and virtually ignore the server side stuff. It also handles threading, so you can avoid that topic until you are more comfortable with development.

If you are hell bent on building your own server, take a look at this for ideas on how to get started with a RESTful service using Rails. This shows you how to make JSON and xml requests from a server.

OTHER TIPS

If you want to write your server in Ruby on Rails, you can start learning with this Rails tutorial by Michael Hartl. Then you can deploy your server for free on Heroku. Beyond being useful for your application, knowing some Rails will be great for your skill set.

On the client (iOS) side, check out RestKit, which really simplifies a lot of the client-server communication.

If you need to host files (eg. images), take a look at Amazon S3. It's free to start out, and they have an SDK for iOS.

I am using all of these myself, and they have been working very well.

I think a good approach is PHP + MySQL to handle server side data, this may be kind of tricky because it is a new programming language but it is configured out of the box on MacOSx I think.

Another alternative would be some sort of server which has out of the box restful webservices.

Have a look at Google App Engine. You can very quickly get a server up and running (in Python, which is a really easy language to learn). If you are just tinkering, it'll be completely free. And if your App is a huge success, you'll be able to scale quickly.

When you get started, you can run a "development server" version on your local machine, and then you can graduate to serving from google with just a few clicks.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top