Your SlideShare is downloading. ×
  • Like
Mobile Web App Development (Building your API)
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Mobile Web App Development (Building your API)

  • 1,448 views
Published

My slidedeck for my DMD12 lecture

My slidedeck for my DMD12 lecture

Published in Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
1,448
On SlideShare
0
From Embeds
0
Number of Embeds
1

Actions

Shares
Downloads
15
Comments
0
Likes
4

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    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

Transcript

  • 1. MOBILE WEB APPDEVELOPMENT(BUILDING YOUR API)DMD12 BSc10th March 2011Syd Lawrence SIT BACK / SIT BACK LISTEN UP LISTEN UPslideshare.net/sydlawrence
  • 2. DATA MODEL SIT BACK / SIT BACK LISTEN UP LISTEN UPhttp://www.flickr.com/photos/scarygami/4176834293/
  • 3. JSON SIT BACK / SIT BACK LISTEN UP LISTEN UPhttp://www.flickr.com/photos/sabeth718/4975388271/
  • 4. DATA RETREIVAL SIT BACK / SIT BACK LISTEN UP LISTEN UPhttp://www.flickr.com/photos/jf1/2178810029/
  • 5. GET SIT BACK / SIT BACK LISTEN UP LISTEN UPhttp://www.flickr.com/photos/29503348@N03/4915763648/
  • 6. HTTP://API.COM/GET.PHP?USER=2 SIT BACK / SIT BACK LISTEN UP LISTEN UPhttp://www.flickr.com/photos/29503348@N03/4915763648/
  • 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. DATA MODIFICATION SIT BACK / SIT BACK LISTEN UP LISTEN UPhttp://www.flickr.com/photos/frogdna/4010739111/
  • 9. SET SIT BACK / SIT BACK LISTEN UP LISTEN UPhttp://www.flickr.com/photos/deniscollette/5454729294/
  • 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. 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. ERROR CHECKING SIT BACK / SIT BACK LISTEN UP LISTEN UPhttp://www.flickr.com/photos/celebdu/10200825/
  • 13. HTTP://API.COM/GET.PHP?USER=A SIT BACK / SIT BACK LISTEN UP LISTEN UPhttp://www.flickr.com/photos/29503348@N03/4915763648/
  • 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. MORE ADVANCED SIT BACK / SIT BACK LISTEN UP LISTEN UPhttp://www.flickr.com/photos/albertyinyang/292241075/
  • 16. SEMANTIC URLS SIT BACK / SIT BACK LISTEN UP LISTEN UPhttp://www.flickr.com/photos/dharmasphere/2277286846/
  • 17. HTTP://API.COM/USER/2 SIT BACK / SIT BACK LISTEN UP LISTEN UPhttp://www.flickr.com/photos/29503348@N03/4915763648/
  • 18. AUTHENTICATION SIT BACK / SIT BACK LISTEN UP LISTEN UPhttp://www.flickr.com/photos/mexicanwave/3772804/
  • 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. 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. MY PLANNING SIT BACK / SIT BACK LISTEN UP LISTEN UP
  • 22. MY PLANNING SIT BACK / SIT BACK LISTEN UP LISTEN UP
  • 23. MY PLANNING SIT BACK / SIT BACK LISTEN UP LISTEN UP
  • 24. HOW DIDYOU DO? SIT BACK / SIT BACK LISTENUP LISTEN UPhttp://www.flickr.com/photos/annagaycoan/3750144703/
  • 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. CODE SAMPLESAND CONCEPTSMobile websites tips & tricks (@fakedarren)Cache ManifestlocalStorage SIT BACK / SIT BACKOnline / Offline Events LISTEN UP LISTEN UPJSONP