Internet services in iphone Apps. Ole Gammelgaard Poulsen



Similar documents
ios Cloud Development FOR Neal Goldstein WILEY John Wiley & Sons, Inc.

Mobility Information Series

ITP 342 Mobile App Dev

Leveraging Cloud Storage Through Mobile Applications Using Mezeo Cloud Storage Platform REST API. John Eastman Mezeo

REST web services. Representational State Transfer Author: Nemanja Kojic

USLRSWNU ios Developer

ITP 140 Mobile Technologies. Mobile Topics

Mobile Application Development

Client-Side Web Programming (Part 2) Robert M. Dondero, Ph.D. Princeton University

Building HTML5 and hybrid mobile apps using cloud services. Andrei Glazunov

Web Service Testing. SOAP-based Web Services. Software Quality Assurance Telerik Software Academy

XML Processing and Web Services. Chapter 17

2013 Ruby on Rails Exploits. CS 558 Allan Wirth

Fast Infoset & Fast Web Services. Paul Sandoz Staff Engineer Sun Microsystems

Implementing Mobile Thin client Architecture For Enterprise Application

TDAQ Analytics Dashboard

Practical Essbase Web Services

Building native mobile apps for Digital Factory

Data storage and retrieval in ios

Application Development for Mobile and Ubiquitous Computing

WEB SERVICES TEST AUTOMATION

Getting Started Guide for Developing tibbr Apps

Introduction to BlackBerry Development using Java ME. Presented by: Sean Fenton Technical Channel Manager RIM (Research in Motion )

Develop native android apps And port to other platforms

Smartphone Enterprise Application Integration

4 Understanding. Web Applications IN THIS CHAPTER. 4.1 Understand Web page development. 4.2 Understand Microsoft ASP.NET Web application development

Mobile App Framework For any Website

THE NEW DIGITAL EXPERIENCE

Beyond The Web Drupal Meets The Desktop (And Mobile) Justin Miller Code Sorcery Workshop, LLC

WEB SERVICES FOR MOBILE COMPUTING

Smart and Innovative Web Solutions. Just One Click Away

Syllabus INFO-UB Design and Development of Web and Mobile Applications (Especially for Start Ups)

CARRIOTS TECHNICAL PRESENTATION

Jenkins XML API and Mobile Devices

ios Application Development &

THE ENTERPRISE INTERNET OF THINGS PLATFORM 2015 FEATURES GUIDE

MA-WA1920: Enterprise iphone and ipad Programming

1 2DB Introduction

Testing the API behind a mobile app. Tutorial Marc van t Veer

PressRelease For Immediate Release

HackPra. Burp Pro: Real-life tips & tricks

NoSQL and Agility. Why Document and Graph Stores Rock November 12th, 2015 COPYRIGHT 2015 MARKLOGIC CORPORATION. ALL RIGHTS RESERVED

The Most Important SEO Initiatives in 2016

How to Create an App For millions of people, there isn t an app for that By Scott Hirsch Founder appsbar.com

Full version is >>> HERE <<<

ITP 342 Mobile App Development. APIs

Ole Lensmar CTO SmartBear Software PAST, PRESENT AND FUTURE OF APIS FOR MOBILE AND WEB APPS

Understanding Evolution's Architecture A Technical Overview

SOA, case Google. Faculty of technology management Information Technology Service Oriented Communications CT30A8901.

Get More Hits to Your Website

Mobile Game and App Development the Easy Way

Pro<DOC/> e-commerce Technology An Introduction

MOBILE APPLICATIONS AND CLOUD COMPUTING. Roberto Beraldi

The Best Mobile App Development Platform. Period.

Technical Limitations for Designing Applications for Social Media

Flash and Python. Dynamic Object oriented Rapid development. Flash and Python. Dave Thompson

Performance Analysis and Design of a Mobile Web Services on Cloud Servers

Enhanced Mobile Cloud Computing Platform

apiomat Enterprise Mobile Enterprise Application Platform the Next Generation

KonyOne Server Prerequisites _ MS SQL Server

Programming IoT Gateways With macchina.io

KEYSTONE - Short scientific report for STSM visit in TU Delft

Syllabus INFO-GB Design and Development of Web and Mobile Applications (Especially for Start Ups)

Value Added Services (VAS) - Mobile Applications Business Cases

Cloud to Cloud Integrations with Force.com. Sandeep Bhanot Developer

THE NEW DIGITAL EXPERIENCE

Jordan Jozwiak November 13, 2011

Abstract. Description

GUI and Web Programming

Joseph M Conaty Software Engineer

RESTful or RESTless Current State of Today's Top Web APIs

Following statistics will show you the importance of mobile applications in this smart era,

Proposal for DSpace Web MVC

Gabriel Iuga. London, United Kingdom Tel: ; Website:

Fuze for personal computers... 7 Fuze for mobile devices... 7 ios... 7 Android... 7

Google Cloud Data Platform & Services. Gregor Hohpe

Web Frameworks. web development done right. Course of Web Technologies A.A. 2010/2011 Valerio Maggio, PhD Student Prof.

Foglight Application Performance Monitoring SaaS Edition Mobile App Developer Guide for ios Platforms

CHAPTER 24 Communicating with the Web

Splunk for.net Developers

10 Ways To Use Social Media To Build Your List

GENERAL OVERVIEW OF VARIOUS SSO SYSTEMS: ACTIVE DIRECTORY, GOOGLE & FACEBOOK

REST services in Domino - Domino Access Services

ipad, a revolutionary device - Apple

