Links

Web-Services recapitulate

Now days most of the apps are using WebServices and the good thing is we all know what it is :)

Just adding some notes from my side on things like SOAP, REST and ......., and what? is there anything else do we have in the name of WebService.. really?

Few days ago, a guy who have experience of more then a decade came to me and told me to integrate WebService in an app. I simply asked for WebService summary which I think an usual question while we start working on something. He said to take the reference from an existing website which he pretended that using the same. First I did't get what he wanted to tell but, his steps just gave me heart attack. He just went to Chrome, opened the Website, right clicked for the Inspect element option and while logging in to that website he monitored the Network and said look here is the WebServices just replicate it in your app. After his statement I thought is it worth to ask something anymore?




Okey, letz do a quick recap on what we know:

  1. Charles, Yet simplest tool to monitor a WebService request from an iOS and Mac environment
  2. Each and every resource request to an URI is not a WebService.
  3. One is SOAP and the rest is REST, why do extensive debate
  4. SOAP is XML based definitive object access WebService protocol made for rich guys :)
  5. OAUTH is a two tear authorization framework, ie 

iOS + WS 
  1. Avoid using 3rd party wrappers like ASIHTTP for networking without exploring them
  2. NSURLRequest + NSURLConnection are not an evil
  3. Use event driven APIs
  4. Reachability is our friend
  5. Don't put sync requests on main thread
  6. Your app UI should reflect network reality 
  7. Be prepared for speed latency and packet loss
  8. Be prepared for no network and host not reachable conditions
  9. Always code for insecure connection, use end to end security 
  10. Minimize use of network connections, keep in mind that we also have push notifications 

PHP + WS
  1. Always think above $_POST, $_GET, $_REQUEST, $_FILE they are just to help you 
  2. Use and read headers generously
  3. php://input thats what you need 
  4. Don't forget your buddy "MIME types"
  5. Be prepared for Trojan and Injunction
  6. PHP is more related to network, explore its low level possibilities
  7. Take authorization and content distribution seriously

JS + WS
  1. Don't misuse client network and resources :|
  2. Just enjoy with JSON, sometime XML and leave it all for server side :)