SlideShare une entreprise Scribd logo
1  sur  26
MOBILE WEB APP
DEVELOPMENT
(BUILDING YOUR API)

DMD12 BSc
10th March 2011
Syd Lawrence                 SIT BACK /
                             SIT BACK
                             LISTEN UP
                             LISTEN UP

slideshare.net/sydlawrence
DATA MODEL



                                                     SIT BACK /
                                                     SIT BACK
                                                     LISTEN UP
                                                     LISTEN UP

http://www.flickr.com/photos/scarygami/4176834293/
JSON



                                                     SIT BACK /
                                                     SIT BACK
                                                     LISTEN UP
                                                     LISTEN UP

http://www.flickr.com/photos/sabeth718/4975388271/
DATA RETREIVAL



                                               SIT BACK /
                                               SIT BACK
                                               LISTEN UP
                                               LISTEN UP

http://www.flickr.com/photos/jf1/2178810029/
GET



                                                        SIT BACK /
                                                        SIT BACK
                                                        LISTEN UP
                                                        LISTEN UP

http://www.flickr.com/photos/29503348@N03/4915763648/
HTTP://API.COM/
GET.PHP?USER=2



                                                        SIT BACK /
                                                        SIT BACK
                                                        LISTEN UP
                                                        LISTEN UP

http://www.flickr.com/photos/29503348@N03/4915763648/
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 UP

MORE INFO: http://sydl.me/gcI2iQ
DATA MODIFICATION



                                                   SIT BACK /
                                                   SIT BACK
                                                   LISTEN UP
                                                   LISTEN UP

http://www.flickr.com/photos/frogdna/4010739111/
SET



                                                         SIT BACK /
                                                         SIT BACK
                                                         LISTEN UP
                                                         LISTEN UP

http://www.flickr.com/photos/deniscollette/5454729294/
HTTP://API.COM/
SET.PHP?USER=2&
FIRST_NAME=BOB


                                                        SIT BACK /
                                                        SIT BACK
                                                        LISTEN UP
                                                        LISTEN UP

http://www.flickr.com/photos/29503348@N03/4915763648/
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 UP

MORE INFO: http://sydl.me/gcI2iQ
ERROR CHECKING



                                                 SIT BACK /
                                                 SIT BACK
                                                 LISTEN UP
                                                 LISTEN UP

http://www.flickr.com/photos/celebdu/10200825/
HTTP://API.COM/
GET.PHP?USER=A



                                                        SIT BACK /
                                                        SIT BACK
                                                        LISTEN UP
                                                        LISTEN UP

http://www.flickr.com/photos/29503348@N03/4915763648/
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 UP

MORE INFO: http://sydl.me/gcI2iQ
MORE ADVANCED



                                                        SIT BACK /
                                                        SIT BACK
                                                        LISTEN UP
                                                        LISTEN UP

http://www.flickr.com/photos/albertyinyang/292241075/
SEMANTIC URLS



                                                        SIT BACK /
                                                        SIT BACK
                                                        LISTEN UP
                                                        LISTEN UP

http://www.flickr.com/photos/dharmasphere/2277286846/
HTTP://API.COM/
USER/2



                                                        SIT BACK /
                                                        SIT BACK
                                                        LISTEN UP
                                                        LISTEN UP

http://www.flickr.com/photos/29503348@N03/4915763648/
AUTHENTICATION



                                                    SIT BACK /
                                                    SIT BACK
                                                    LISTEN UP
                                                    LISTEN UP

http://www.flickr.com/photos/mexicanwave/3772804/
HTTP://API.COM/
USER/2&KEY=
{SOME_KEY}


                                                        SIT BACK /
                                                        SIT BACK
                                                        LISTEN UP
                                                        LISTEN UP

http://www.flickr.com/photos/41583504@N03/4797836797/
A LITTLE
TASK DUE
TODAY
(OPTIONAL BUT PRETTY MUCH ESSENTIAL)




With regards to your project.
                                                            SIT BACK /
                                                            SIT BACK
Plan what API methods you need.                             LISTEN UP
                                                            LISTEN UP

