SlideShare a Scribd company logo
Basic Communications
●   HTTP Requests
    ●   Posting of data
    ●   Simple Example App
Download CommsTest Project
●   This presentation is accompanies by an
    example Meme IDE project that can be
    downloaded from:

●   http://www.memeapps.com/tutorials//commsprojectpage.php
Define a Server Entry
●   Project properties
    ●   Servers tab
        –   Server name. Used in functions
        –   Address. Server address without protocol
        –   Protocol. HTTP or HTTPS
        –   Minimum Connection
Server Entry for Example Project
demo.memeide.com
●   Example data for sample projects
●   fetch_test.xml


<Person fname="Andrew" sname="Whitmore">
</Person>
Record Structure
Form
Single Button
●   Click and it runs the function:
    ●   SendRequest


function sendRequest()
{
fetch("TestServer", "fetch_test.xml",
"Person", "successfulResponse");
}
The 'fetch' command
●   Fetch
    ●   Server name - “TestServer”
    ●   Path - “fetch_test.xml”
    ●   Record Type - “Person”
    ●   Response Callback
        –   “successfulResponse”
        –   Called when request complete
        –   Not written yet
        –   Up next ......
SuccessfulResponse function
function successfulResponse(response : Response)
{
  var result : Person;
  var status = response.status;
  if (status == 200)
  {
    result = response.payload;
    notify("Got a person, fname=" + result.fname);
  }
  else
  {
    notify("Error, status=" + status);
  }
}




                               Mandatory Parameter of type Response
'Response' Record Type
●   Built-in
●   Attributes
    ●   Status – response code (200 for success)
    ●   Payload – a record in this case a 'Person'
    ●   Message – any error message
SuccessfulResponse function
function successfulResponse(response : Response)
{
  var result : Person;                  Test the status for 200
  var status = response.status;
  if (status == 200)
  {                                               Display the name attribute
    result = response.payload;
    notify("Got a person, fname=" + result.fname);
  }
  else
  {
    notify("Error, status=" + status);
  }
                                                    If there is an error,
}
                                                  display the status code
Boilerplate code
●   Startup function
    ●   open(“MainForm”);
The App

More Related Content

PDF
Practical JavaScript Promises
Asa Kusuma
 
PDF
Angular server-side communication
Alexe Bogdan
 
PPTX
Java Script Promise
Alok Guha
 
PDF
Angular promises and http
Alexe Bogdan
 
PPTX
JavaScript Promises
L&T Technology Services Limited
 
PDF
Getting Comfortable with JS Promises
Asa Kusuma
 
PDF
How to Vim - for beginners
Marcin Rogacki
 
PDF
JavaScript Promise
Joseph Chiang
 
Practical JavaScript Promises
Asa Kusuma
 
Angular server-side communication
Alexe Bogdan
 
Java Script Promise
Alok Guha
 
Angular promises and http
Alexe Bogdan
 
JavaScript Promises
L&T Technology Services Limited
 
Getting Comfortable with JS Promises
Asa Kusuma
 
How to Vim - for beginners
Marcin Rogacki
 
JavaScript Promise
Joseph Chiang
 

What's hot (20)

PPTX
Avoiding callback hell in Node js using promises
Ankit Agarwal
 
PDF
Large scale machine learning projects with r suite
Wit Jakuczun
 
PDF
Finch.io - Purely Functional REST API with Finagle
Vladimir Kostyukov
 
PDF
JavaScript Promises
Derek Willian Stavis
 
PPTX
Testing in airflow
Chandulal Kavar
 
KEY
Scala on Your Phone
Michael Galpin
 
PPTX
Aspdevice - Asp Fast Crud introdution
Adriano Mendes
 
PPTX
Venturing Into The Wild: A .NET Developer's Experience As A Ruby Developer
Jon Kruger
 
DOCX
exportDisabledUsersRemoveMailbox
Daniel Gilhousen
 
PDF
第1回PHP拡張勉強会
Ippei Ogiwara
 
PDF
Ansible Callback Plugins
jtyr
 
PDF
Enumerating behaviour: PHP needs better enum [Berlin, 4. 12. 2018]
Jan Kuchař
 
PDF
Asynchronous programming done right - Node.js
Piotr Pelczar
 
