Mobile Web App Development (Building your API)

1,830 views

Published on

My slidedeck for my DMD12 lecture

Published in: Technology
0 Comments
5 Likes
Statistics
Notes
  • Be the first to comment

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

No notes for slide
  • \n
  • Your database tables\n
  • We want to output it to json\n
  • Exactly what it says on the tin\n
  • Get Data\n
  • Get Data\n
  • \n
  • Get Data\n
  • Set Data\n
  • Get Data\n
  • \n
  • Get Data\n
  • Get Data\n
  • \n
  • Get Data\n
  • Friendly URLs\n
  • Get Data\n
  • Get Data\n
  • Get Data\n
  • \n
  • Get Data\n
  • Get Data\n
  • Get Data\n
  • How did you do?\n
  • \n
  • \n
  • Mobile Web App Development (Building your API)

    1. 1. MOBILE WEB APPDEVELOPMENT(BUILDING YOUR API)DMD12 BSc10th March 2011Syd Lawrence SIT BACK / SIT BACK LISTEN UP LISTEN UPslideshare.net/sydlawrence
    2. 2. DATA MODEL SIT BACK / SIT BACK LISTEN UP LISTEN UPhttp://www.flickr.com/photos/scarygami/4176834293/
    3. 3. JSON SIT BACK / SIT BACK LISTEN UP LISTEN UPhttp://www.flickr.com/photos/sabeth718/4975388271/
    4. 4. DATA RETREIVAL SIT BACK / SIT BACK LISTEN UP LISTEN UPhttp://www.flickr.com/photos/jf1/2178810029/
    5. 5. GET SIT BACK / SIT BACK LISTEN UP LISTEN UPhttp://www.flickr.com/photos/29503348@N03/4915763648/
    6. 6. HTTP://API.COM/GET.PHP?USER=2 SIT BACK / SIT BACK LISTEN UP LISTEN UPhttp://www.flickr.com/photos/29503348@N03/4915763648/
    7. 7. http://api.com/get.php?user=2 <code/>___$user = array( "id" => 2, "first_name" => "Syd", "last_name" => "Lawrence");echo json_encode($user);/****** RESPONSE ******/{"id":2,"first_name":"Syd","last_name":”Lawrence”} SIT BACK / SIT BACK LISTEN UP LISTEN UPMORE INFO: http://sydl.me/gcI2iQ
    8. 8. DATA MODIFICATION SIT BACK / SIT BACK LISTEN UP LISTEN UPhttp://www.flickr.com/photos/frogdna/4010739111/
    9. 9. SET SIT BACK / SIT BACK LISTEN UP LISTEN UPhttp://www.flickr.com/photos/deniscollette/5454729294/
    10. 10. HTTP://API.COM/SET.PHP?USER=2&FIRST_NAME=BOB SIT BACK / SIT BACK LISTEN UP LISTEN UPhttp://www.flickr.com/photos/29503348@N03/4915763648/
    11. 11. http://api.com/set.php?user=2&first_name=Bob <code/>___$user = array( "id" => 2, "first_name" => "Syd", "last_name" => "Lawrence");$user["first_name"] = $_GET["first_name"];echo json_encode($user);/****** RESPONSE ******/{"id":2,"first_name":"Bob","last_name":”Lawrence”} SIT BACK / SIT BACK LISTEN UP LISTEN UPMORE INFO: http://sydl.me/gcI2iQ
    12. 12. ERROR CHECKING SIT BACK / SIT BACK LISTEN UP LISTEN UPhttp://www.flickr.com/photos/celebdu/10200825/
    13. 13. HTTP://API.COM/GET.PHP?USER=A SIT BACK / SIT BACK LISTEN UP LISTEN UPhttp://www.flickr.com/photos/29503348@N03/4915763648/
    14. 14. http://api.com/get?user=a <code/>___if (!is_int($_GET["user"])) { $return = array( "error" => "FAIL! ‘a’ isn’t an integer stooopid!" ); echo json_encode($return);}/****** RESPONSE ******/{"error":"FAIL! ‘a’ isn’t an integer stooopid!"} SIT BACK / SIT BACK LISTEN UP LISTEN UPMORE INFO: http://sydl.me/gcI2iQ
    15. 15. MORE ADVANCED SIT BACK / SIT BACK LISTEN UP LISTEN UPhttp://www.flickr.com/photos/albertyinyang/292241075/
    16. 16. SEMANTIC URLS SIT BACK / SIT BACK LISTEN UP LISTEN UPhttp://www.flickr.com/photos/dharmasphere/2277286846/
    17. 17. HTTP://API.COM/USER/2 SIT BACK / SIT BACK LISTEN UP LISTEN UPhttp://www.flickr.com/photos/29503348@N03/4915763648/
    18. 18. AUTHENTICATION SIT BACK / SIT BACK LISTEN UP LISTEN UPhttp://www.flickr.com/photos/mexicanwave/3772804/
    19. 19. HTTP://API.COM/USER/2&KEY={SOME_KEY} SIT BACK / SIT BACK LISTEN UP LISTEN UPhttp://www.flickr.com/photos/41583504@N03/4797836797/
    20. 20. A LITTLETASK DUETODAY(OPTIONAL BUT PRETTY MUCH ESSENTIAL)With regards to your project. SIT BACK / SIT BACKPlan what API methods you need. LISTEN UP LISTEN UPPlan your database for the server side of the application
    21. 21. MY PLANNING SIT BACK / SIT BACK LISTEN UP LISTEN UP
    22. 22. MY PLANNING SIT BACK / SIT BACK LISTEN UP LISTEN UP
    23. 23. MY PLANNING SIT BACK / SIT BACK LISTEN UP LISTEN UP
    24. 24. HOW DIDYOU DO? SIT BACK / SIT BACK LISTENUP LISTEN UPhttp://www.flickr.com/photos/annagaycoan/3750144703/
    25. 25. A LITTLETASK DUENEXT WEEK(NOT REALLY THAT OPTIONAL, BUT UP TO YOU IF YOU WANT TO DO IT)Create your APISetup your databasePopulate with sample data SIT BACK / SIT BACKCreate your getters and setters LISTEN UP LISTEN UPTest
    26. 26. CODE SAMPLESAND CONCEPTSMobile websites tips & tricks (@fakedarren)Cache ManifestlocalStorage SIT BACK / SIT BACKOnline / Offline Events LISTEN UP LISTEN UPJSONP

    ×