Plan your database for the server side of the application
MY PLANNING



              SIT BACK /
              SIT BACK
              LISTEN UP
              LISTEN UP
MY PLANNING



              SIT BACK /
              SIT BACK
              LISTEN UP
              LISTEN UP
MY PLANNING



              SIT BACK /
              SIT BACK
              LISTEN UP
              LISTEN UP
HOW DID
YOU DO?


                                                       SIT BACK /
                                                        SIT BACK
                                                       LISTENUP
                                                        LISTEN UP



http://www.flickr.com/photos/annagaycoan/3750144703/
A LITTLE
TASK DUE
NEXT WEEK
(NOT REALLY THAT OPTIONAL, BUT UP TO YOU IF YOU WANT TO DO IT)




Create your API
Setup your database
Populate with sample data
                                                                 SIT BACK /
                                                                 SIT BACK
Create your getters and setters                                  LISTEN UP
                                                                 LISTEN UP

Test
CODE SAMPLES
AND CONCEPTS


Mobile websites tips & tricks (@fakedarren)
Cache Manifest
localStorage
                                              SIT BACK /
                                              SIT BACK
Online / Offline Events                       LISTEN UP
                                              LISTEN UP

JSONP

Contenu connexe

Tendances

Hacking up location aware apps
Hacking up location aware appsHacking up location aware apps
Hacking up location aware appsAnshu Prateek
 
Web 2.0 tools used!
Web 2.0 tools used!Web 2.0 tools used!
Web 2.0 tools used!mawatson10
 
Technology and Change: It's good for business, is it good enough for education?
Technology and Change: It's good for business, is it good enough for education?Technology and Change: It's good for business, is it good enough for education?
Technology and Change: It's good for business, is it good enough for education?Hazel Owen
 
Designing for Multiple Mobile Platforms
Designing for Multiple Mobile PlatformsDesigning for Multiple Mobile Platforms
Designing for Multiple Mobile PlatformsRobert Douglas
 
SBGames 2012 - What is going on with ubicomp games
SBGames 2012 - What is going on with ubicomp gamesSBGames 2012 - What is going on with ubicomp games
SBGames 2012 - What is going on with ubicomp gamesFabricio Nogueira Buzeto
 
Advancing the Future of America's Heritage through Organic Social Networks
Advancing the Future of America's Heritage through Organic Social NetworksAdvancing the Future of America's Heritage through Organic Social Networks
Advancing the Future of America's Heritage through Organic Social NetworksJeff Guin
 

Tendances (13)

My sites swaner.j@gmail.txt
My sites  swaner.j@gmail.txtMy sites  swaner.j@gmail.txt
My sites swaner.j@gmail.txt
 
Hacking up location aware apps
Hacking up location aware appsHacking up location aware apps
Hacking up location aware apps
 
Web 2.0 tools used!
Web 2.0 tools used!Web 2.0 tools used!
Web 2.0 tools used!
 
John Kotter Quote 2
John Kotter Quote 2John Kotter Quote 2
John Kotter Quote 2
 
Yql hacku iitd_2012
Yql hacku iitd_2012Yql hacku iitd_2012
Yql hacku iitd_2012
 
Technology and Change: It's good for business, is it good enough for education?
Technology and Change: It's good for business, is it good enough for education?Technology and Change: It's good for business, is it good enough for education?
Technology and Change: It's good for business, is it good enough for education?
 
Designing for Multiple Mobile Platforms
Designing for Multiple Mobile PlatformsDesigning for Multiple Mobile Platforms
Designing for Multiple Mobile Platforms
 
Elliot Pierron
Elliot PierronElliot Pierron
Elliot Pierron
 
SBGames 2012 - What is going on with ubicomp games
SBGames 2012 - What is going on with ubicomp gamesSBGames 2012 - What is going on with ubicomp games
SBGames 2012 - What is going on with ubicomp games
 
Educator as a Maker Educator
Educator as a Maker EducatorEducator as a Maker Educator
Educator as a Maker Educator
 
Advancing the Future of America's Heritage through Organic Social Networks
Advancing the Future of America's Heritage through Organic Social NetworksAdvancing the Future of America's Heritage through Organic Social Networks
Advancing the Future of America's Heritage through Organic Social Networks
 
