iPhone Coding For Web Developers
Upcoming SlideShare
Loading in...5

iPhone Coding For Web Developers



A perspective on iPhone development from a server-side developer with very little GUI background.

A perspective on iPhone development from a server-side developer with very little GUI background.

Given at http://www.lfpug.com in London on 26 March 2009.



Total Views
Views on SlideShare
Embed Views



53 Embeds 11,766

http://www.hackdiary.com 10936
http://iphonebloggen.mobil.se 171
http://www.mobil.se 139
http://www.techgig.com 113
http://igni.pe.kr 58
http://www.ufukkilic.net 48
http://www.slideshare.net 46
http://linode.hackdiary.com 44
http://mobilewebexperience.com 34
http://latifevealper.blogspot.com 24
http://aye-it.blogspot.com 20
http://translate.googleusercontent.com 19
http://latifevealper.blogspot.ru 12
http://feeds.feedburner.com 11
http://routes.weebly.com 9
http://seungwoonlee.wordpress.com 8
http://otype.de 7
http://www.indoiphone.com 7
http://www.semanticaweb.info 7
http://webcache.googleusercontent.com 6
http://feedreader.com 4
http://wyattdanger.tumblr.com 4
http://cache.baidu.com 3
http://www.hackdiary.com.a.prod.fastly.net 3
http://turing.kryptonitesys.com 3
http://web.archive.org 2
https://www.hackdiary.com 2
http://dashboard.bloglines.com 1
https://www.linkedin.com 1
http://localhost 1
http://theoldreader.com 1
http://proxy.azgor.com 1
http://www.google.com 1
http://www.rssmountain.com 1
http://www.flickr.com 1
http://megafotos.ru 1
http://ranksit.com 1
http://www.netvibes.com 1
http://www.parkinsonplaza.nl 1
https://eat.tees.ac.uk 1
http://atif.unaldi.org 1
http://migurski.net 1
http://marketingpeople.ru 1
http://localhost:3000 1
http://dns.kryptonite.com 1 1
http://stephenbush.posterous.com 1
https://mycourses.mdc.edu 1
http://3x6.mjj.gd 1
http://twitter.com 1


Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
  • Video of the talk now available: http://www.lfpug.com/iphone-development-for-web-developers/
    Are you sure you want to
    Your message goes here
  • oww..this is a nice presentation about iPhone, web coding into mobile apps i will embed to my blog http://www.indoiphone.com
    Are you sure you want to
    Your message goes here
  • great ! presentation.

    Are you sure you want to
    Your message goes here
  • Nice Presentation
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment

iPhone Coding For Web Developers iPhone Coding For Web Developers Presentation Transcript

  • iPhone coding for web developers Matt Biddulph www.hackdiary.com
  • From websites to mobile apps
  • www.twitter.com
  • m.twitter.com
  • Twitterifc, Tweetie and Twitterfon
  • www.facebook.com
  • m.facebook.com
  • native iPhone app
  • Joe Hewitt on the native Facebook app
  • “People must have assumed that all I had to do was plug Facebook's data into Apple's ready-to-use UI components and hit the GO button. Joe Hewitt on the native Facebook app
  • “I wish it had been that easy, but unfortunately many of the components I needed were missing from the iPhone SDK, even though they existed in Apple's own apps.” Joe Hewitt on the native Facebook app
  • Phonegap
  • Building native internet apps
  • Internet app basics
  • Internet app basics HTTP JSON or XML Regular Expressions Local storage
  • HTTP NSURLRequest is fiddly. I use GTMHTTPFetcher from Google Toolbox for Mac. http://code.google.com/p/google-toolbox-for-mac/ or TTURLRequest from Joe Hewitt http://joehewitt.com/post/the-three20-project/
  • XML Mac OS X has NSXMLDocument for DOM parsing. The iPhone only has NSXML for SAX parsing. This is hard.
  • XML iPhone ships with libxml2. It is good, fast and has a nasty C API. Convenience wrapper functions make it much easier: NSArray *PerformXMLXPathQuery(NSData *document, NSString *query); http://cocoawithlove.com/2008/10/using-libxml2-for-parsing-and-xpath.html
  • JSON Objective C coders make liberal use of mix-ins. Ruby coders fondly call this ‘monkeypatching’. #import quot;NSString+SBJSON.hquot; [@quot;{quot;1quot;:2}quot; JSONValue]; (returns an NSDictionary)
  • Regular Expressions Some people, when confronted with a problem, think “I know, I'll use regular expressions.” Now they have two problems. —usually attributed to jwz in comp.lang.emacs
  • Regular Expressions Again, the iPhone’s string handling has no regular expression builtins. But it ships with the ICU library that does.
  • Regular Expressions RegexKitLite extends NSString with methods that bridge to ICU. This gives you UTF-safe functions with small memory overhead and caching. http://regexkit.sourceforge.net/RegexKitLite/
  • Regular Expressions As usual with Objective C, the method names are rather verbose. split: componentsSeparatedByRegex gsub: stringByReplacingOccurrencesOfRegex backrefs: matchEnumeratorWithRegex
  • Local Storage SQLite is the iPhone’s default database management library. This is a good thing.
  • Local Storage Yet again, it’s a C library that isn’t integrated with Cocoa.
  • Local Storage FMDB is an Objective C wrapper modeled on Java’s JDBC. It’s sensible. FMDatabase* db = [FMDatabase databaseWithPath:@quot;...quot;]; [db open]; [db executeUpdate:@”SELECT ...”]; http://code.google.com/p/flycode/source/browse/trunk/fmdb
  • A few words about event-driven code
  • The user is in control
  • UI responsiveness and rendering is a priority
  • Fallacies of networked computing
  • Fallacies of networked computing The network is reliable. Latency is zero. Bandwidth is infinite.
  • The world is asynchronous But threads are hard
  • Understand delegation
  • thank you Matt Biddulph www.hackdiary.com Flickr photo heroes: http://www.flickr.com/photos/scobleizer/1215753803/ http://www.flickr.com/photos/envision/3085397880/ http://www.flickr.com/photos/frinky/3236718934/ http://www.flickr.com/photos/nickbilton/2861938380/ http://www.flickr.com/photos/donsolo/2855854548/ http://www.flickr.com/photos/en321/209425860/ http://www.flickr.com/photos/mastrobiggo/2424561037/