General PHP frameworks can be used as app backend servers. Because in principle, all the client gets from you is string data, so there is no problem even if you don't use the framework, but it will cause subsequent problems. PHP just provides APIs to clients. There are many ways to describe APIs: REST, SOAP, etc. REST is recommended.
Can PHP develop clients?
Because PHP is a scripting language, it is mainly used for server-side development and is responsible for completing the S part of the B/S architecture or C/S architecture. However, PHP can not only be developed on Internet websites. A PHP for Android (PFA) site stated that they will be able to publish programming models and toolbox documents to enable PHP applications on Android. (Recommended learning: PHP programming from entry to proficiency)
How to use the PHP framework language to develop mobile APPs?
First: Just like WEB development, you first need some relevant parameters. These parameters will be passed by the client, maybe GET or POST. This needs to be agreed upon by the development team. , or develop unified specifications.
Second: With parameters, complete data processing according to application requirements, such as: task progress update, APP in-app purchase, end-of-game data submission, etc.
Third: Data logic After processing, return the relevant data needed by the client, such as: task status, in-app purchase results, player information, etc.
P.S: How to return the data to the client? Direct output form, such as: JSON, XML, TEXT, etc.
Fourth: After the client obtains the data you returned, interact with the user locally on the client!
PHP cannot write app applications. Mainly used for development and use of B/S structure (Browser/Server, browser/server mode). But php can be used as a server to exchange data with app applications. Server API.
There are three popular mobile phone platforms for learning APPs, android, IOS, and windows. They all have their own programming languages, which can be learned through Baidu search on their respective platforms.
Mobile backends are all heavy on PHP, Python, and Java, let alone C. It depends on what protocol you use, http, tcp/ip.
nodejs can write routing and form verification as C modules. It mainly provides interfaces for mobile APP calls. It can be considered from the aspects of cost, server resource occupation, development efficiency, operating efficiency, and the ability to process complex logic in the background. wait. At present, the ones I know include jsp, asp, and php.
The above is the detailed content of Can php make an Android mobile app?. For more information, please follow other related articles on the PHP Chinese website!