Ubi zen 2.2 - middlewares para ubicomp
Ubi zen   2.2 - middlewares para ubicompUbi zen   2.2 - middlewares para ubicomp
Ubi zen 2.2 - middlewares para ubicomp
 
Seven Deadly Sins
Seven Deadly Sins Seven Deadly Sins
Seven Deadly Sins
 

Similaire à Mobile Web App Development (Building your API)

Javascript Development
Javascript DevelopmentJavascript Development
Javascript DevelopmentSyd Lawrence
 
Introduction to javascript
Introduction to javascriptIntroduction to javascript
Introduction to javascriptSyd Lawrence
 
Making AJAX User Friendly, Google Friendly, Friendly Friendly using the Histo...
Making AJAX User Friendly, Google Friendly, Friendly Friendly using the Histo...Making AJAX User Friendly, Google Friendly, Friendly Friendly using the Histo...
Making AJAX User Friendly, Google Friendly, Friendly Friendly using the Histo...Syd Lawrence
 
Frilansverktøykasse (praktiske tips for budsjettering og prosjektstyring)
Frilansverktøykasse (praktiske tips for budsjettering og prosjektstyring)Frilansverktøykasse (praktiske tips for budsjettering og prosjektstyring)
Frilansverktøykasse (praktiske tips for budsjettering og prosjektstyring)Andreas Beining
 
Pushing, pulling or leaving the door open
Pushing, pulling or leaving the door openPushing, pulling or leaving the door open
Pushing, pulling or leaving the door openDale Lane
 
Hairston walter a1_pcp
Hairston walter a1_pcpHairston walter a1_pcp
Hairston walter a1_pcphairston34
 
Meeting Community Needs: 2.0 Tools & Statewide Services
Meeting Community Needs: 2.0 Tools & Statewide ServicesMeeting Community Needs: 2.0 Tools & Statewide Services
Meeting Community Needs: 2.0 Tools & Statewide ServicesPolly Farrington
 

Similaire à Mobile Web App Development (Building your API) (8)

Javascript Development
Javascript DevelopmentJavascript Development
Javascript Development
 
Introduction to javascript
Introduction to javascriptIntroduction to javascript
Introduction to javascript
 
Making AJAX User Friendly, Google Friendly, Friendly Friendly using the Histo...
Making AJAX User Friendly, Google Friendly, Friendly Friendly using the Histo...Making AJAX User Friendly, Google Friendly, Friendly Friendly using the Histo...
Making AJAX User Friendly, Google Friendly, Friendly Friendly using the Histo...
 
Frilansverktøykasse (praktiske tips for budsjettering og prosjektstyring)
Frilansverktøykasse (praktiske tips for budsjettering og prosjektstyring)Frilansverktøykasse (praktiske tips for budsjettering og prosjektstyring)
Frilansverktøykasse (praktiske tips for budsjettering og prosjektstyring)
 
Pushing, pulling or leaving the door open
Pushing, pulling or leaving the door openPushing, pulling or leaving the door open
Pushing, pulling or leaving the door open
 
Oow 2008 Final
Oow 2008 FinalOow 2008 Final
Oow 2008 Final
 
Hairston walter a1_pcp
Hairston walter a1_pcpHairston walter a1_pcp
Hairston walter a1_pcp
 
Meeting Community Needs: 2.0 Tools & Statewide Services
Meeting Community Needs: 2.0 Tools & Statewide ServicesMeeting Community Needs: 2.0 Tools & Statewide Services
Meeting Community Needs: 2.0 Tools & Statewide Services
 

Dernier

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 

Dernier (20)

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 

