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

KEY
Mobile Web App Development (Becoming native)
KEY
Mobile web app development
PDF
I can haz science?
PPTX
YQL - HackU IIT Madras 2012
PPTX
Hacking location aware apps
PPTX
What, Who, When, Where: quando la geolocalizzazione non basta
PPTX
Hacking up location aware apps
PPTX
Hacking location aware hacks HackU IIT Bombay
Mobile Web App Development (Becoming native)
Mobile web app development
I can haz science?
YQL - HackU IIT Madras 2012
Hacking location aware apps
What, Who, When, Where: quando la geolocalizzazione non basta
Hacking up location aware apps
Hacking location aware hacks HackU IIT Bombay

What's hot (13)

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

More from Syd Lawrence (8)

PDF
High Performance PhoneGap Apps
PDF
Music is the Soul - The Web is the Platform FOWA London 2014
PDF
Mobile Apps with Web Tech
PDF
It's the start of the web revolution, but it's not what you think
PPT
Rewriting The History Books
KEY
Javascript Development
KEY
Introduction to javascript
ZIP
Making AJAX User Friendly, Google Friendly, Friendly Friendly using the Histo...
High Performance PhoneGap Apps
Music is the Soul - The Web is the Platform FOWA London 2014
Mobile Apps with Web Tech
It's the start of the web revolution, but it's not what you think
Rewriting The History Books
Javascript Development
Introduction to javascript
Making AJAX User Friendly, Google Friendly, Friendly Friendly using the Histo...
Ad

Recently uploaded (20)

PDF
Mushroom cultivation and it's methods.pdf
PDF
Zenith AI: Advanced Artificial Intelligence
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PPTX
TLE Review Electricity (Electricity).pptx
PDF
Hybrid model detection and classification of lung cancer
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PDF
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
A novel scalable deep ensemble learning framework for big data classification...
PDF
Enhancing emotion recognition model for a student engagement use case through...
PDF
Encapsulation theory and applications.pdf
PDF
WOOl fibre morphology and structure.pdf for textiles
PDF
Web App vs Mobile App What Should You Build First.pdf
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Hindi spoken digit analysis for native and non-native speakers
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
cloud_computing_Infrastucture_as_cloud_p
PDF
NewMind AI Weekly Chronicles - August'25-Week II
Mushroom cultivation and it's methods.pdf
Zenith AI: Advanced Artificial Intelligence
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
TLE Review Electricity (Electricity).pptx
Hybrid model detection and classification of lung cancer
Encapsulation_ Review paper, used for researhc scholars
SOPHOS-XG Firewall Administrator PPT.pptx
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
A comparative analysis of optical character recognition models for extracting...
A novel scalable deep ensemble learning framework for big data classification...
Enhancing emotion recognition model for a student engagement use case through...
Encapsulation theory and applications.pdf
WOOl fibre morphology and structure.pdf for textiles
Web App vs Mobile App What Should You Build First.pdf
Digital-Transformation-Roadmap-for-Companies.pptx
Hindi spoken digit analysis for native and non-native speakers
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
cloud_computing_Infrastucture_as_cloud_p
NewMind AI Weekly Chronicles - August'25-Week II

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