mobilecamp boston - ios frameworks

11
iOS Frameworks Samuel Chow, MobyFab @Cybersam

Upload: samuel-chow

Post on 20-May-2015

3.000 views

Category:

Technology


0 download

DESCRIPTION

My talk at MobileCamp Boston, Feb 19 2011. The deck covers materials for constructing a simple Twitter reader using Three20 and RESTKit frameworks.

TRANSCRIPT

Page 1: MobileCamp Boston - iOS Frameworks

iOS Frameworks

Samuel Chow, MobyFab@Cybersam

Page 2: MobileCamp Boston - iOS Frameworks

End-to-End Platform

• More apps are connected to remote RESTful endpoints for richer content and user experience

• Better visuals + HTTP connection + JSON parser

Page 3: MobileCamp Boston - iOS Frameworks

iOS Frameworks

• REST– ASIHTTPRequest –

http://allseeing-i.com/ASIHTTPRequest/ – JSON Framework (aka SBJSON) –

http://stig.github.com/json-framework/ – YAJL – http://github.com/gabriel/yajl-objc – RESTKit – http://getsharekit.com/– ShareKit – http://getsharekit.com/

• Visual– Three20 – http://three20.info– Core-Plot – http://code.google.com/p/core-plot/

Page 4: MobileCamp Boston - iOS Frameworks

Three20 Visual

• Out of the box, you get these for freeCustom Views and Buttons Tab and Grid Table Items

LabelsSpecial View Controllers

Page 5: MobileCamp Boston - iOS Frameworks

Three20 Non-visual Utilities

• Network Caching• Remote image retrieval• Data persistence• HTTP Request/Response• JSON parsing (via JBSON or YAJL)• View navigation• CSS-like styling mode

Page 6: MobileCamp Boston - iOS Frameworks

Three20 Object Flow

Page 7: MobileCamp Boston - iOS Frameworks

Three20 Object Flow

- Data representation- Prepare to send request- Parse response

- Transform data objects to table items- navigation URLs

- Visual configuration- Visual layout

Page 9: MobileCamp Boston - iOS Frameworks

Low-level vs High-level

• Three20 and common REST Frameworks– Too much time spent on crafting request, parsing

responses, and creating representation of remote data

• Enter RESTKit– High-level abstraction of REST operations– It enables you to focus on modeling RESTful objects to

your in-memory object

• Conversely, if you want lower level, more complete HTTP swiss-army knife then consider ASIHTTPRequest

Page 10: MobileCamp Boston - iOS Frameworks

Three20 + RESTKit Integration

• RESTKit provides the RKRequestTTModel as a convenient class for integration with Three20

• No need to supply the parsing logic in requestDidFinishLoad:

• Simply map the data object properties to the JSON elements

• Supply the URL (host and path)• RESTKit will do the heavy lifting for you

Page 11: MobileCamp Boston - iOS Frameworks

Thank You

DOWNLOAD CODE + PRESENTATION SLIDES

FROMHTTP://CYBERSAM.COM/

Reference and credit: Blake Watters, Two Toasters, and Three20