PPTX
Testable, Object-Oriented JavaScript
Jon Kruger
 
PDF
Promises in iOS development
RomanPanichkin
 
PDF
ActionHeroJS Talk
David Peralta
 
PPT
Introduction to PowerShell
Salaudeen Rajack
 
PPT
27. mathematical, date and time functions in VB Script
VARSHAKUMARI49
 
PDF
Service Workers
Artur Felipe Sousa
 
PDF
The evolution of java script asynchronous calls
Huy Hoàng Phạm
 
Avoiding callback hell in Node js using promises
Ankit Agarwal
 
Large scale machine learning projects with r suite
Wit Jakuczun
 
Finch.io - Purely Functional REST API with Finagle
Vladimir Kostyukov
 
JavaScript Promises
Derek Willian Stavis
 
Testing in airflow
Chandulal Kavar
 
Scala on Your Phone
Michael Galpin
 
Aspdevice - Asp Fast Crud introdution
Adriano Mendes
 
Venturing Into The Wild: A .NET Developer's Experience As A Ruby Developer
Jon Kruger
 
exportDisabledUsersRemoveMailbox
Daniel Gilhousen
 
第1回PHP拡張勉強会
Ippei Ogiwara
 
Ansible Callback Plugins
jtyr
 
Enumerating behaviour: PHP needs better enum [Berlin, 4. 12. 2018]
Jan Kuchař
 
Asynchronous programming done right - Node.js
Piotr Pelczar
 
Testable, Object-Oriented JavaScript
Jon Kruger
 
Promises in iOS development
RomanPanichkin
 
ActionHeroJS Talk
David Peralta
 
Introduction to PowerShell
Salaudeen Rajack
 
27. mathematical, date and time functions in VB Script
VARSHAKUMARI49
 
Service Workers
Artur Felipe Sousa
 
The evolution of java script asynchronous calls
Huy Hoàng Phạm
 
Ad

Similar to 05 communications (20)

KEY
JavaScript Testing for Rubyists
Jamie Dyer
 
PPTX
NodeJs
dizabl
 
PDF
EWD 3 Training Course Part 13: Putting Everything so far into Practice using ...
Rob Tweed
 
PDF
Spring hibernate jsf_primefaces_intergration
Carlos Junior Caso Casimiro
 
PPTX
Powershell Tech Ed2009
rsnarayanan
 
PDF
Input.pdf
stephanedjeukam1
 
PDF
Load Testing with PHP and RedLine13
Jason Lotito
 
PPTX
Unit test candidate solutions
benewu
 
PPTX
Power shell voor developers
Dennis Vroegop
 
PDF
Testing in JavaScript
Digital Natives
 
PDF
Stop Making Excuses and Start Testing Your JavaScript
Ryan Anklam
 
PPTX
Callbacks, Promises, and Coroutines (oh my!): Asynchronous Programming Patter...
Domenic Denicola
 
ODP
Pruebas unitarias con django
Tomás Henríquez
 
PPTX
Ajax for dummies, and not only.
Nerd Tzanetopoulos
 
PPTX
Local SQLite Database with Node for beginners
Laurence Svekis ✔
 
KEY
Phpne august-2012-symfony-components-friends
Michael Peacock
 
PDF
Android Studio Assignment HelpCan someone who is familiar with And.pdf
feelinggift
 
PDF
How to make Ajax work for you
Simon Willison
 
PDF
JavaScript patterns
Norihito YAMAKAWA
 
PPTX
Implementing CQRS and Event Sourcing with RavenDB
Oren Eini
 
JavaScript Testing for Rubyists
Jamie Dyer
 
NodeJs
dizabl
 
EWD 3 Training Course Part 13: Putting Everything so far into Practice using ...
Rob Tweed
 
Spring hibernate jsf_primefaces_intergration
Carlos Junior Caso Casimiro
 
Powershell Tech Ed2009
rsnarayanan
 
Input.pdf
stephanedjeukam1
 
Load Testing with PHP and RedLine13
Jason Lotito
 
Unit test candidate solutions
benewu
 
Power shell voor developers
Dennis Vroegop
 
Testing in JavaScript
Digital Natives
 
Stop Making Excuses and Start Testing Your JavaScript
Ryan Anklam
 
