SlideShare a Scribd company logo
1 of 16
Download to read offline
iPhone Application Development Course

NSURLConnection
              (Case study)




                       Mr.Chalermchon Sommana
                       Brightest IDEA
                       Date: 9 May 2011
Outline

●Connect URL
●Receive Data from URL change to XML Parser

●Read XML Parser

●Create Class for XML

●Present XML Data
Overview



             Connect URL
                           PHP
                                 Query database

                XML
                                   MySQL




    iPhone
Connect URL


Case Study web service URL
●

    ●   http://203.185.96.228/sarakham2011/xplog/showFollowLike.php
    ●   http://203.185.96.228/sarakham2011/xplog/checkLogin.php

●Create NSURL with string
●URLRequest

●Connection and set delegate
NSURLConnection delegate

●Start connection
   didReceiveResponse
●Receive data from URL


   didReceiveData
●End connection


  connectionDidFinishLoading
●Error report


  didFailWithError
XMLParser delegate


Start Document
●

    parserDidStartDocument
Start Element
●

    didStartElement
Character
●

    foundCharacters
End Element
●

    didEndElement
End Document
●

    parserDidEndDocument
XML Structure

http://203.185.96.228/sarakham2011/xplog/showFollowLike.php


        <ShowTopi c Fol l owLi ke>
            <t opi c >
                 <t _i d>14238</ t _i d>
                 <t _t i t l e>ตรอกบ้านจีน</ t _ t i t l e >
                 <s t ar >45</ s t ar >
                 <s our c e >0111110952426710112. j pg</ s our c e >
                 <des c >กดดูรายละเอียด</ de s c >
            </ t opi c >

            …
        </ ShowTopi c Fol l owLi ke >
Custom Class: Topic

Topic Class:{
    NSInteger tid,star;
    NSString *tTitle,*tSource,*tDesc;
}
Workshop
iPhone Application Development Course

NSURLConnection
Contact us
Brightest IDEA: http://www.brightest-idea.com

Mr.Chalermchon Sommana
Blog: http://adayd3sign.wordpress.com
Thank you.
Connection Source code
Connection Source code (2)
XMLParser Source code
XMLParser Source code (2)
XMLParser Source code (3)
Topic Class Source code

More Related Content

Similar to iPhone NSURLConnection-2

Information Extraction from the Web - Algorithms and Tools
Information Extraction from the Web - Algorithms and ToolsInformation Extraction from the Web - Algorithms and Tools
Information Extraction from the Web - Algorithms and Tools
Benjamin Habegger
 
Basics of Solr and Solr Integration with AEM6
Basics of Solr and Solr Integration with AEM6Basics of Solr and Solr Integration with AEM6
Basics of Solr and Solr Integration with AEM6
DEEPAK KHETAWAT
 

Similar to iPhone NSURLConnection-2 (20)

XML-Free Programming : Java Server and Client Development without &lt;>
XML-Free Programming : Java Server and Client Development without &lt;>XML-Free Programming : Java Server and Client Development without &lt;>
XML-Free Programming : Java Server and Client Development without &lt;>
 
Information Extraction from the Web - Algorithms and Tools
Information Extraction from the Web - Algorithms and ToolsInformation Extraction from the Web - Algorithms and Tools
Information Extraction from the Web - Algorithms and Tools
 
Web Service and Mobile Integrated Day II
Web Service and Mobile Integrated Day IIWeb Service and Mobile Integrated Day II
Web Service and Mobile Integrated Day II
 
Rego University: Hidden Automation & Gel Scripting, CA PPM (CA Clarity PPM)
Rego University: Hidden Automation & Gel Scripting, CA PPM (CA Clarity PPM)Rego University: Hidden Automation & Gel Scripting, CA PPM (CA Clarity PPM)
Rego University: Hidden Automation & Gel Scripting, CA PPM (CA Clarity PPM)
 
Creando microservicios con java micro profile y tomee - CUNORI 2020
Creando microservicios con java micro profile y tomee - CUNORI 2020Creando microservicios con java micro profile y tomee - CUNORI 2020
Creando microservicios con java micro profile y tomee - CUNORI 2020
 
