Leveraging the Three20 Framework for iPhone applications

1,610 views

Published on

This is a sample application for using some advanced features from the Three20 library, originally put out by Facebook. This presentation was given at Dallas Tech Fest 2011. For the source code, please visit http://github.com/phillipuniverse/PhotoGalleryThree20

Published in: Technology, News & Politics
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,610
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
20
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Leveraging the Three20 Framework for iPhone applications

    1. 1. Three20Phillip VerheydenDallas Tech FestAugust 12, 2011
    2. 2. Who am I?• Consultant for Credera• ~12 months of iPhone experience• Three20 contributor
    3. 3. Roadmap• What is Three20 and why should I care?• TTCatalog Demo• PhotoGallery App demo• Code!• Closing thoughts
    4. 4. What is Three20?• Framework of views, helpers, paradigms in Objective-C built on top of iOS• Heavy focus on network access• Brought to you by: Facebook™• Takes out large amount iOS boilerplate code
    5. 5. Why Three20?
    6. 6. Features• Custom views like a launcher view (mimics Springboard)and a photo gallery controller• Asynchronous URL loading + robust disk cache• Customized table cells• Internet-aware table views• URL-based navigation• Global Styling
    7. 7. Extensions• Built on top of Three20• extThree20CSSStyle - use CSS to style your app• extThree20JSON - shortcut for parsing JSON (uses SBJSON or YAJL)• extThree20XML - rudimentary XML marshaling (uses NSXMLParser)
    8. 8. TTCatalog Demo
    9. 9. Our App• Photo App• Uses: • TTLauncherView • TTTableViewController • TTPhotoController
    10. 10. Server Code Layout• 2 categories: ATVs, Sports• Each gallery has an arbitrary number of albums (specified in XML)• Each album has an arbitrary number of Photos (specified in XML)
    11. 11. TTLauncherView• Comprised of TTLauncherItems• Each item can contain a picture, title and open a view• Mimics Springboard (except for folders)
    12. 12. TTModelViewController TTTableViewDataSource TTModelTTTableViewController (TTListDataSource, TTSectionedDataSource) TTURLRequestModelMyTableViewController MyDataSource MyModel
    13. 13. TTModelViewController TTTableViewDataSource TTModelTTTableViewController (TTListDataSource, TTSectionedDataSource) TTURLRequestModelMyTableViewController MyDataSource MyModel createModel
    14. 14. TTModelViewController TTTableViewDataSource TTModelTTTableViewController (TTListDataSource, TTSectionedDataSource) TTURLRequestModelMyTableViewController MyDataSource MyModel createModel init
    15. 15. TTModelViewController TTTableViewDataSource TTModelTTTableViewController (TTListDataSource, TTSectionedDataSource) TTURLRequestModelMyTableViewController MyDataSource MyModel createModel init init
    16. 16. TTModelViewController TTTableViewDataSource TTModelTTTableViewController (TTListDataSource, TTSectionedDataSource) TTURLRequestModelMyTableViewController MyDataSource MyModel createModel init init load:more:
    17. 17. TTModelViewController TTTableViewDataSource TTModelTTTableViewController (TTListDataSource, TTSectionedDataSource) TTURLRequestModelMyTableViewController MyDataSource MyModel createModel init init add self as delegate load:more:
    18. 18. TTModelViewController TTTableViewDataSource TTModelTTTableViewController (TTListDataSource, TTSectionedDataSource) TTURLRequestModelMyTableViewController MyDataSource MyModel createModel init init add self as delegate load:more: load:more
    19. 19. TTModelViewController TTTableViewDataSource TTModelTTTableViewController (TTListDataSource, TTSectionedDataSource) TTURLRequestModelMyTableViewController MyDataSource MyModel createModel init init add self as delegate load:more: load:more
    20. 20. TTModelViewController TTTableViewDataSource TTModelTTTableViewController (TTListDataSource, TTSectionedDataSource) TTURLRequestModelMyTableViewController MyDataSource MyModel createModel init init add self as delegate load:more: load:more [request send]
    21. 21. TTModelViewController TTTableViewDataSource TTModelTTTableViewController (TTListDataSource, TTSectionedDataSource) TTURLRequestModelMyTableViewController MyDataSource MyModel createModel init init add self as delegate load:more: load:more [request send]
    22. 22. TTModelViewController TTTableViewDataSource TTModelTTTableViewController (TTListDataSource, TTSectionedDataSource) TTURLRequestModelMyTableViewController MyDataSource MyModel createModel init init add self as delegate load:more: load:more [request send] WEB
    23. 23. TTModelViewController TTTableViewDataSource TTModelTTTableViewController (TTListDataSource, TTSectionedDataSource) TTURLRequestModelMyTableViewController MyDataSource MyModel createModel init init add self as delegate load:more: load:more [request send] WEB
    24. 24. TTModelViewController TTTableViewDataSource TTModelTTTableViewController (TTListDataSource, TTSectionedDataSource) TTURLRequestModelMyTableViewController MyDataSource MyModel createModel init init add self as delegate load:more: load:more [request send] request:did(Finish, WEB Fail)Load
    25. 25. TTModelViewController TTTableViewDataSource TTModelTTTableViewController (TTListDataSource, TTSectionedDataSource) TTURLRequestModelMyTableViewController MyDataSource MyModel createModel init init add self as delegate load:more: load:more [request send] request:did(Finish, WEB Fail)Load
    26. 26. TTModelViewController TTTableViewDataSource TTModelTTTableViewController (TTListDataSource, TTSectionedDataSource) TTURLRequestModelMyTableViewController MyDataSource MyModel createModel init init add self as delegate load:more: load:more [request send] request:did(Finish, WEB Fail)Load [super request:request did(Finish, Fail)Load]
    27. 27. TTModelViewController TTTableViewDataSource TTModelTTTableViewController (TTListDataSource, TTSectionedDataSource) TTURLRequestModelMyTableViewController MyDataSource MyModel createModel init init add self as delegate load:more: load:more [request send] request:did(Finish, WEB Fail)Load [super request:request modelDidFinishLoad:self did(Finish, Fail)Load]
    28. 28. TTModelViewController TTTableViewDataSource TTModelTTTableViewController (TTListDataSource, TTSectionedDataSource) TTURLRequestModelMyTableViewController MyDataSource MyModel createModel init init add self as delegate load:more: load:more [request send] request:did(Finish, WEB Fail)Load [super request:request modelDidFinishLoad:self did(Finish, Fail)Load] tableViewDidLoadModel:self
    29. 29. TTModelViewController TTTableViewDataSource TTModelTTTableViewController (TTListDataSource, TTSectionedDataSource) TTURLRequestModelMyTableViewController MyDataSource MyModel createModel init init add self as delegate load:more: load:more [request send] request:did(Finish, WEB Fail)Load [super request:request modelDidFinishLoad:self did(Finish, Fail)Load] tableViewDidLoadModel tableViewDidLoadModel:self - create TTTableItems based on model results
    30. 30. TTModelViewController TTTableViewDataSource TTModelTTTableViewController (TTListDataSource, TTSectionedDataSource) TTURLRequestModelMyTableViewController MyDataSource MyModel createModel init init add self as delegate load:more: load:more [request send] request:did(Finish, WEB Fail)Load [super request:request modelDidFinishLoad:self did(Finish, Fail)Load] tableViewDidLoadModel tableViewDidLoadModel:self - create TTTableItems based on model results cellForRowAtIndexPath:
    31. 31. TTModelViewController TTTableViewDataSource TTModelTTTableViewController (TTListDataSource, TTSectionedDataSource) TTURLRequestModelMyTableViewController MyDataSource MyModel createModel init init add self as delegate load:more: load:more [request send] request:did(Finish, WEB Fail)Load [super request:request modelDidFinishLoad:self did(Finish, Fail)Load] tableViewDidLoadModel tableViewDidLoadModel:self - create TTTableItems based on model results cellClassForObject: cellForRowAtIndexPath: - provide TTTableCell from TTTableItem
    32. 32. TTModelViewController TTTableViewDataSource TTModelTTTableViewController (TTListDataSource, TTSectionedDataSource) TTURLRequestModelMyTableViewController MyDataSource MyModel createModel init init add self as delegate load:more: load:more [request send] request:did(Finish, WEB Fail)Load notify delegates [super request:request modelDidFinishLoad:self did(Finish, Fail)Load] tableViewDidLoadModel tableViewDidLoadModel:self - create TTTableItems based on model results cellClassForObject: cellForRowAtIndexPath: - provide TTTableCell from TTTableItem
    33. 33. TTModelViewController TTTableViewDataSource TTModelTTTableViewController (TTListDataSource, TTSectionedDataSource) TTURLRequestModelMyTableViewController MyDataSource MyModel createModel init init add self as delegate load:more: load:more [request send] request:did(Finish, WEB Fail)Load notify delegates [super request:request modelDidFinishLoad:self did(Finish, Fail)Load] tableViewDidLoadModel tableViewDidLoadModel:self - create TTTableItems based on model results cellClassForObject: * - bold and underlined cellForRowAtIndexPath: - provide TTTableCell from notates methods to TTTableItem overwrite
    34. 34. Conformto protocol
    35. 35. To the code!
    36. 36. Where to go from here?• Nimbus - https://github.com/jverkoey/ nimbus• Restkit - https://github.com/RestKit/RestKit
    37. 37. Closing Thoughts• Phillip Verheyden• @phillipuniverse• http://www.phillipuniverse.com• http://github.com/phillipuniverse• pverheyden@credera.com, pverheyden@gmail.com• http://blogs.credera.com

    ×