How should I architect my iPhone app to talk to my website?

前端 未结 6 1006
面向向阳花
面向向阳花 2020-12-22 22:58

I\'m planning my first iPhone app and I\'d like to get some inputs as to how to build it, right from the start. The iPhone app is being built to be paired with a public faci

6条回答
  •  北荒
    北荒 (楼主)
    2020-12-23 00:02

    I'm currently working on an app that sounds similar to yours. I'd also suggest ASIHTTPRequest, and probably something like TouchJSON for JSON parsing, or extending/making a delegate of NSXMLParser if you want to parse XML.

    As suggested by JosephH, depending on how your app works you may want to consider alternate authentication methods: I'd take a look at something token-based like OAuth, which has ready-made libraries for people to dig in to.

    SQLite is totally viable for feed caching, although I prefer NSCoding so that you can freeze-dry your custom data structures.

    As a general suggestion, make sure to spend a lot of time thinking about every use case and corner case for connections: it's easy to assume a user will only contact the server in certain ways and at certain times, and then after you throw in multitasking/incoming calls/lock screen/memory warnings, things can get hairy without any planning.

    All in all, you seem to be on the right track, just make sure you plan out everything beforehand :)

提交回复
热议问题