Mobile Web App Development (Building your API)

  • 1. MOBILE WEB APP DEVELOPMENT (BUILDING YOUR API) DMD12 BSc 10th March 2011 Syd Lawrence SIT BACK / SIT BACK LISTEN UP LISTEN UP slideshare.net/sydlawrence
  • 2. DATA MODEL SIT BACK / SIT BACK LISTEN UP LISTEN UP http://www.flickr.com/photos/scarygami/4176834293/
  • 3. JSON SIT BACK / SIT BACK LISTEN UP LISTEN UP http://www.flickr.com/photos/sabeth718/4975388271/
  • 4. DATA RETREIVAL SIT BACK / SIT BACK LISTEN UP LISTEN UP http://www.flickr.com/photos/jf1/2178810029/
  • 5. GET SIT BACK / SIT BACK LISTEN UP LISTEN UP http://www.flickr.com/photos/29503348@N03/4915763648/
  • 6. HTTP://API.COM/ GET.PHP?USER=2 SIT BACK / SIT BACK LISTEN UP LISTEN UP http://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 UP MORE INFO: http://sydl.me/gcI2iQ
  • 8. DATA MODIFICATION SIT BACK / SIT BACK LISTEN UP LISTEN UP http://www.flickr.com/photos/frogdna/4010739111/
  • 9. SET SIT BACK / SIT BACK LISTEN UP LISTEN UP http://www.flickr.com/photos/deniscollette/5454729294/
  • 10. HTTP://API.COM/ SET.PHP?USER=2& FIRST_NAME=BOB SIT BACK / SIT BACK LISTEN UP LISTEN UP http://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 UP MORE INFO: http://sydl.me/gcI2iQ
  • 12. ERROR CHECKING SIT BACK / SIT BACK LISTEN UP LISTEN UP http://www.flickr.com/photos/celebdu/10200825/
  • 13. HTTP://API.COM/ GET.PHP?USER=A SIT BACK / SIT BACK LISTEN UP LISTEN UP http://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 UP MORE INFO: http://sydl.me/gcI2iQ
  • 15. MORE ADVANCED SIT BACK / SIT BACK LISTEN UP LISTEN UP http://www.flickr.com/photos/albertyinyang/292241075/
  • 16. SEMANTIC URLS SIT BACK / SIT BACK LISTEN UP LISTEN UP http://www.flickr.com/photos/dharmasphere/2277286846/
  • 17. HTTP://API.COM/ USER/2 SIT BACK / SIT BACK LISTEN UP LISTEN UP http://www.flickr.com/photos/29503348@N03/4915763648/
  • 18. AUTHENTICATION SIT BACK / SIT BACK LISTEN UP LISTEN UP http://www.flickr.com/photos/mexicanwave/3772804/
  • 19. HTTP://API.COM/ USER/2&KEY= {SOME_KEY} SIT BACK / SIT BACK LISTEN UP LISTEN UP http://www.flickr.com/photos/41583504@N03/4797836797/
  • 20. A LITTLE TASK DUE TODAY (OPTIONAL BUT PRETTY MUCH ESSENTIAL) With regards to your project. SIT BACK / SIT BACK Plan what API methods you need. LISTEN UP LISTEN UP Plan 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 DID YOU DO? SIT BACK / SIT BACK LISTENUP LISTEN UP http://www.flickr.com/photos/annagaycoan/3750144703/
  • 25. A LITTLE TASK DUE NEXT WEEK (NOT REALLY THAT OPTIONAL, BUT UP TO YOU IF YOU WANT TO DO IT) Create your API Setup your database Populate with sample data SIT BACK / SIT BACK Create your getters and setters LISTEN UP LISTEN UP Test
  • 26. CODE SAMPLES AND CONCEPTS Mobile websites tips & tricks (@fakedarren) Cache Manifest localStorage SIT BACK / SIT BACK Online / Offline Events LISTEN UP LISTEN UP JSONP

Notes de l'éditeur

  1. \n
  2. Your database tables\n
  3. We want to output it to json\n
  4. Exactly what it says on the tin\n
  5. Get Data\n
  6. Get Data\n
  7. \n
  8. Get Data\n
  9. Set Data\n
  10. Get Data\n
  11. \n
  12. Get Data\n
  13. Get Data\n
  14. \n
  15. Get Data\n
  16. Friendly URLs\n
  17. Get Data\n
  18. Get Data\n
  19. Get Data\n
  20. \n
  21. Get Data\n
  22. Get Data\n
  23. Get Data\n
  24. How did you do?\n
  25. \n
  26. \n