Modern Web Development From Angle Brackets to Web Sockets

Developing Secure Mobile Apps

Introduction to the. Barracuda Embedded Web-Server

Technology Services...Ahead of Times. Enterprise Application on ipad

Introduction to Web services for RPG developers

Types of Cloud Computing

NetDania. Platforms and Services by. NetStation The flexible and feature-rich cloud trading platform

ISM/ISC Middleware Module

Multi agent systems as web service providers

Social Application Guide

SOFTWARE ENGINEERING PROGRAM

Securing ios Applications. Dr. Bruce Sams, OPTIMAbit GmbH

I) Add support for OAuth in CAS server

Easy CramBible Lab DEMO ONLY VERSION Test284,IBM WbS.DataPower SOA Appliances, Firmware V3.6.0

Deploy. Friction-free self-service BI solutions for everyone Scalable analytics on a modern architecture

Mobile Apps, E-commerce, Mighty Push App

Transcription:

Internet services in iphone Apps Ole Gammelgaard Poulsen

GeekNight Program My experiences with the iphone, the App Store and my apps. URL requests and fetching data asynchronously. Parsing XML and JSON. Interacting with SOAP web services. Using 3rd party API's. Twitter, Youtube. No API? Scrape! Building a scaleable backend. Questions? Show & Tell opportunity.

About Me M.Sc. EE from DTU in 2 weeks. Now finishing my thesis on error-correcting codes for 100 Gbit/s optical transport networks. Freelance iphone developer 1+ year. Co-Founder of Shape Aps. Developing iphone/ipad applications.

Toginfo

Expenditure expenditureapp.com

DK App Store Hit lists are everything. One year ago the #1 selling app would have ~100 sales per day. Now it will sell 300-450 copies per day. My #1 best selling apps: Toginfo Pro Rejseinfo CPH Flights Radioen (My brother's app)

Fetching Data the Right Way NEVER block the main thread when loading internet data. Use NSURLConnection and its delegate protocol. Consider using a wrapper like EGOHTTPRequest (from enormego on github)

Processing Data Many good libraries for processing various data formats. TouchJSON & TouchXML are simple and fast parsers available at http://code.google.com/p/touchcode/ JSON is generally preferred over XML because of the smaller overhead.

3rd party SDKs Some popular services even have iphone SDKs for their APIs. No need to manually handle HTTP requests and process data. Youtube, Facebook, GeoAPI. Twitter: use e.g. MGTwitterEngine

SOAP webservices No built-in support. Manually create HTTP POST requests. Parse response with e.g. TouchXML. Alternatively use wsdl2objc to generate Obj-C classes from a wsdl schema. http://code.google.com/p/wsdl2objc/

SOAP Example NSString *servicename = @"mydemoservice", *actionname = @"sayhelloworld"; NSString *soapreqbody = @"<soap:envelope><soap:header>..."; NSURL *url = [NSURL URLWithString:[NSString stringwithformat: @"https:// www.myserver.com/service/%@", servicename]]; NSMutableURLRequest* request = [NSMutableURLRequest requestwithurl:url]; [request addvalue:@"text/xml; charset=utf-8" forhttpheaderfield:@"content-type"]; [request addvalue:actionname forhttpheaderfield:@"soapaction"]; [request sethttpmethod:@"post"]; [request sethttpbody:[soapreqbody datausingencoding: NSUTF8StringEncoding]]; NSURLConnection *con=[[nsurlconnection alloc] initwithrequest:request delegate:self];

No API? Scrape! NSScanner class is very useful for extracting data from semi-structured data. From SDK version 3.2 Regular Expressions can be used. Don't use HTML comments for finding data! Telia's EDGE gateway will process HTML and remove comments to save bandwidth.

NSScanner Example Get temperature in Kastrup from dmi.dk/dmi/danmark/regionaludsigten/kbhnsj.htm NSScanner *scanner = [[NSScanner alloc] initwithstring:str]; @try {!! [scanner scanuptostring:@"<td>temperatur</ td><td>luftfugtighed</td>" intostring:nil];!! [scanner scanuptostring:@"<td>kastrup</td>" intostring:nil];!! NSString *tempcue = @"<td align=\"center\">";!! NSString *kastruptemp;!! [scanner scanuptostring:tempcue intostring:nil];!! [scanner setscanlocation:[scanner scanlocation]+[tempcue length]];!! [scanner scanuptostring:@"</td" intostring:&kastruptemp];!!!! NSLog(@"Temp. i Kastrup: %@", kastruptemp); } @catch (NSException * e) {!! NSLog(@"%@", [e description]); }

Creating a Backend for an iphone App Make sure your backend scales! Checkout Google App Engine. Same platform that runs Google services like Reader & Gmail. Program in Python or Java. Free to get started. Can handle thousands of simultaneous requests without significant efforts from the developer. Minimize overhead. Use JSON instead of XML. Java framework for serializing classes to JSON available from json.org.

TopJam Music videos from youtube. Crowd-source supported algorithm for finding best videos. Google App Engine backend.

iphone Community i Danmark CocoaHeads Øresund Mødes den anden tirsdag i hver måned i skiftesvis København og Malmø. http://groups.google.com/group/cocoaheads-oresund Copenhagen Cocoa Mødes hver tirsdag på Café Retro undtagen når der er CocoaHeads. http://cph.cc CocoaHeads Aarhus http://groups.google.com/group/cocoaheads-arhus Nordjysk iphone Laug http://groups.google.com/group/nil-dk

Questions? Slides kommer på twitter. Følg @olegam