Callbacks, Promises, and Coroutines (oh my!): Asynchronous Programming Patter...
Domenic Denicola
 
Pruebas unitarias con django
Tomás Henríquez
 
Ajax for dummies, and not only.
Nerd Tzanetopoulos
 
Local SQLite Database with Node for beginners
Laurence Svekis ✔
 
Phpne august-2012-symfony-components-friends
Michael Peacock
 
Android Studio Assignment HelpCan someone who is familiar with And.pdf
feelinggift
 
How to make Ajax work for you
Simon Willison
 
JavaScript patterns
Norihito YAMAKAWA
 
Implementing CQRS and Event Sourcing with RavenDB
Oren Eini
 
Ad

Recently uploaded (20)

PDF
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
PDF
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
PDF
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PDF
AI-Cloud-Business-Management-Platforms-The-Key-to-Efficiency-Growth.pdf
Artjoker Software Development Company
 
PDF
The Future of Artificial Intelligence (AI)
Mukul
 
PPTX
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
PDF
GDG Cloud Munich - Intro - Luiz Carneiro - #BuildWithAI - July - Abdel.pdf
Luiz Carneiro
 
PDF
Software Development Methodologies in 2025
KodekX
 
PPTX
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
 
PDF
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
PPTX
The Future of AI & Machine Learning.pptx
pritsen4700
 
PPTX
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
PDF
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
PDF
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
PDF
Get More from Fiori Automation - What’s New, What Works, and What’s Next.pdf
Precisely
 
PPTX
Introduction to Flutter by Ayush Desai.pptx
ayushdesai204
 
PDF
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
PDF
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
PDF
Doc9.....................................
SofiaCollazos
 
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
AI-Cloud-Business-Management-Platforms-The-Key-to-Efficiency-Growth.pdf
Artjoker Software Development Company
 
The Future of Artificial Intelligence (AI)
Mukul
 
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
GDG Cloud Munich - Intro - Luiz Carneiro - #BuildWithAI - July - Abdel.pdf
Luiz Carneiro
 
Software Development Methodologies in 2025
KodekX
 
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
 
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
The Future of AI & Machine Learning.pptx
pritsen4700
 
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
Get More from Fiori Automation - What’s New, What Works, and What’s Next.pdf
Precisely
 
Introduction to Flutter by Ayush Desai.pptx
ayushdesai204
 
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
Doc9.....................................
SofiaCollazos
 

05 communications

  • 1. Basic Communications ● HTTP Requests ● Posting of data ● Simple Example App
  • 2. Download CommsTest Project ● This presentation is accompanies by an example Meme IDE project that can be downloaded from: ● http://www.memeapps.com/tutorials//commsprojectpage.php
  • 3. Define a Server Entry ● Project properties ● Servers tab – Server name. Used in functions – Address. Server address without protocol – Protocol. HTTP or HTTPS – Minimum Connection
  • 4. Server Entry for Example Project
  • 5. demo.memeide.com ● Example data for sample projects ● fetch_test.xml <Person fname="Andrew" sname="Whitmore"> </Person>
  • 8. Single Button ● Click and it runs the function: ● SendRequest function sendRequest() { fetch("TestServer", "fetch_test.xml", "Person", "successfulResponse"); }
  • 9. The 'fetch' command ● Fetch ● Server name - “TestServer” ● Path - “fetch_test.xml” ● Record Type - “Person” ● Response Callback – “successfulResponse” – Called when request complete – Not written yet – Up next ......
  • 10. SuccessfulResponse function function successfulResponse(response : Response) { var result : Person; var status = response.status; if (status == 200) { result = response.payload; notify("Got a person, fname=" + result.fname); } else { notify("Error, status=" + status); } } Mandatory Parameter of type Response
  • 11. 'Response' Record Type ● Built-in ● Attributes ● Status – response code (200 for success) ● Payload – a record in this case a 'Person' ● Message – any error message
  • 12. SuccessfulResponse function function successfulResponse(response : Response) { var result : Person; Test the status for 200 var status = response.status; if (status == 200) { Display the name attribute result = response.payload; notify("Got a person, fname=" + result.fname); } else { notify("Error, status=" + status); } If there is an error, } display the status code
  • 13. Boilerplate code ● Startup function ● open(“MainForm”);