JavaOne 2009 - TS-5276 - RESTful Protocol Buffers
JavaOne 2009 - TS-5276 - RESTful  Protocol BuffersJavaOne 2009 - TS-5276 - RESTful  Protocol Buffers
JavaOne 2009 - TS-5276 - RESTful Protocol Buffers
 
iPhone and Rails integration
iPhone and Rails integrationiPhone and Rails integration
iPhone and Rails integration
 
Basics of Solr and Solr Integration with AEM6
Basics of Solr and Solr Integration with AEM6Basics of Solr and Solr Integration with AEM6
Basics of Solr and Solr Integration with AEM6
 
Flink Forward Berlin 2017: Maciek Próchniak - TouK Nussknacker - creating Fli...
Flink Forward Berlin 2017: Maciek Próchniak - TouK Nussknacker - creating Fli...Flink Forward Berlin 2017: Maciek Próchniak - TouK Nussknacker - creating Fli...
Flink Forward Berlin 2017: Maciek Próchniak - TouK Nussknacker - creating Fli...
 
Discovering Emerging Tech through Graph Analysis - Henry Hwangbo @ GraphConne...
Discovering Emerging Tech through Graph Analysis - Henry Hwangbo @ GraphConne...Discovering Emerging Tech through Graph Analysis - Henry Hwangbo @ GraphConne...
Discovering Emerging Tech through Graph Analysis - Henry Hwangbo @ GraphConne...
 
Gatling Performance Workshop
Gatling Performance WorkshopGatling Performance Workshop
Gatling Performance Workshop
 
.NET @ apache.org
 .NET @ apache.org .NET @ apache.org
.NET @ apache.org
 
Best Selenium Training in Bangalore Offered by myTectra
Best Selenium Training in Bangalore Offered by myTectraBest Selenium Training in Bangalore Offered by myTectra
Best Selenium Training in Bangalore Offered by myTectra
 
API
APIAPI
API
 
Selenium Online Training.pdf
Selenium Online Training.pdfSelenium Online Training.pdf
Selenium Online Training.pdf
 
Salesforce connect
Salesforce connectSalesforce connect
Salesforce connect
 
Hacking the Google Snippet - Digpen 7 workshop
Hacking the Google Snippet - Digpen 7 workshopHacking the Google Snippet - Digpen 7 workshop
Hacking the Google Snippet - Digpen 7 workshop
 
Oracle Framework Training in Bangalore by myTectra
Oracle Framework Training in Bangalore by myTectraOracle Framework Training in Bangalore by myTectra
Oracle Framework Training in Bangalore by myTectra
 
Spring.io
Spring.ioSpring.io
Spring.io
 
PyconIE 2016 - Kajiki, the fast and validated template engine your were looki...
PyconIE 2016 - Kajiki, the fast and validated template engine your were looki...PyconIE 2016 - Kajiki, the fast and validated template engine your were looki...
PyconIE 2016 - Kajiki, the fast and validated template engine your were looki...
 

More from Chalermchon Samana

More from Chalermchon Samana (6)

Sukhothai Kingdom Application
Sukhothai Kingdom ApplicationSukhothai Kingdom Application
Sukhothai Kingdom Application
 
SocialTrip in Thailand
SocialTrip in ThailandSocialTrip in Thailand
SocialTrip in Thailand
 
Prototype of SocialTrip in Thailand
Prototype of SocialTrip in ThailandPrototype of SocialTrip in Thailand
Prototype of SocialTrip in Thailand
 
Android HttpClient - new slide!
Android HttpClient - new slide!Android HttpClient - new slide!
Android HttpClient - new slide!
 
Android httpclient php_mysql
Android httpclient php_mysqlAndroid httpclient php_mysql
Android httpclient php_mysql
 
Impacts of gesture based game
Impacts of gesture based gameImpacts of gesture based game
Impacts of gesture based game
 

Recently uploaded

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 

Recently uploaded (20)

ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 

iPhone NSURLConnection-2