8.app back-end and web back-end differences

Source: Internet
Author: User

Many small partners who go from the Web backend to the app backend are often at a loss and don't know what the difference is between the two. This article uses examples to analyze the differences between the Web backend and the app backend, allowing you to better grasp the architecture of the app backend.
  
(1) The app backend should carefully consider the network traffic, mainly API design, image processing on
  
At this stage, mobile phone online tariffs are to be calculated according to the flow, the general 3G users, the flow of hundreds of m,4g per month users, the flow of each month is a few g.
  
If you do not take into account the network traffic, a picture accounted for hundreds of K, the traffic is very fast.
  
In the previous article, "7. As mentioned in the app and app backend newsletter, the API's return is typically in JSON format, and one important reason to use the JSON format is that the same content, in JSON format, saves traffic.
  
The app also downloads the same image, by default allowing the app to download compressed images (typically less than dozens of K), allowing users to download the original image when they need to view the original.
  
(2) Mobile phone Weak network environment, stability, arrival rate
  
Mobile phone because of the characteristics of movement, especially at high speed movement, the 3G signal is sometimes not.
  
Therefore, the back-end to the app's information is not guaranteed to reach the app, it is very likely when the app is sent when the 3G signal, but the process of transmission, the 3G signal is gone, so the message is gone.
  
In this case, you need to do the signal confirmation of the app side.
  
For example, in a push system, the app will save the received message number.
  
The server sent a number of 3 messages to the App,app end of the message number is only 1, 2, which means that the message number 3 is missing, but the push servers are believed to have a message numbered 3 has been successfully pushed.
  
App every once in a while, ask the server has sent a few messages, through the comparison of the message number, if there are missing, then ask the server to send another time.
  
With this strategy, the integrity of the information can be guaranteed to a large extent.
  
(3) Mobile Phone Power Limited
  
Ordinary mobile phone, full of battery can be used for a day or so, if it is in the app to do a lot of network requests and operations, then the phone's power consumption is very fast.
  
However, if all the operations are concentrated on the server side, it will also increase the burden on the servers.
  
The balance between the two needs to be carefully weighed in the project.


--------------------------------------------------------------------------------------------------------------- ------------

Open the total list of articles in the Link app backend series to see all the original "app backend" articles I've published.


"Author" Zeng Jiansen

"QQ" 190678908
"QQ Group" 254659220
"Public number" Appbackend
"Sina Weibo" @newjueqi
"Blog" Http://blog.csdn.net/newjueqi

Differences between the 8.app backend and the Web back-end

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.