As Mobile App, normally we also call it as mobile application. It is also the computer program designed to run on the mobile phone or tablet, Pad or even smart watches. Following development of science and development of Information technology, now software already move its function from Desktop and laptop to the mobile devices, exactly applying through mobile phone as convenience and high efficiency. Certainly, benefit is not only for users, but it is also for every company which adopt mobile app because it is easy to spread and advertise about corporate products, information and related service then attract more customers for more business return. Meanwhile the most of online e-commerce and B2B trade platform also apply this advantage based on their innate favorable factors as programming development and skilled network operation. Sinosources, a largest B2B trade platform in China, also involve in related industrial competition and develop the mobile App for its business mainly extending market around Asia, East Europe and Africa. Well, as today’s topic, let every amateurs of code or programming know the basic knowledge for mobile App.
Interface between Mobile App and server communication
The most of newbie or amateurs will not know why interface is so useful for App to connect to server communication. Actually mobile app may directly communication request data with server. But this is not the good way to operate. Below is the reasons why interface is important between mobile app and server to realize access.
- App client-end so large, unfavorable reuse
If there is no interface, the app client can directly request data. This can be done, but the equivalent of all the work of the interface is written on the app client end, which will cause the app to be larger. For instance, Accessing to the database code are both of Android to write and IOS also to write, so this is too bad for reuse. The basic requirement and standards for high quality code are maintainable, reusable, scalable, and flexible. So if we apply on interface, the interface can encapsulate data and process data, and then give to the app.
- Unfavorable data safety
Interface can check security. Because the client is in the hands of the client, it can be cracked and can be decompiled. Under the whole structure, the database is directly leaked out, others can scan your database port, so it is quite dangerous thing. So normally for database, external clients cannot access, only through the interface. However interface may request you to log in, then according to your identity to allocate relative identity tag after login successfully. Ultimately, determine by interface how much things you may request. Every request will be judged by interface whether your login is legal or saying be identified, in terms of SessionString or cookie command. Actually Cookie is the ID of SessionString, even if it is hacked, it’s merely a user’s data to be stolen, other users will not be effected by this action.