SlideShare una empresa de Scribd logo
1 de 20
Developing on the AloAshbei Platform A technical session with the AloAshbei registered developers. 17th July, 2010
Who Am I? 2 Abu AshrafMasnun Business Student at KU PHP & Python Developer
3 Contained REST APIs Common Mistakes Integration  Possibilities Mobilizing the Web
4 REST APIs User makes a request to the REST API. User receives JSON response. Related SOAP API  is called on the server. A HTTP POST call is all you need. Doesn’t require you to play with WSDL files. Implement with almost any programming language.
5 How to use REST APIs? 1. Get the URL for a specific API. 2. Gather the required parameters. 3. Make a HTTP POST call to the URL. 4. Parse the JSON response. Let’s see! Can this be any simpler ?
6 REST APIs Code Sample <?php <?php$a['registrationID'] = "masnun";  $a['password'] = "******";   $a['sourceMsisdn'] = '8801711******';   $a['destinationMsisdn'] = '8801711******';  $a['smsPort'] = 7424;  $a['msgType'] = 4;  $a['charge'] = 2.00; $a['chargedParty'] = '8801711******';   $a['contentArea'] = 'gpgp_psms';  $a['msgContent'] = 'Hello GP API!'; $ch = curl_init("http://masnun.com/aloashbei/sms/send"); curl_setopt($ch, CURLOPT_POST, 1); $data = ""; foreach($a as $k => $v)  { $data.= "$k=$v&"; } curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $result = curl_exec($ch); var_dump($result); ?>
<?php 7 Parsing JSON Response <?php$dataObject = json_decode($result); echo $dataObject->SendSMSResponse->status; ?>
8 Detailed Docs on REST APIs For documentation and API specific code samples: http://masnun.com/aloashbei/
9 Common Mistakes While Working with the APIs 1.  Not editing the WSDL file. 2.  Missing out one or more parameter. 3.  Wrong Request Name. 4.   Miss-matching parameters. 5.   Others. Look into the docs.  Use the Wiki or Forums. And how to resolve them?
10 Integrations Python PHP SoapClient REST APIs
11 Integration : PHP <?php$soap = new SoapClient("http://localhost/gp/wsdl/WebService_GP_ADP_BizTalk_LBS_Orchestration.asmx");  $a['registrationID'] = "masnun"; $a['msisdn'] = '8801711******'; $a['password'] = “******"; try {     var_dump( $soap->requestLocation( array ("LBSRequest" => $a) ) ); } catch (Exception $e) {      var_dump($e->getMessage());   } ?>
12 Integration : Python Python aims to combine "remarkable power with very clear syntax" Wikipedia PyQT Django / Google App Engine GUI Apps Web Apps
13 Python & REST APIs import urllib, json req = { 		"registrationID":"masnun", 		"password":“******", 		"msisdn":"8801711******" 	} url = "http://masnun.com/aloashbei/location/get" input = urllib.urlopen(url,urllib.urlencode(req)).read() data = json.loads(input) print data['LBSResponse']['Status'] print data['LBSResponse']['Latitude'] print data['LBSResponse']['Longitude']
14 Python & REST APIs: Output C:sersaSnunesktop>rest.py OK 23.780268 90.407782 C:sersaSnunesktop>
15 Google App Engine ,[object Object]
 Persistent storage with queries, sorting and transactions.
 Automatic scaling and load balancing.
 APIs for authenticating users and sending email using Google Accounts.
 A fully featured local development environment that simulates Google App Engine on your computer.
Scheduled tasks for triggering events at specified times and regular intervalsFREE

Más contenido relacionado

La actualidad más candente

Silex and Twig (PHP Dorset talk)
Silex and Twig (PHP Dorset talk)Silex and Twig (PHP Dorset talk)
Silex and Twig (PHP Dorset talk)Dave Hulbert
 
How not to develop with Plone
How not to develop with PloneHow not to develop with Plone
How not to develop with PloneLennart Regebro
 
INTERFACE by apidays_Automating style guides for REST, gRPC, or GraphQL by Ph...
INTERFACE by apidays_Automating style guides for REST, gRPC, or GraphQL by Ph...INTERFACE by apidays_Automating style guides for REST, gRPC, or GraphQL by Ph...
INTERFACE by apidays_Automating style guides for REST, gRPC, or GraphQL by Ph...apidays
 
Assurer - a pluggable server testing/monitoring framework
Assurer - a pluggable server testing/monitoring frameworkAssurer - a pluggable server testing/monitoring framework
Assurer - a pluggable server testing/monitoring frameworkGosuke Miyashita
 
Create a web-app with Cgi Appplication
Create a web-app with Cgi AppplicationCreate a web-app with Cgi Appplication
Create a web-app with Cgi Appplicationolegmmiller
 
REST with Her (and let Her take care of the REST)
REST with Her (and let Her take care of the REST)REST with Her (and let Her take care of the REST)
REST with Her (and let Her take care of the REST)Simon Courtois
 
Magento - a Zend Framework Application
Magento - a Zend Framework ApplicationMagento - a Zend Framework Application
Magento - a Zend Framework ApplicationZendCon
 
Application Diagnosis with Zend Server Tracing
Application Diagnosis with Zend Server TracingApplication Diagnosis with Zend Server Tracing
Application Diagnosis with Zend Server TracingZendCon
 
The 90-Day Startup with Google AppEngine for Java
The 90-Day Startup with Google AppEngine for JavaThe 90-Day Startup with Google AppEngine for Java
The 90-Day Startup with Google AppEngine for JavaDavid Chandler
 
Matt Greenwood & Scott Draves - The Polyglot Beaker Notebook
Matt Greenwood & Scott Draves - The Polyglot Beaker NotebookMatt Greenwood & Scott Draves - The Polyglot Beaker Notebook
Matt Greenwood & Scott Draves - The Polyglot Beaker NotebookPyData
 
Python RESTful webservices with Python: Flask and Django solutions
Python RESTful webservices with Python: Flask and Django solutionsPython RESTful webservices with Python: Flask and Django solutions
Python RESTful webservices with Python: Flask and Django solutionsSolution4Future
 
The Basics Of Page Creation
The Basics Of Page CreationThe Basics Of Page Creation
The Basics Of Page CreationWildan Maulana
 
Extending burp with python
Extending burp with pythonExtending burp with python
Extending burp with pythonHoang Nguyen
 

La actualidad más candente (16)

Silex and Twig (PHP Dorset talk)
Silex and Twig (PHP Dorset talk)Silex and Twig (PHP Dorset talk)
Silex and Twig (PHP Dorset talk)
 
How not to develop with Plone
How not to develop with PloneHow not to develop with Plone
How not to develop with Plone
 
Rails 101
Rails 101Rails 101
Rails 101
 
INTERFACE by apidays_Automating style guides for REST, gRPC, or GraphQL by Ph...
INTERFACE by apidays_Automating style guides for REST, gRPC, or GraphQL by Ph...INTERFACE by apidays_Automating style guides for REST, gRPC, or GraphQL by Ph...
INTERFACE by apidays_Automating style guides for REST, gRPC, or GraphQL by Ph...
 
Key features PHP 5.3 - 5.6
Key features PHP 5.3 - 5.6Key features PHP 5.3 - 5.6
Key features PHP 5.3 - 5.6
 
Introduction to PHP
Introduction to PHPIntroduction to PHP
Introduction to PHP
 
Assurer - a pluggable server testing/monitoring framework
Assurer - a pluggable server testing/monitoring frameworkAssurer - a pluggable server testing/monitoring framework
Assurer - a pluggable server testing/monitoring framework
 
Create a web-app with Cgi Appplication
Create a web-app with Cgi AppplicationCreate a web-app with Cgi Appplication
Create a web-app with Cgi Appplication
 
REST with Her (and let Her take care of the REST)
REST with Her (and let Her take care of the REST)REST with Her (and let Her take care of the REST)
REST with Her (and let Her take care of the REST)
 
Magento - a Zend Framework Application
Magento - a Zend Framework ApplicationMagento - a Zend Framework Application
Magento - a Zend Framework Application
 
Application Diagnosis with Zend Server Tracing
Application Diagnosis with Zend Server TracingApplication Diagnosis with Zend Server Tracing
Application Diagnosis with Zend Server Tracing
 
The 90-Day Startup with Google AppEngine for Java
The 90-Day Startup with Google AppEngine for JavaThe 90-Day Startup with Google AppEngine for Java
The 90-Day Startup with Google AppEngine for Java
 
Matt Greenwood & Scott Draves - The Polyglot Beaker Notebook
Matt Greenwood & Scott Draves - The Polyglot Beaker NotebookMatt Greenwood & Scott Draves - The Polyglot Beaker Notebook
Matt Greenwood & Scott Draves - The Polyglot Beaker Notebook
 
Python RESTful webservices with Python: Flask and Django solutions
Python RESTful webservices with Python: Flask and Django solutionsPython RESTful webservices with Python: Flask and Django solutions
Python RESTful webservices with Python: Flask and Django solutions
 
The Basics Of Page Creation
The Basics Of Page CreationThe Basics Of Page Creation
The Basics Of Page Creation
 
Extending burp with python
Extending burp with pythonExtending burp with python
Extending burp with python
 

Similar a Developing on the aloashbei platform

P H P Part I I, By Kian
P H P  Part  I I,  By  KianP H P  Part  I I,  By  Kian
P H P Part I I, By Kianphelios
 
Going crazy with Node.JS and CakePHP
Going crazy with Node.JS and CakePHPGoing crazy with Node.JS and CakePHP
Going crazy with Node.JS and CakePHPMariano Iglesias
 
The new features of PHP 7 - Enrico Zimuel - Codemotion Milan 2016
The new features of PHP 7 - Enrico Zimuel - Codemotion Milan 2016The new features of PHP 7 - Enrico Zimuel - Codemotion Milan 2016
The new features of PHP 7 - Enrico Zimuel - Codemotion Milan 2016Codemotion
 
Php Asp Net Interoperability Rc Jao
Php Asp Net Interoperability Rc JaoPhp Asp Net Interoperability Rc Jao
Php Asp Net Interoperability Rc Jaojedt
 
Workshop KrakYourNet2016 - Web applications hacking Ruby on Rails example
Workshop KrakYourNet2016 - Web applications hacking Ruby on Rails example Workshop KrakYourNet2016 - Web applications hacking Ruby on Rails example
Workshop KrakYourNet2016 - Web applications hacking Ruby on Rails example Anna Klepacka
 
Php7 HHVM and co
Php7 HHVM and coPhp7 HHVM and co
Php7 HHVM and coweltling
 
Cakefest 2010: API Development
Cakefest 2010: API DevelopmentCakefest 2010: API Development
Cakefest 2010: API DevelopmentAndrew Curioso
 
Create a res tful services api in php.
Create a res tful services api in php.Create a res tful services api in php.
Create a res tful services api in php.Adeoye Akintola
 
Rails Presentation (Anton Dmitriyev)
Rails Presentation (Anton Dmitriyev)Rails Presentation (Anton Dmitriyev)
Rails Presentation (Anton Dmitriyev)True-Vision
 

Similar a Developing on the aloashbei platform (20)

P H P Part I I, By Kian
P H P  Part  I I,  By  KianP H P  Part  I I,  By  Kian
P H P Part I I, By Kian
 
Develop webservice in PHP
Develop webservice in PHPDevelop webservice in PHP
Develop webservice in PHP
 
Introduction to PHP
Introduction to PHPIntroduction to PHP
Introduction to PHP
 
Php mysql ppt
Php mysql pptPhp mysql ppt
Php mysql ppt
 
Phpwebdevelping
PhpwebdevelpingPhpwebdevelping
Phpwebdevelping
 
Going crazy with Node.JS and CakePHP
Going crazy with Node.JS and CakePHPGoing crazy with Node.JS and CakePHP
Going crazy with Node.JS and CakePHP
 
สปริงเฟรมเวิร์ค4.1
สปริงเฟรมเวิร์ค4.1สปริงเฟรมเวิร์ค4.1
สปริงเฟรมเวิร์ค4.1
 
working with PHP & DB's
working with PHP & DB'sworking with PHP & DB's
working with PHP & DB's
 
Phpwebdev
PhpwebdevPhpwebdev
Phpwebdev
 
REST API for your WP7 App
REST API for your WP7 AppREST API for your WP7 App
REST API for your WP7 App
 
The new features of PHP 7 - Enrico Zimuel - Codemotion Milan 2016
The new features of PHP 7 - Enrico Zimuel - Codemotion Milan 2016The new features of PHP 7 - Enrico Zimuel - Codemotion Milan 2016
The new features of PHP 7 - Enrico Zimuel - Codemotion Milan 2016
 
The new features of PHP 7
The new features of PHP 7The new features of PHP 7
The new features of PHP 7
 
Php Asp Net Interoperability Rc Jao
Php Asp Net Interoperability Rc JaoPhp Asp Net Interoperability Rc Jao
Php Asp Net Interoperability Rc Jao
 
Workshop KrakYourNet2016 - Web applications hacking Ruby on Rails example
Workshop KrakYourNet2016 - Web applications hacking Ruby on Rails example Workshop KrakYourNet2016 - Web applications hacking Ruby on Rails example
Workshop KrakYourNet2016 - Web applications hacking Ruby on Rails example
 
Php7 HHVM and co
Php7 HHVM and coPhp7 HHVM and co
Php7 HHVM and co
 
Cakefest 2010: API Development
Cakefest 2010: API DevelopmentCakefest 2010: API Development
Cakefest 2010: API Development
 
Create a res tful services api in php.
Create a res tful services api in php.Create a res tful services api in php.
Create a res tful services api in php.
 
Web Scraping with PHP
Web Scraping with PHPWeb Scraping with PHP
Web Scraping with PHP
 
Crafting APIs
Crafting APIsCrafting APIs
Crafting APIs
 
Rails Presentation (Anton Dmitriyev)
Rails Presentation (Anton Dmitriyev)Rails Presentation (Anton Dmitriyev)
Rails Presentation (Anton Dmitriyev)
 

Último

Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
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
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
"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
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
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
 
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
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 

Último (20)

Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
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...
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
"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...
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
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
 
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
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 

Developing on the aloashbei platform

  • 1. Developing on the AloAshbei Platform A technical session with the AloAshbei registered developers. 17th July, 2010
  • 2. Who Am I? 2 Abu AshrafMasnun Business Student at KU PHP & Python Developer
  • 3. 3 Contained REST APIs Common Mistakes Integration Possibilities Mobilizing the Web
  • 4. 4 REST APIs User makes a request to the REST API. User receives JSON response. Related SOAP API is called on the server. A HTTP POST call is all you need. Doesn’t require you to play with WSDL files. Implement with almost any programming language.
  • 5. 5 How to use REST APIs? 1. Get the URL for a specific API. 2. Gather the required parameters. 3. Make a HTTP POST call to the URL. 4. Parse the JSON response. Let’s see! Can this be any simpler ?
  • 6. 6 REST APIs Code Sample <?php <?php$a['registrationID'] = "masnun"; $a['password'] = "******"; $a['sourceMsisdn'] = '8801711******'; $a['destinationMsisdn'] = '8801711******'; $a['smsPort'] = 7424; $a['msgType'] = 4; $a['charge'] = 2.00; $a['chargedParty'] = '8801711******'; $a['contentArea'] = 'gpgp_psms'; $a['msgContent'] = 'Hello GP API!'; $ch = curl_init("http://masnun.com/aloashbei/sms/send"); curl_setopt($ch, CURLOPT_POST, 1); $data = ""; foreach($a as $k => $v) { $data.= "$k=$v&"; } curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $result = curl_exec($ch); var_dump($result); ?>
  • 7. <?php 7 Parsing JSON Response <?php$dataObject = json_decode($result); echo $dataObject->SendSMSResponse->status; ?>
  • 8. 8 Detailed Docs on REST APIs For documentation and API specific code samples: http://masnun.com/aloashbei/
  • 9. 9 Common Mistakes While Working with the APIs 1. Not editing the WSDL file. 2. Missing out one or more parameter. 3. Wrong Request Name. 4. Miss-matching parameters. 5. Others. Look into the docs. Use the Wiki or Forums. And how to resolve them?
  • 10. 10 Integrations Python PHP SoapClient REST APIs
  • 11. 11 Integration : PHP <?php$soap = new SoapClient("http://localhost/gp/wsdl/WebService_GP_ADP_BizTalk_LBS_Orchestration.asmx"); $a['registrationID'] = "masnun"; $a['msisdn'] = '8801711******'; $a['password'] = “******"; try {     var_dump( $soap->requestLocation( array ("LBSRequest" => $a) ) ); } catch (Exception $e) {      var_dump($e->getMessage());   } ?>
  • 12. 12 Integration : Python Python aims to combine "remarkable power with very clear syntax" Wikipedia PyQT Django / Google App Engine GUI Apps Web Apps
  • 13. 13 Python & REST APIs import urllib, json req = { "registrationID":"masnun", "password":“******", "msisdn":"8801711******" } url = "http://masnun.com/aloashbei/location/get" input = urllib.urlopen(url,urllib.urlencode(req)).read() data = json.loads(input) print data['LBSResponse']['Status'] print data['LBSResponse']['Latitude'] print data['LBSResponse']['Longitude']
  • 14. 14 Python & REST APIs: Output C:sersaSnunesktop>rest.py OK 23.780268 90.407782 C:sersaSnunesktop>
  • 15.
  • 16. Persistent storage with queries, sorting and transactions.
  • 17. Automatic scaling and load balancing.
  • 18. APIs for authenticating users and sending email using Google Accounts.
  • 19. A fully featured local development environment that simulates Google App Engine on your computer.
  • 20. Scheduled tasks for triggering events at specified times and regular intervalsFREE
  • 21. 16 Mobilizing The Web Why mobilize your web applications?
  • 22. 17 Common Challenges in Mobile Web App Development
  • 23. 18 Possibilities on the Mobile Web Messaging/Social Applications. Online Mobile Games. News and Information. Remote control over devices. Content Sharing Services. Possibilities are endless. Let your imagination drive you!