iPhone & Java Web Services, Take 2

Preview:

DESCRIPTION

A quick practical tour through making Java Web Services interoperate with iPhone Cocoa Applications and why this is of interest to the Java programming world.

Citation preview

iPhone Development

Java Web Services

Matthew McCullough, Ambient Ideas, LLC

Take 2

and

Why the

iPhone?

Overtaken Blackberry

in sales

even Overtaken Moto RAZR in sales

2,000,000 apps soldas of Oct 21, 2008

300,000,000

as of Dec 8, 2008

The world needs

your app!

Why

Web Services?

Web Service Languages

Java

Perl

.NETRuby

PHP

Python

C C#

C++

Consumed by any type of app

Independent of Platform

Desktop

Headless

RIA

ESB

SOA

Nearly EVERY app is becoming network aware

iPhone Objective C

Java Web Services

SOAP/REST/HTTP

Java Web Services

JWS ToolsIntelliJNative WS support

EclipseSOA Plugin

NetBeansSOA Plugin

MavenAxis ArchetypeJersey Archetype

RESTfulvs

SOAPful

SOAP

REST

http://localhost/drawing/

Java Web Service Servers

JAX-WSAxis

JAX-RSJSR311, Glassfish component “Jersey”

Java 6Local HTTP serverAPT, or BARE needed for SOAP

Java REST Demo

iPhone Objective C

iPhone Dev ProcessFree Membership

• SDK

• SimulatorPaid Membership

• Provisioning

• Deploy to Dev Device

• Digitally Sign Apps

• App Store

iPhone Dev Tools

• Dashcode = JavaScript

•Interface Builder, NIBs

•XCode

Objective C• No Garbage Collector• GC only on Mac OSX Desktop

• Manual Release of Memory

• But we can use autorelease pools

•C with Objects

Objective C REST

•Minimal Parsing•Text Based (Primarily)

•Simple HTTP request

•Changing of request types

•@GET, @POST, @PUT

iPhone REST Demo

Memory Leaks

Provisioning Annoyances

Objective C XML

• SOAP

• Heavy Wrappers, Headers, No Libs

• Help with XML Parsing

• NSXMLParser API

other ways to load

your App

Trench Coat App Store

SSH

Terminal

Multilanguage Dictionaries

Hacking tools

1000s of other free seedy apps

Otherdev Tools

SOAPui

Apache TCPMon

TCPDump

Firefox Poster

Netbeans WS/REST Tester

CURL

• Java

• Native? Sun has promised

• Flash

• Native? Adobe has pledged

• Ruby

• http://github.com/rhomobile/rhodes/tree/master

What’s next

Takeaways•iPhone Dev is Challenging

• Application process painful

• Manual memory management

• Cryptic APIs

•Java Web Services are Easy

• Minimal Gotchas

• Rest vs SOAP decisions

Q&ASource Code

http://g

ithub.co

m/matthe

wmccullo

ugh/

iphonean

djavaweb

services

/

Slides

http://s

lideshar

e.net/pr

ogramr

Questions?

MatthewM

@Ambient

Ideas.co

m

Recommended