Introduction to the App interface

Source: Internet
Author: User

1. App Interface (communication interface)
    • Interface Address: For example: http://app.com/api.php
    • Interface files: api.php processing some business logic (get Data)
    • Interface data: Get data, upload to client for use
the core of the app interface is the interface file
2. How the App interface communicates     The client sends an HTTP request to the server (an interface address that is not visible to the user), and the server receives the HTTP request and processes it according to the request, returning the data to the client after processing ends (the data is typically in XML and JSON two formats). 3. XML data and JSON data
    • XML data
     XML--extensible Markup LanguageExtended Markup Language
Used to tag language data and define data types, which is a source language that allows users to define their own markup language.     The nodes of the XML language can be customized, and the nodes (tags) of the HTML language cannot be customized, such as:<p>,
<? xml version = "1.0" encoding = "UTF-8"?> <item> <title>singwa</title> <test id = "1"/> </item>
The XML language must and can only have one root node <item>
    • JSON data
JSON-to- JavaScript Object Notation
   A lightweight data interchange format that has good readability and is easy to write quickly. Use highly compatible text formats that are completely language-independent.
    • The difference between XML and JSON
Readability XML data is more readable (structurally clear)
Generate Data aspects (PHP generates XML and JSON) JSON uses only one function to facilitate
Transmission speed Small JSON data, fast transfer speed
4. App interface function
    • Get Data
gets data from the database or cache, and then returns it to the client through the interface data
    • Submit data
data is submitted to the server via an interface, and then the server is processed or otherwise processed. The interface for submitting data consists of two versions: Version upgrade interface and data receiving interface

Introduction to the App interface

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.