SlideShare a Scribd company logo
1 of 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

More Related Content

What's hot

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
 

What's hot (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
 

Similar to Mobile Web App Development (Building your API)

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
 

Similar to Mobile Web App Development (Building your API) (7)

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
 

More from Syd Lawrence

High Performance PhoneGap Apps
High Performance PhoneGap AppsHigh Performance PhoneGap Apps
High Performance PhoneGap AppsSyd Lawrence
 
Music is the Soul - The Web is the Platform FOWA London 2014
Music is the Soul - The Web is the Platform FOWA London 2014Music is the Soul - The Web is the Platform FOWA London 2014
Music is the Soul - The Web is the Platform FOWA London 2014Syd Lawrence
 
Mobile Apps with Web Tech
Mobile Apps with Web TechMobile Apps with Web Tech
Mobile Apps with Web TechSyd Lawrence
 
It's the start of the web revolution, but it's not what you think
It's the start of the web revolution, but it's not what you thinkIt's the start of the web revolution, but it's not what you think
It's the start of the web revolution, but it's not what you thinkSyd Lawrence
 
Rewriting The History Books
Rewriting The History BooksRewriting The History Books
Rewriting The History BooksSyd Lawrence
 
Javascript Development
Javascript DevelopmentJavascript Development
Javascript DevelopmentSyd Lawrence
 

More from Syd Lawrence (6)

High Performance PhoneGap Apps
High Performance PhoneGap AppsHigh Performance PhoneGap Apps
High Performance PhoneGap Apps
 
Music is the Soul - The Web is the Platform FOWA London 2014
Music is the Soul - The Web is the Platform FOWA London 2014Music is the Soul - The Web is the Platform FOWA London 2014
Music is the Soul - The Web is the Platform FOWA London 2014
 
Mobile Apps with Web Tech
Mobile Apps with Web TechMobile Apps with Web Tech
Mobile Apps with Web Tech
 
It's the start of the web revolution, but it's not what you think
It's the start of the web revolution, but it's not what you thinkIt's the start of the web revolution, but it's not what you think
It's the start of the web revolution, but it's not what you think
 
Rewriting The History Books
Rewriting The History BooksRewriting The History Books
Rewriting The History Books
 
Javascript Development
Javascript DevelopmentJavascript Development
Javascript Development
 

Recently uploaded

Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsAndrey Dotsenko
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 

Recently uploaded (20)

Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 

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

Editor's Notes

  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